问题
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?
回答1:
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
回答2:
It Create a problem when you are trying to combining same frameworks twice . just refer the list and generate as per platforms
来源:https://stackoverflow.com/questions/63592295/xcframework-issue-a-library-with-the-identifier-ios-armv7-arm64-already-exist