aaronium112
aaronium112

Reputation: 3088

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

Upvotes: 3

Views: 8517

Answers (6)

Arun Sivakumar
Arun Sivakumar

Reputation: 146

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

Upvotes: 5

ΩlostA
ΩlostA

Reputation: 2601

In my case, the message was not corresponding precisely to the problem.
First, my Launch Screen in the General settings of the target was not good.
In second, I checked my Splashscreen.png that was missing, and I removed it. Then it worked perfectly.
I advice to check if there is an element missing in the ressource etc...

Upvotes: 0

Md. Shofiulla
Md. Shofiulla

Reputation: 2305

I have faced the same error and I figured out that I have missed to add or somehow removed GoogleService-Info.plist file from my project while I am using firebase in my application. You might be doing the same thing.

Upvotes: 3

hitesh panwar
hitesh panwar

Reputation: 36

Target > Build Settings > Packaging

In "Info.plist File" add "Target_Name/Info.plist"

enter image description here

Upvotes: 0

Dvani
Dvani

Reputation: 31

Target > Build Settings > Info plist file

Check Info.plist file path

image

Upvotes: 3

Manuel
Manuel

Reputation: 15042

It looks as if your .xcodeproj container was messed up.

Some options:

  • Make sure all targets (including tests and extensions) have the product bundle identifier set in their Info.plist files.

  • Try to set the product bundle identifier only in the target's Signing and Capabilities field instead of manually editing it in different places. Otherwise you risk introducing inconsistencies.

  • If you want to dig into project.pbxpro you could search for the PRODUCT_BUNDLE_IDENTIFIER key and manually check the entries. Compare with a fresh Xcode project on where/how you expect to find the key.

  • You can go by elimination and remove targets / custom configurations from the original project until it installs successfully.

  • Create a fresh Xcode project and move your code over.

Upvotes: 0

Related Questions