4

After agreeing to the "Upgrade to recommended settings" dialog in Xcode 7, my app build but no longer runs on the simulator. The simulator launches properly, but just sits on the home screen. Meanwhile, Xcode displays the error:

Installation Failed
Invalid Argument

jemmons
  • 18,605
  • 8
  • 55
  • 84
  • 1
    Possible duplicate of [XCode 6.1: Installation Failed "Invalid argument" when trying to run Today application extension](http://stackoverflow.com/questions/27037589/xcode-6-1-installation-failed-invalid-argument-when-trying-to-run-today-appli) – alexmorhun Nov 11 '15 at 15:07

2 Answers2

12

This happens because "Upgrade to recommended settings" will change the info.plist's CFBundleIdentifier to point to $(PRODUCT_BUNDLE_IDENTIFIER) instead of the old $(BUNDLE_IDENTIFIER).

Apple says in the Xcode 7 release notes that PRODUCT_BUNDLE_IDENTIFIER is now "the recommended place to set the Bundle Identifier for a target." So if you're using BUNDLE_IDENTIFIER anyplace else in your project, you have to change it to PRODUCT_BUNDLE_IDENTIFIER to keep things in sync.

jemmons
  • 18,605
  • 8
  • 55
  • 84
  • 1
    Yes! I checked my Product Bundle Identifier in Build Settings, and it was blank. I entered the correct value and now my project runs. Thanks for the tip! – Mike Taverne Sep 29 '15 at 22:05
0

This happened to me because somehow my info.plist wasn't selected in my target application, so you just have to go YourProject -> General, and then look for issues or missing files.

I don't remember clearly what it was that fixed the issue, but that is the last thing I remembered from what actually fixed the issue, after following the accepted answer.

CodeMouse92
  • 6,840
  • 14
  • 73
  • 130
Uffe_O
  • 11
  • 1