Bundle Identifier for Device Testing

I’m working through the “Develop in Swift Fundamentals” with Xcode 13 book. At this point I’m trying to set up my iPhone as as a testing device. I’ve turned on developer mode on the phone, but when I select my iPhone from the Scheme menu, I receive 2 errors referencing my Bundle Identifier:

  1. Failed to register bundle identifier. The app identifier "com.example.GettingStarted" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.

  2. No profiles for 'com.example.GettingStarted' were found. Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.GettingStarted'.

I am not sure why that bundle identifier is not available. Any thoughts on how to proceed?

Answered by Scott in 744402022

"com.example.GettingStarted" cannot be registered to your development team

Are you using the actual bundle prefix com.example or are you just redacting your real domain name in order to post the question in the forum?

Accepted Answer

"com.example.GettingStarted" cannot be registered to your development team

Are you using the actual bundle prefix com.example or are you just redacting your real domain name in order to post the question in the forum?

Unfortunately I accidentally marked the problem as resolved, and there is no way to undo that action…

I am using the com.example bundle prefix as that was recommended in the Fundamentals book. Should I be using something more distinct?

Unfortunately I accidentally marked the problem as resolved, and there is no way to undo that action

Indeed. I was gonna say that fixing that was on the to-do list but I can’t actually find a bug number for it. So I’d appreciate you filing a bug against DevForums itself and then posting the bug number here, just for the record.

Should I be using something more distinct?

Yes and no. Using something in the com.example. namespace is fine. However, you can’t use exactly com.example.GettingStarted because someone else has already registered that. So instead:

  • Use a namespace that’s appropriate for your organisation. If, say, you’re working for Waffle Varnish Inc, whose website is http://wafflevarnish.com, use com.wafflevarnish.GettingStarted.

  • Use add a label that’s unlikely to collide. For example, I might use com.example.eskimo1.GettingStarted.

Share and Enjoy

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

Thanks for the response. If I could mark this as the one that solved my issue, I would. 😄 I used com.firstnamelastname.GettingStarted, which allowed me to put the test app on my personal device. Such a simple fix but not clear in the Swift Fundamentals book. Thanks again.

bug number: FB11985650

Bundle Identifier for Device Testing
 
 
Q