Correct formatting of webcredentials app id

I have been trying to add improved tvOS login using an Associated Domain and web credentials. In some places, I am seeing that the format is <TEAM_ID>.<BUNDLE_ID>, and in other places I am seeing <APP_ID>.<BUNDLE_ID>. I am having trouble getting both to work, but in order to properly troubleshoot, I want to make sure that I am using the correct identifier. Can someone give me a definitive answer? The documentation says app id, but I have seen Apple engineers in this forum say team id, and many other posts around the internet also saying team id.

Answered by DTS Engineer in 848553022

I want to be clear about terms here:

  • A bundle ID is how the system uniquely identifies your app. It’s typically in reverse DNS format, for example, com.apple.iWork.Pages.
  • An App ID is composed of an App ID prefix and a bundle ID. For example, 74J34U3R6X.com.apple.iWork.Pages.
  • The App ID prefix is typically your Team ID, but iOS previously used to require unique App ID prefixes, where you allocate a prefix that’s different from your Team ID.

The apple-app-site-association file is expecting App IDs. There’s no ambiguity there. For any given App ID, the prefix is either the Team ID or a unique value.

There are plenty of ways to determine your App ID but my preferred option is:

  1. Using Xcode, build your app for the device.

  2. Using Terminal, dump its entitlements:

    % codesign -d --entitlements - /path/to/your.app
    
  3. Look for the application-identifier entitlement (com.apple.application-identifier for Mac apps).

If your app is currently using a unique App ID prefix, there are good reasons to convert it to use your Team ID as the prefix. However, doing that is a bit tricky if you use the keychain. See App ID Prefix Change and Keychain Access.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

I want to be clear about terms here:

  • A bundle ID is how the system uniquely identifies your app. It’s typically in reverse DNS format, for example, com.apple.iWork.Pages.
  • An App ID is composed of an App ID prefix and a bundle ID. For example, 74J34U3R6X.com.apple.iWork.Pages.
  • The App ID prefix is typically your Team ID, but iOS previously used to require unique App ID prefixes, where you allocate a prefix that’s different from your Team ID.

The apple-app-site-association file is expecting App IDs. There’s no ambiguity there. For any given App ID, the prefix is either the Team ID or a unique value.

There are plenty of ways to determine your App ID but my preferred option is:

  1. Using Xcode, build your app for the device.

  2. Using Terminal, dump its entitlements:

    % codesign -d --entitlements - /path/to/your.app
    
  3. Look for the application-identifier entitlement (com.apple.application-identifier for Mac apps).

If your app is currently using a unique App ID prefix, there are good reasons to convert it to use your Team ID as the prefix. However, doing that is a bit tricky if you use the keychain. See App ID Prefix Change and Keychain Access.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for the thorough explanation!

Correct formatting of webcredentials app id
 
 
Q