How to make XCFramework / Fat Framework in Xcode

In the past, we, as iOS framework authors, used to build Fat .Framework file to distribute.

After WWDC2019, we can now build the Framework file with .xcframework extension using this script:

Make a new target “Aggregate” on the Cross-Platform tab, and put the above script in the Build Phrase by adding a Run Script. Then you can start archiving you XCFramework ;)

“Aggregate” target on the Cross-Platform tab
Run Script on the new target

FYR, this is the previous script to build and combine simulator and device’s framework file.

Legacy script for building Fat Framework

That’s it.

Happy coding and I wish you a great day ;)

Feel free to find me on Twitter https://twitter.com/rick3817

#xcode #archive #build #iOS #wwdc #wwdc2019 #framework #fatframework #library #dynamicframework #swift

--

--

Hi this is Rick from Hong Kong. I am a native iOS and Android mobile developer and also a tech enthusiast. Find me on Twitter https://twitter.com/rick3817

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rick_HK

Hi this is Rick from Hong Kong. I am a native iOS and Android mobile developer and also a tech enthusiast. Find me on Twitter https://twitter.com/rick3817