While creating XCFramework, I'm getting the below-mentioned message on the terminal and xcframework is not getting generated
A library with the identifier "ios-armv7_arm64" already exists.
This is the command that I'm running
xcodebuild -create-xcframework \
-framework ./archives/My-iOS.xcarchive/Products/Library/Frameworks/My.framework \
-framework ./archives/My-iOS-Simulator.xcarchive/Products/Library/Frameworks/My.framework \
-output My.xcframework
Is there anything that I'm missing?
Updated my script with the below-mentioned script, now this particular problem is solved but facing other problems. Those who are facing this issue can try out the script and see if it works.
xcodebuild archive -scheme FrameworkName -destination="iOS" -archivePath /tmp/xcf/ios.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive -scheme FrameworkName -destination="iOS Simulator" -archivePath /tmp/xcf/iossimulator.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework -framework /tmp/xcf/ios.xcarchive/Products/Library/Frameworks/FrameworkName.framework -framework /tmp/xcf/iossimulator.xcarchive/Products/Library/Frameworks/FrameworkName.framework -output FrameworkName.xcframework
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With