如何在Xcode中构建iOS框架的发行版? [英] How to build a release version of an iOS framework in Xcode?
问题描述
假设我执行以下操作:
- 打开Xcode 7
- 文件|新增|项目|可可触控框架
- 使用Swift语言创建"TestFramework"
- 使用公共函数hello(){print("Hello")}创建文件Hello.swift.
从这里,我可以构建框架的调试版本(在Debug-iphoneos文件夹中),但是我无法弄清楚如何构建框架的发行版(在Release-iphoneos内部).我以为Archive可以做到,但事实并非如此.请问指针?
From here, I can build a debug build of the framework (inside the Debug-iphoneos folder), but I cannot figure out how to build the release version of the framework (inside Release-iphoneos). I thought Archive might do it, but it doesn't. Pointers please?
推荐答案
要获取发布版本,您需要更改方案设置:
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.
构建您的项目,您应该看到它已添加到以下位置: (单击箭头在Finder中导航到那里)
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.
这篇关于如何在Xcode中构建iOS框架的发行版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!