Search code examples
iosswiftxcodebundle

How to Ensure the apps info.plist contains a value for CFBundleIdentifier?


The app will not run on the simulator or the device but the trouble started when i went to get it on device. Running the latest and greatest Xcode and macOS. Any suggestions are most welcome.

the challenge

enter image description here

I suspect this issue is related to the unit testing targets but there is also odd behaviour in the "Signing and Capabilities", when i type in the bundle identifier "com.sw.fw" and hit enter the text in the the textfield vanishes and the "Signing (Release)" duplication appears below with that bundle id. I also created a fresh mobile provisioning profile with the appropriate bundle id com.sw.fw

I also know that Xcode is doing something with the bundle id that i'm giving it because it appears on the Certificates, Identifiers & Profiles page of developer.apple.com as can be seen here.

developer.apple.com

Here's the target signing after hitting enter.

Target Signing

Here's the "Build Settings" for the target

build settings for target

Here's my info.plist it is the same as an app i have running on device.

info.plist

Here's a unit test signing

test signing

Here's the "Build Settings" for a unit test target

test build settings

App Targets "General" pane doesn't let me type anything in the Bundle Identifier Field. You can see it reads <Multiple Values>.

enter image description here


Solution

  • check your Product Bundle Identifier from Build Settings, they might have different values for different builds. Changing the bundle identifier to be the same should solve this issue. In your case removing the 'Any SDK' under debug.

    enter image description here