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 框架的发布版本?
基础教程推荐
- Android Volley - 如何动画图像加载? 2022-01-01
- iOS - UINavigationController 添加多个正确的项目? 2022-01-01
- navigationItem.backBarButtonItem 不工作?为什么上一个菜单仍然显示为按钮? 2022-01-01
- 如何将图像从一项活动发送到另一项活动? 2022-01-01
- Xcode UIView.init(frame:) 只能在主线程中使用 2022-01-01
- 如何比较两个 NSDate:哪个是最近的? 2022-01-01
- SwiftUI-ScrollViewReader的ScrollTo不滚动 2022-01-01
- Play 商店的设备兼容性问题 2022-01-01
- UIImage 在开始时不适合 UIScrollView 2022-01-01
- 为什么姜饼模拟器方向卡在应用程序中? 2022-01-01
