使用 SwiftUI iOS 应用程序时,我可以通过使用插入的设备运行应用程序项目,轻松在 iPhone 上部署或生成应用程序。
但是,在使用 macOS 应用程序时,我注意到无论我运行该项目多少次,该应用程序都不会在我的 Mac 上生成或部署。
如何直接在我的 Mac 上生成或安装 macOS 应用程序?
How can I generate or install the macOS app directly on my mac?
.
在 Xcode 中,转到
Product
菜单,然后 Archive -> Distribute App -> Copy App -> Export As: MyApp
转到所选文件夹,您的应用程序就在那里,双击它。
2024 年 10 月:复制应用程序可以在“自定义”选项中找到,这是提供的 4 个选项中的最后一个......