xcframework is a tool to create XCFrameworks.
You can install xcframework by downloading xcframework.pkg from the latest GitHub release and running it.
You can also install from source by cloning this project and running make install (Xcode 11.0 beta 1 or later). Note: Running make install requires sudo permission to install the final executable.
You can build from source and use the executable without installation if you prefer to. Run make installables to output the final executable to ./.build/release/xcframework. Feel free to use or copy the executable how you like.
- Create an XCFramework including a framework with iOS, tvOS, and watchOS:
xcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS --tvos PMLog_TvOS --watchos PMLog_WatchOS$ xcframework help Available commands: build Build an XCFramework help Display general or command-specific help version Display the current version of xcframework xcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS --tvos PMLog_TvOS --watchos PMLog_WatchOS --verbosexcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS --tvos PMLog_TvOS --watchos PMLog_WatchOS --output ./outputxcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS --tvos PMLog_TvOS --watchos PMLog_WatchOS --build ./buildAny arguments at the end of your command will be passed along to xcodebuild during archive.
xcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS DEBUG=1 PERFORM_MAGIC=0If you need to pass an xcodebuild argument that begins with a -, like -configuration Release, you will need to put a -- before it. -- tells this program (or tells Commandant) to stop looking for named arguments.
Without --:
$ xcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS -configuration Release Unrecognized arguments: -configuratWith --:
xcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS -- -configuration Releasexcframework build --project PMLog/PMLog.xcodeproj --name PMLog --ios PMLog_iOS -- -enableAddressSanitizer YESxcframework is released under the MIT license.