iosxcodesamplebuild-errorxcconfig

How to fix the error: 'The app identifier "com.example.apple-samplecode.BreakfastFinder" cannot be registered to your development team.'


When I try to build the BreakfastFinder Sample Code from Apple, it will build it for Simulator but not for my iPhone X with IOS 13(Public Beta 3).

I tried Unpair and repair the Device, switching the identifier from "com.example.apple-samplecode.BreakfastFinder" to com.<myID>.TestApp2

Downloaded the Project Sample from here: https://developer.apple.com/documentation/vision/recognizing_objects_in_live_capture

and only after a crash I changed the Build Identifier.

I expect the Build to Finish and Run, but it gave me these errors. Both Errors from Xcode:

  1. Failed to register bundle identifier. The app identifier "com.example.apple-samplecode.BreakfastFinder" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
  2. No profiles for 'com.example.apple-samplecode.BreakfastFinder' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.apple-samplecode.BreakfastFinder'.

Solution

  • In the project directory, look for the file Configuration > SampleCode.xcconfig

    In there you'll see on line 13:

    SAMPLE_CODE_DISAMBIGUATOR=${DEVELOPMENT_TEAM}
    

    Replace ${DEVELOPMENT_TEAM} with your own team name

    SAMPLE_CODE_DISAMBIGUATOR=your_team_name
    

    That worked for me