Add my app to tvOS app settings screen

喜夏-厌秋 提交于 2019-12-12 10:55:23

问题


How do you add app settings to tvOS like you do in iOS. I assume that just like iOS the screen below, you can add the settings for your own application


回答1:


There isn't a Settings Bundle in tvOS section in Xcode, but you can select the Settings Bundle from iOS section, it's a bit tricky but it definitely works.

1. File -> New -> File

2. iOS -> Resource -> Settings Bundle

3. Edit your Bundle Settings plist

4. Build and Run

N.B. tvOS and Xcode 7.1 now is in beta, maybe Apple will add "Settings Bundle" item in tvOS section in the stable release.




回答2:


tvOS Settings bundle is now available in the tvOS resources section:

As @pakizip explains, add this to your project and edit the Settings bundle plist file to add custom settings.

Here are the relevant documentation pages for tvOS:

tvOS Preferences and Settings

https://developer.apple.com/library/tvos/documentation/Cocoa/Conceptual/UserDefaults/Introduction/Introduction.html

Implementing an iOS settings bundle

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html



来源:https://stackoverflow.com/questions/32788821/add-my-app-to-tvos-app-settings-screen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!