Questions tagged [xcframework]

An XCFramework is an Apple bundle format that makes it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and Mac Catalyst — into a single distributable.

An XCFramework makes it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and Mac Catalyst — into a single distributable .xcframework bundle that your developers can use within their own applications. An .xcframework bundle can be added to an Xcode target’s Link Libraries phase and Xcode uses the right platform’s version of the included framework or library at build time. Creation of frameworks is supported from the command line using xcodebuild -create-xcframework. Frameworks or libraries bundled in an XCFramework should be built with the Build Libraries for Distribution build setting set to YES.

258 questions
22
votes
3 answers

XCFramework with Pods Dependencies

Our goal is to create a framework that hides our internal code and provide SDK to our customers. We have thought of creating XCFramework which fulfills our requirement. Umbrella framework is also suggested over the internet but mostly suggested to…
Bhavin Vaghela
  • 654
  • 1
  • 5
  • 19
15
votes
4 answers

Failed to build module from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced

When creating an xcframework like this xcodebuild archive -project endiosOne-iOS.xcodeproj -scheme EOFoundation -destination="iOS" -archivePath /tmp/xcf/ios.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphoneos SKIP_INSTALL=NO…
user1898829
  • 3,437
  • 6
  • 34
  • 62
14
votes
1 answer

Add package dependency for a binary target with Swift Package Manager

I'm developing a closed source framework, that will be distributed as an XCFramework using SPM. This is possible thanks to the new binaryTarget from swift tools 5.3. This works fine until the framework has dependencies. 416 - Binary frameworks…
Nikola Lajic
  • 3,985
  • 28
  • 34
14
votes
1 answer

Error:The use of xcframeworks is not supported in the legacy build system

I have created .xcframework and trying to use in another app by embedding the .xcframework in xcode project, but I am getting an error "error: the use of xcframeworks is not supported in the legacy build system". I am testing this in xcode 11.3
KP26
  • 283
  • 3
  • 14
10
votes
1 answer

Failed to build module 'XXX' from its module interface while creating xcframework

Currently I am working in a framework project to distribute to a client we have. The Framework has SPM dependencies and I wanted to create an XCFramework from it. I found the scripts to archive and generate the XCFramework with the xcodebuild tool.…
Otto Cheley
  • 552
  • 9
  • 20
10
votes
0 answers

Errors in creating XCFramework using Cocoapods

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,…
vinay yedla
  • 141
  • 6
10
votes
6 answers

Embedding XCFramework in application with project framework dependencies

I have an Xcode workspace which features a project with an iOS Application target, and another project with a Framework target. The framework target is dependent on another framework, which is integrated in the form of an…
Merrick Sapsford
  • 139
  • 1
  • 1
  • 8
9
votes
1 answer

Create XCFramework out of two static libraries (libssl.a, libcrypto.a)

Consider OpenSSL, the project itself has two products: libssl.a and libcrypto.a. For the sake of simplicity, let's use the precompiled libraries stored in this repository and consider just iphonesimulator platform. When looking at the repository,…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
9
votes
1 answer

Migrating to xcframwork Xcode 12.5, dyld: Library not loaded

Environment MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) Big sur 11.3.1 Xcode 12.5 Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) Target: x86_64-apple-darwin20.4.0 Problem Up until Xcode 12.4, we used this workaround to…
infinity_coding7
  • 434
  • 5
  • 16
9
votes
0 answers

How can consumers of a custom XCFramework access the header documentation?

I'm developing an XCFramework which has a lot of good documentation (as docstrings/Markup Apple Markup Formatting Reference) for its public interface. However, when the framework is included in a client app, Xcode doesn't show any documentation when…
Beat Rupp
  • 319
  • 3
  • 12
8
votes
1 answer

How to link against the correct Framework inside a XCFramework for different platforms with xcconfig files

The situation I was just migrating to latest XCode12.4, thus I have precompiled all of my dependencies to xcframeworks. Now i am using xcconfig to link against some of these frameworks. I am having an App, that uses several precompiled…
Martin Mlostek
  • 2,755
  • 1
  • 28
  • 57
8
votes
3 answers

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

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…
NoobDeveloper
  • 101
  • 1
  • 4
7
votes
0 answers

Exclude XCFramework for simulator build

My project uses third-party xcframeworks but one of the xcframework does not support simulator which leads to building fail. Is there any way to exclude that particular xcframework from simulator build but in device build?
JohnC
  • 209
  • 4
  • 16
7
votes
1 answer

Got an Archive failed when trying "xcodebuild archive" in terminal

I have created a framework with few cocoapod dependencies .The archive for the framework is failing when i do 'xcodebuild archive' after adding the pod files (Did pod install). In the normal build, it is working fine. There is no error and the build…
Surya
  • 602
  • 5
  • 14
1
2 3
17 18