Hi!
I have encountered the next problem during the creation of the .xcframework and building it for the simulator devices and couldn't find any solution for this problem.
Let's me describe the build process:
2. Extract from derived data a build product and compose it in the xcframework
3. Then the framework is linked to the example project and the error occurs in the example project, when trying to build for the simulator. However, building for the arm64 works as should.
The structure of the xcframework is the next:
Could you please suggest, what is wrong in this approach of building .xcframework and how it can be fixed?
I have encountered the next problem during the creation of the .xcframework and building it for the simulator devices and couldn't find any solution for this problem.
Code Block Could not find module ‘’ for target ‘x86_64-apple-ios-simulator’;
Let's me describe the build process:
First of all i build framework for the iOS simulator and for iOS device.
Code Block xcodebuild BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ -scheme $(FRAMEWORK_NAME) \ -derivedDataPath $(DERIVED_DATA) \ -arch x86_64 \ -sdk iphonesimulator \ -mios-simulator-version-min='11.0' \ build xcodebuild BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ -scheme $(FRAMEWORK_NAME) \ -derivedDataPath $(DERIVED_DATA) \ -arch arm64 \ -sdk iphoneos \ -mios-version-min='11.0' \ build
2. Extract from derived data a build product and compose it in the xcframework
Code Block xcodebuild -create-xcframework \ -library $(BUILD_FOLDER)/simulators/lib$(FRAMEWORK_NAME).a \ -library $(BUILD_FOLDER)/devices/lib$(FRAMEWORK_NAME).a \ -output $(BUILD_FOLDER)/$(FRAMEWORK_NAME).xcframework
3. Then the framework is linked to the example project and the error occurs in the example project, when trying to build for the simulator. However, building for the arm64 works as should.
The structure of the xcframework is the next:
Code Block _ | _.DS_Store | _ios-x86_64-simulator | | _.DS_Store | | _libA.a | | _A.swiftmodule | | | _x86_64-apple-ios-simulator.swiftinterface | | | _x86_64-apple-ios-simulator.swiftdoc | | | _x86_64.swiftdoc | | | _Project | | | | _x86_64.swiftsourceinfo | | | | _x86_64-apple-ios-simulator.swiftsourceinfo | | | _x86_64.swiftinterface | _ios-arm64 | | _libA.a | | _A.swiftmodule | | | _arm64-apple-ios.swiftinterface | | | _arm64-apple-ios.swiftdoc | | | _arm64.swiftinterface | | | _Project | | | | _arm64-apple-ios.swiftsourceinfo | | | | _arm64.swiftsourceinfo | | | _arm64.swiftdoc | _Info.plist
Could you please suggest, what is wrong in this approach of building .xcframework and how it can be fixed?