How to build a release version of an iOS framework in Xcode?

这一生的挚爱 提交于 2019-12-02 17:34:15

To get a release build, you need to change your scheme settings:

Alternatively, create a new scheme for release builds.

Ensure you have a device selected. Not the simulator.

Build your project and you should see that it gets added to this location: (Click the arrow to navigate there in finder)

And after drilling down, you should be able to find the release folder with your release framework inside.

This works for me:

Select your framework target then click Product -> Archive. If organizer window does not pop up after successfull build of your framework then go to "Build Settings" of your framework target, look for option "Skip Install" and change it to "No" (and after that Archive again).

When you add the framework to your other Xcode project then you have to add "$(BUILT_PRODUCTS_DIR)" to Build Settings -> Framework Search Paths. This will create Debug when you run project (with Debug) and will create Release version when you archive project. The archive doesn't will create Release version under Products dir but will create Release in "Intermediates.noindex" folder.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!