我可以将哪个模板用于tvOS应用系统设置,因为它不再包含在内?

问题描述 投票:4回答:1

我有一个tvOS应用程序,其中有一些设置可以设置为更改应用程序的一些参数。在旧版本的Xcode中,正如this answer指出的那样,tvOS的系统设置包有一个特定的模板。在Xcode 10中,以tvOS 12为目标,不再有这样的模板了。 documentation for System Settings说它不再被维护,但是没有与推荐的替换机制相关联。如何为他们的tvOS应用程序创建系统设置包?或者,如果不再支持这些,那么替代品是什么?

xcode tvos
1个回答
0
投票

我和Apple的某个人谈过,他告诉我,虽然文档不再更新,但它仍然是我需要的正确方法。但是,它们已经改变了它在Xcode中的表示方式。现在,您只需创建一个新文件,而不是创建新目标,在“资源”下,有一个“系统设置”文件类型:

The "New File" sheet in Xcode showing the tvOS tab with the Resource file type "System Settings" selected.

如果你选择它,它会将一个包放入你的项目中,如下所示:

The project navigator showing a bundle and its contained files newly added by Xcode

© www.soinside.com 2019 - 2024. All rights reserved.