4 Replies
      Latest reply on May 12, 2019 9:41 AM by Davide Soldan
      arunks Level 1 Level 1 (0 points)

        I am trying to create a FAT binary with multiple architecture slices and publish a swift module. Which works perfectly fine.

        On the other side, when I am consuming this framework, I get compilation issues about methods not found. Something to do with <framework>-Swift.h not working correctly.

        Apple published this - https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes/


        Which states -

        Known Issues


        • If you’re building a framework containing Swift code and using lipo to create a binary that supports both device and simulator platforms, you must also combine the generated Framework-Swift.h headers for each platform to create a header that supports both device and simulator platforms. (48635615)For example, if you’ve built:- iOS/Framework.framework- iOS Simulator/Framework.frameworkTake:- iOS/Framework.framework/Headers/Framework-Swift.h- iOS Simulator/Framework.framework/Framework-Swift.hCreate a new:- iOS + iOS Simulator/Framework.framework/Headers/Framework-Swift.hThe contents of the new Framework-Swift.h should be:
        #if TARGET_OS_SIMULATOR <contents of original iOS Simulator/Framework.framework/Framework-Swift.h> 
        #else <contents of original iOS/Framework.framework/Framework-Swift.h>

        The workaround suggested by apple is also in place but I am not able to consume a swift framework. Has anyone faced a similar issue?