How to build a release version of an iOS framework in Xcode?(如何在 Xcode 中构建 iOS 框架的发布版本?)
问题描述
假设我做了以下事情:
- 打开 Xcode 7
- 文件 |新 |项目 |Cocoa Touch 框架
- 使用 Swift 语言创建TestFramework"
- 使用 public func hello() { print("Hello") } 创建一个文件 Hello.swift.
从这里,我可以构建框架的调试版本(在 Debug-iphoneos 文件夹内),但我不知道如何构建框架的发布版本(在 Release-iphoneos 内).我认为存档可能会这样做,但事实并非如此.请指点?
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.
构建您的项目,您应该会看到它已添加到此位置:(单击箭头在查找器中导航)
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 框架的发布版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Xcode 中构建 iOS 框架的发布版本?


基础教程推荐
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- LocationClient 与 LocationManager 2022-01-01