Beginner - Stuck Early On

I just started with the first book from Apple entitled "Develop in Swift Fundamentals". When trying out my first lesson to execute a simple, blank app to my iPhone, the program fails to build and gives me the following errors under Signing and Capabilities:

Failed to register bundle identifier

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

No profiles for 'com.example.Test' were found

Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.Test'.

I don't have a clue what's going on here and Apple hasn't helped me at all. Any ideas?

is this your actual app bundle identifier "com.example.Test" ? if yes you cannot use this. you need to create one without the "example" word

Every iOS app has an App ID. This consists of:

  • The App ID prefix, a 10 character sequences that typically matches your Team ID

  • The bundle ID, a reverse DNS name that identifies the app to the system

For example, one of my test apps has an App ID of SKMME9E2Y8.com.example.apple-samplecode.Test769766922, where SKMME9E2Y8 is the App ID prefix (my individual Team ID) and com.example.apple-samplecode.Test769766922 is the bundle ID.

When you create a new ap,p Xcode tries to register your app’s App ID with the developer web site [1]. For this to work the bundle ID part of the App ID must be unique [2]. Your bundle ID, com.example.Test, is unlikely to be unique because many other developers have run through this tutorial and the first one that did it has ‘claimed’ that bundle ID.

The solution is to change the bundle ID of your app to something unique. If you have an appropriate DNS name to use, set the bundle ID based on that. For example, if you’re working for Waffle Varnish Ltd, whose web site is waffle-varnish.com, you might use com.waffle-varnish.Test20210720 [3].

If you don’t have an appropriate DNS name, com.example works fine. For example, you might choose com.example.Newbee100.Test20210720.

Share and Enjoy

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

[1] It needs to do this because the App ID is a key element of the provisioning profile that lets your app run.

[2] While the App ID is used for provisioning, many other parts of the system uniquely identify the app by its bundle ID, and hence we require the bundle ID to be unique.

[3] The 20210720 identies this specific test app. That way it won’t collide with any other test apps you create in the future. Ultimately, when you settle down to write a real app, you should choose a bundle ID that makes sense for that app.

I spent a couple of hours late last night to figure out how to solve this and several other problems. Everything works now. Thanks everyone for all your help!

Beginner - Stuck Early On
 
 
Q