XCFramework issue, A library with the identifier "ios-armv7_arm64" already exists
Asked Answered
M

3

8

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?

Mechanist answered 26/8, 2020 at 7:10 Comment(4)
hey u got any sol in this @MechanistBebeeru
@Bebeeru Got the solution but now facing other problems, check out my solution and see if it worksMechanist
yes I also solved what other problem you are facing let me know I can helpBebeeru
@Bebeeru My framework works in iOS13 but in iOS12 it doesn't work, this happens only when build libraries with distribution flag is true, if it is false, everything works fine.Mechanist
M
2

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
Mechanist answered 2/9, 2020 at 13:26 Comment(0)
S
0

Delete and rebuild the original frameworks and try running the xcodebuild command again.

Somnambulate answered 17/5, 2022 at 16:34 Comment(0)
B
-1

It Create a problem when you are trying to combining same frameworks twice . just refer the list and generate as per platforms enter image description here

Bebeeru answered 5/9, 2020 at 5:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.