“Installation Failed: Invalid Argument” after moving to Xcode 7

回眸只為那壹抹淺笑 提交于 2020-01-14 10:33:24

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/32510153/installation-failed-invalid-argument-after-moving-to-xcode-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!