Is it possible to create xcframework from Xcode IDE ?

Hi,


As per documentation, we can create xcframework in 2 steps :

1: Creating archive for different platforms (example 1 for iphoneos and 1 for macosx)

2: Create xcframework using the command line option - xcodebuild -create-xcframework.


Is it possible to create xcframework from Xcode IDE similar to creating ".framework" from Xcode IDE ?


I couldn't find any utility from Xcode IDE to build xcframeworks.



Thanks and Regards,

Himanshu

Replies

This isn't possible with Xcode 11. Please file an enhancement request.

What we ended up with, run a small custom script as a pre-compile build step for each target that depends on the xcframework. The naïve approach is to check that the directory exists. It could be improved by triggering a build of the default target of the project that produces the xcframework, and proceeding to the script if that build is not nop.
Not exactly what you ask I know, but here is another alternative on the command-line, maybe you can add to your CI line even (didn't try that). It's a Command Line Tool to create XCFrameworks:

https://github.com/gurhub/surmagic

Best