I downloaded the app's source code from here:
https://developer.apple.com/documentation/swiftui/fruta_building_a_feature-rich_app_with_swiftui
I opened it with Xcode 13.4.1 and select the Fruta iOS target, I found the bundle id is com.example.apple-samplecode.fruta
After switching the Team config to my Person Team (signed in with Apple ID), the bundle id is automatically switched to com.example.apple-samplecode.frutaBxxxxxxxxA (suddenly a suffix BxxxxxxxxA is added)
I would like to know what it is and how to achieve that for other projects.
I want to share the source code with my friends so they are able to sign with their own Personal Team and test the project on an actual device.

The build setting for
PROJECT_BUNDLE_IDENTIFIERin this project looks like this:That variable is in turn defined in
SampleCode.xcconfig:You can get a similar behavior simply by editing a project and setting the PROJECT_BUNDLE_IDENTIFIER setting to something like
com.example.my-example-app${DEVELOPMENT_TEAM}