Communication with Apple failed.

I am trying to learn Swift in Xcode. I am using a SampleTrips project in order to use an SQLite database. Trouble is I don't know anything, I don't even now if I'm in the right forum. I muddled through a configuration but am stuck at this error:

I don't know what any of this means or why it's necessary to learn Swift. Can anyone explain?

Answered by DTS Engineer in 894222022

There are two messages listed there. The second is a direct consequence of the first, so lemme explain that.

On Apple platforms app groups are identified by an app group ID and each app group ID is associated with one specific development team. In this case the app group ID is group.com.example.apple-samplecode.SampleTrips and its owned by an Apple Team ID (one we use for creating sample code). When you try to build the project with Xcode, it attempts to register that app group ID with your development team. That fails, because the app group ID is already in use, and hence you get this error.

The solution is to pick a different app group ID. For example, you might change it to group.com.example.apple-samplecode.SampleTrips-TEAM_ID, where TEAM_ID is your Team ID.

If you make this change, make sure that you also change any other instances of the app group ID, for example, in calls to containerURL(forSecurityApplicationGroupIdentifier:). AFAICT the SampleTrips sample doesn’t actually do that, so there might be no change necessary here, but I recommend that you double check.

Finally, I’d appreciate you filing a bug against the sample. Sample code typically use the SAMPLE_CODE_DISAMBIGUATOR to avoid ID clashes like this, and we should investigate whether it’s possible to update SampleTrips to do that in this case as well.

Please post your bug number, just for the record.


Oh, and the above is my response to your first question. For your second, you need to navigate to the Signing & Capabilities editor for your widget target (SampleTripsWidgetExtension) and select your team from the Team popup.

Share and Enjoy

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

I am trying to run a SampleTrips project but getting this configuration error:

Can anyone tell me what this means and why I need it to run a sample project?

There are two messages listed there. The second is a direct consequence of the first, so lemme explain that.

On Apple platforms app groups are identified by an app group ID and each app group ID is associated with one specific development team. In this case the app group ID is group.com.example.apple-samplecode.SampleTrips and its owned by an Apple Team ID (one we use for creating sample code). When you try to build the project with Xcode, it attempts to register that app group ID with your development team. That fails, because the app group ID is already in use, and hence you get this error.

The solution is to pick a different app group ID. For example, you might change it to group.com.example.apple-samplecode.SampleTrips-TEAM_ID, where TEAM_ID is your Team ID.

If you make this change, make sure that you also change any other instances of the app group ID, for example, in calls to containerURL(forSecurityApplicationGroupIdentifier:). AFAICT the SampleTrips sample doesn’t actually do that, so there might be no change necessary here, but I recommend that you double check.

Finally, I’d appreciate you filing a bug against the sample. Sample code typically use the SAMPLE_CODE_DISAMBIGUATOR to avoid ID clashes like this, and we should investigate whether it’s possible to update SampleTrips to do that in this case as well.

Please post your bug number, just for the record.


Oh, and the above is my response to your first question. For your second, you need to navigate to the Signing & Capabilities editor for your widget target (SampleTripsWidgetExtension) and select your team from the Team popup.

Share and Enjoy

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

Communication with Apple failed.
 
 
Q