如何在 Xcode 中创建 .storekit 文件?
How do I create a .storekit file in Xcode?
我目前正在尝试设置本地环境以测试 macOS 应用程序中的应用内购买。
Apple 在 https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode 的文档指出:
To create a StoreKit configuration file, launch Xcode, then choose File > New > File. In the sheet that appears, enter “storekit” in the Filter search field, select StoreKit Configuration File...
当我过滤“storekit”时,没有“StoreKit 配置文件”。
我做错了什么?我需要在 Xcode 中安装某种 SDK 或类似软件吗?
这是一个全新的功能,因此您需要最新版本的 Xcode - Xcode 12. 请同时观看 session https://developer.apple.com/videos/play/wwdc2020/10659/
我在 Catalina 10.15.5 上使用 Xcode 12.0 beta (12A6159)。
Storekit配置文件找到了,我可以创建和配置它了。
但是Scheme -> 运行 -> Option 没有显示在macOS 项目上执行本地测试的选择选项,而是只在IOS 项目上显示。
在苹果文档中,StoreKit 测试框架被标记为 macOS 11.0+
Apple Dev Forum 上的评论表明此菜单出现在 macOS 项目的 Big Sur 配置上,但 Xcode 仍然连接到 Sandbox。尚未在大苏尔尝试过。
有一件事会绊倒人:
如果您正在使用 Swift 包,并且您有任何源文件或目录来自在项目导航器中选择的包,那么 File->New->File
sheet 中可用的类型是更受限制。
Select iOS 项目,或其中的一个组,那么 File->New->File
将包含 StoreKit 配置文件 选项。
我目前正在尝试设置本地环境以测试 macOS 应用程序中的应用内购买。
Apple 在 https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode 的文档指出:
To create a StoreKit configuration file, launch Xcode, then choose File > New > File. In the sheet that appears, enter “storekit” in the Filter search field, select StoreKit Configuration File...
当我过滤“storekit”时,没有“StoreKit 配置文件”。
我做错了什么?我需要在 Xcode 中安装某种 SDK 或类似软件吗?
这是一个全新的功能,因此您需要最新版本的 Xcode - Xcode 12. 请同时观看 session https://developer.apple.com/videos/play/wwdc2020/10659/
我在 Catalina 10.15.5 上使用 Xcode 12.0 beta (12A6159)。 Storekit配置文件找到了,我可以创建和配置它了。
但是Scheme -> 运行 -> Option 没有显示在macOS 项目上执行本地测试的选择选项,而是只在IOS 项目上显示。
在苹果文档中,StoreKit 测试框架被标记为 macOS 11.0+
Apple Dev Forum 上的评论表明此菜单出现在 macOS 项目的 Big Sur 配置上,但 Xcode 仍然连接到 Sandbox。尚未在大苏尔尝试过。
有一件事会绊倒人:
如果您正在使用 Swift 包,并且您有任何源文件或目录来自在项目导航器中选择的包,那么 File->New->File
sheet 中可用的类型是更受限制。
Select iOS 项目,或其中的一个组,那么 File->New->File
将包含 StoreKit 配置文件 选项。