Post

Replies

Boosts

Views

Activity

When application merges libswift_concurrency.dylib is duplicated in app binary
Environment: Xcode 16.1 Swift version: 6.0.2 Inside of an Xcode project, if I declare a framework and an application. The framework is mergeable and the application merges the framework by configuring MERGE_BINARY_TYPE to Manual (or automatic it's independent). If SWIFT_VERSION is set to 6.0.X and deployment target is set to iOS 15< the build is going to fail because of this error Duplicate linked dylib '@rpath/libswift_Concurrency.dylib' in '/Users/**/Library/Developer/Xcode/DerivedData/GSPackage-dvnngsrgctfovgfbvwdlsscfycyq/Build/Products/Debug-iphonesimulator/DummyApp.app/DummyApp.debug.dylib' If I'm checking the generated artifact and inspect all of it's @rpath with otool it's giving me the following: otool -L /Users/****/Library/Developer/Xcode/DerivedData/Dummy-gbccsjwxeajftsafghxzaqksgfim/Build/Products/Debug-iphonesimulator/Dummy.app/Dummy.debug.dylib | grep @rpath @rpath/Dummy.debug.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 0.0.0, weak) @rpath/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 0.0.0, weak) A radar is already opened with the ID: FB15693702
0
0
123
1w
Interface is not propagated when using mergeable libraries
Hi! I've been dealing with mergeable libraries quite some time. However I can't achieve the following scenario: I have 2 xcframeworks A and B that are merged as part of a third xcframework called C. And my app needs to import something from A and B. As per the documentation we have to remove the references from A and B from the final app and replace it with C. If I work on the same xcodepoj it works like a charm (maybe because of caches), but if I try to compile C as a separate XCFramework and distribute it as a packed library, the app is not able to resolve the symbols to A and B classes. This C xcframework is compiled with BUILD_LIBRARY_FOR_DISTRIBUTION se to true and if I check its swiftinterface files it is not declaring the symbols from A and B. However the size of the binary seems to have A and B. Is there any way to export A and B symbols as part of C's swiftinterface? If I add @_exported, it is forcing me to declare the import of A and B wherever I use them and therefore I'm going to have duplicated symbols Thanks!
2
0
855
Aug ’23
Storyboard is not found when merging libraries
I'm currently creating the 3 xcframeworks A, B, C and a Group xcframework (configured to manual) which groups them, let's call it D. A, B and C are properly configured with the following settings: MAKE_MERGEABLE = YES; MERGEABLE_LIBRARY = YES; OTHER_LDFLAGS = ( "-ObjC", ); The problem comes when I try to initialise a UIStoryboard via code, it fails because it can't be found. let storyboard = UIStoryboard(name: "MyStoryboard", bundle: Bundle(for: NSClassFromString("A.Class")!)) The error it is raising is: Could not find a storyboard named 'MyStoryboard' in bundle NSBundle </some_path/Sample.app> Also, if I try to search for a specific file (such as a json) with the same structure Bundle(for: NSClassFromString("A.Class")!) it is not able to get any file. Points to note Xcode version 15 beta 1. Bundle(for: NSClassFromString("A.Class")!) returns a valid bundle path
1
0
771
Jun ’23