What is the correct configuration of the Info.plist to get a UISceneAccessory to display on an external monitor?
I'm currently getting:
Info.plist contained no UIScene configuration dictionary (looking for configuration named "scene-accessory")
My Info.plist looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleExternalDisplayNonInteractive</key>
<array>
<dict>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).AccessorySceneDelegate</string>
<key>UISceneConfigurationName</key>
<string>scene-accessory</string>
</dict>
</array>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>
And the view controller scene registration code:
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let sceneConfiguration = UISceneConfiguration(name: "scene-accessory")
let accessory = UISceneAccessory.externalNonInteractive(sceneConfiguration: sceneConfiguration)
let registration = registerSceneAccessory(accessory)
registration.isEnabled = true
}
}
Thanks!
Topic:
UI Frameworks
SubTopic:
UIKit
1
0
46