Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My iOS app has a + in its name. Bundle is invalid due to this. Need help resolving

I did find a couple of very similar or identical threads here but they seemed to end before full resolution.

My app runs fine on my device with no build error. I am trying to submit app for approval and I get the following error, "This bundle is invalid. The executable name, as reported by CFBundleExecutable in the info.plist file may not contain any of these characters ..... +". So I opened my info.plist file and changed the info.plist file executable name from the macro ${EXECUTABLE_NAME} to the name of my app without the +. I did a new archive but then get an error saying the "codesign failed with exit code 1".

In another thread I read to just change targets name removing the + from there and leaving the info.plist file with the macro for the executable name, restarting Xcode and then archiving again. That allowed me to archive but I received the same error in iTunes Connect.

I have been working on this all day and don't find the solution. Can anyone please point me in the right direction? Thank you for any help.

like image 508
d.altman Avatar asked Feb 03 '23 11:02

d.altman


2 Answers

You have to change ${PRODUCT_NAME} in Build Settings. And you have to set name for display at Bundle Display Name in Info.plist.

See here for more details: Bundle Name, Executable Name, Product Name...anything else?

like image 55
eonil Avatar answered Feb 05 '23 01:02

eonil


There are a few different ways to make this work but this seems like the easiest/fastest

  • First change the "Product Name", so that it does not contain any special characters - how to change Product Name
  • Next, I changed the "Bundle display name" (CFBundleDisplayName) and "Bundle name" (CFBundleName) in my Info.plist to be hardcoded to have the '+' in it rather than referencing the ${PRODUCT_NAME} variable.
  • If you have already created app and distribution profile in iTunesConnect then you should also change the "Bundle identifier" in Info.plist - hardcode it to whatever you entered in iTunesConnect rather than xxx.${PRODUCT_NAME:rfc1034identifier} variable (iTunesConnect bundle identifier is shown in an error message if you try to build an archive before changing it)
  • Finally, build your app and Apple should not complain about the character when you validate. Your app should still show up with the '+' sign on the homescreen when you run on a device because of the hardcoded bundle keys.

Clean your simulator and device

  • If building for iOS Simulator won't work after that ("error: failed to attach to process ID 0" message) then go to "IOS Simulator" menu bar and click "Reset Content and Settings…"
  • If running on your device doesn't work after that then delete the app from your iPhone/iPad and run it again

I left the Executable name as-is in the Info.plist because the ${EXECUTABLE_NAME} variable it references by default is comprised of the ${PRODUCT_NAME} and a couple of other variables that I did not want to mess with.

thanks to Nathan Welch who's answer was basis for this tutorial

like image 37
Andres Jakobson Avatar answered Feb 05 '23 00:02

Andres Jakobson