3 Replies
      Latest reply on May 13, 2019 1:32 AM by eskimo
      Davide Soldan Level 1 Level 1 (0 points)

        Hi,

        I have an Objective-C framework called "Box" that uses a Swift framework called "Utils". Both have a standard target which I use during development, plus a custom target which I use when the development is done and I need to build a universal framework.

         

        Until Xcode 10.2/swift 4 all worked well and I was able to compile both "Box" and "Utils" universal frameworks and use them in a test app written in swift, or as frameworks inside other frameworks.

         

        Switching to Xcode 10.2/swift 5 I cannot reference objects and methods of "Utils" from "Box" anymore, at least not for all targets.

        If I use the "Box" standard target and a real device I can build the framework and run them into a test app. I can point and click "Utils" objects/methods from "Box" so I can reference them.

        If I use the "Box" standard target and a simulator I cannot build the framework and I have errors like:

        "No visible @interface for 'UIColor' declares the selector 'initWithHexString:'" -> initWithHexString is a method declared into an extension of UIColor inside "Utils" framework
        "use of undeclared identifier 'StringUtils'" -> StringUtils is a class declared inside "Utils" framework

        the same if I try to build the "Box" universal framework with its custom target (target with the classic script used to build universal frameworks)

         

        So for an unknown reason, starting from Xcode 10.2, for some target I cannot reference "Utils" framework from "Box" anymore.

        All the methods are marked with @objc so that is not the problem.

         

        Any idea about what could be the problem?

        I don't know if I have to add some other useful information...

         

        Thanks a lot!

         

        Update: I tried to import "Utils" framework into a Swift framework created on the fly to do a test. And it seems to work. So it seems a problem when I try to import Swift "Utils" framework into Objective-C "Box" framework.