10

I am trying to generate a iOS XCFramework from an Xcode framework Project(Project name XCFramework). Project consists of some of the cocoa-pods libraries like Socket IO, SwiftKeyChainWrapper etc. If I generate XCFramework without cocoa-pods, xcodebuild commands are generating the XCFramework successfully for both iOS and iOS Simulator destinations, but when I install pods in the framework project I am getting many errors. It will be really helpful if any one has come across this scenario and succeeded kindly help in generating XCFramework sample project using cocoa-pods.

Note: a) I used a small package called xcframework which generates xcfremwork in command (1) b) If I archive the project directly from Xcode the archive gets successful.

1) Buid command:- xcframework build --project XCFramework.xcodeproj --name XCFramework --iOS EcallXCFramework

...... ...... ** ARCHIVE FAILED **

The following build commands failed: Ld /Users/*******/Library/Developer/Xcode/DerivedData/XCFramework-gccrcnyzlsezmugkrqqlnpusjfci/Build/Intermediates.noindex/ArchiveIntermediates/XCFramework/InstallationBuildProductsLocation/Library/Frameworks/XCFramework.framework/XCFramework normal arm64 (1 failure)

2) Build Command:- xcodebuild archive -scheme XCFramework -destination="generic/platform=iOS" -destination="generic/platform=iOS Simulator" SKIP_INSTALL=NO

...... ....... User defaults from command line: destination = generic/platform=iOS Simulator

Build settings from command line: SKIP_INSTALL = NO

xcodebuild: error: Failed to build project EcallXCFramework with scheme XCFramework. Reason: The run destination My Mac is not valid for Archiving the scheme 'XCFramework'.

3) Build Command:- xcodebuild archive ..... ..... ld: framework not found SwiftKeychainWrapper clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **

The following build commands failed: Ld /tmp/EcallXCFramework.dst/Library/Frameworks/EcallXCFramework.framework/EcallXCFramework normal arm64 (1 failure)

vinay yedla
  • 141
  • 6
  • Examine the difference between the Xcode command in the build inspector and your command. You’ll be able to spot the difference there. – Warren Burton Mar 08 '20 at 09:22
  • I managed to create XCFramework using swift package manager not cocoa pods but when I imported the created xcframework into sample project it says "Module 'Socket IO' was not compiled with library evolution support; using it means binary compatibility for '' can't be guaranteed. " – vinay yedla Mar 11 '20 at 05:36
  • Did you get any solution @vinayyedla ? – Bala Jun 13 '20 at 14:18
  • Did you solve this? – Omar Masri Oct 27 '20 at 13:38
  • The build command seems wrong in 1): xcframework build --project XCFramework.xcodeproj --name XCFramework --iOS EcallXCFramework shouldn't it be xcodebuild build... instead of xcframework build ...? – a.ajwani Feb 24 '21 at 16:51

0 Answers0