NSApplicationServices
A list of service providers and the devices that they support.
Discussion
Use this key to define which devices DeviceDiscoveryUI can connect with. The application services’s Browses key takes an array of dictionaries, where each dictionary contains a unique identifier, a usage description string, and a list of supported operating systems. You can define more than one application service for your apps. Each service has its own identifier, and can connect to a different subset of devices.
Set these in your tvOS app target’s Info tab, or in its Info.plist file.
<key>NSApplicationServices</key>
<dict>
<key>Browses</key>
<array>
<dict>
<key>NSApplicationServiceIdentifier</key>
<string>MyApp-Controller</string>
<key>NSApplicationServiceUsageDescription</key>
<string>You can control this app using an iOS device.</string>
<key>NSApplicationServicePlatformSupport</key>
<array>
<string>iOS</string>
<string>iPadOS</string>
</array>
</dict>
<dict>
<key>NSApplicationServiceIdentifier</key>
<string>MyApp-Workout</string>
<key>NSApplicationServiceUsageDescription</key>
<string>Connects to a watchOS app to read heart-rate and active calories burned from a workout session.</string>
<key>NSApplicationServicePlatformSupport</key>
<array>
<string>watchOS</string>
</array>
</dict>
</array>
</dict>
NSApplicationServiceIdentifierA string that identifies your application service. You can use any string for your service, but you must use the same string for both your tvOS app and the iOS, iPadOS, and watchOS apps.
NSApplicationServiceUsageDescriptionA string that describes why you want to access the other devices. This is displayed to the user in the picker view.
NSApplicationServicePlatformSupportThis is an array that contains strings representing the types of devices your application service can connect to. The valid values are
“iOS”,“iPadOS”, and“watchOS”.
You can use the human-readable key names in Xcode’s property list editor.
[Image]
In the iOS, iPadOS, or watchOS app, use the Advertises key, and give it an array of dictionaries where each dictionary lists the application service identifier for the connection types supported on this platform.
<key>NSApplicationServices</key>
<dict>
<key>Advertises</key>
<array>
<dict>
<key>NSApplicationServiceIdentifier</key>
<string>MyApp-Workout</string>
</dict>
</array>
</dict>
You can use the human-readable key names in Xcode’s property list editor.
[Image]