Xcode: Could not inspect the application package

IosObjective CXcodeMacos

Ios Problem Overview


I am running Xcode 6 and iOS 8 GM. Every other time I run my app I get this message from Xcode:

> "Could not inspect the application package"

So I can run and build, I will get the message. I run and build again, everything runs as expected (this is to my device). Then it will rinse and repeat, every other time giving me this error.

I have looked at all the other solutions that have been suggested but cannot stop this error. I have cleaned my project, cleaned the build folder, deleted derived data etc with no luck.

How can I see what is causing this in the first place?

Interestingly, this only happens when running on my device. Not on the simulator. Also, it only happens on my device, when building for debug. If I change the scheme to release, I can build and run endlessly without with error. Ideas?

Ios Solutions


Solution 1 - Ios

This error seems to happen when you have third party code which isn't signed by you in your bundle. Check this thread, it helped me once.

Also when performing build clean opt for cmd + option + shift + k.

Solution 2 - Ios

This can happen with Xcode 6 and iOS 8 if a product name contains non-latin characters. In this case changing product name to the one with only latin characters for debug builds fixes this problem.

Solution 3 - Ios

> Try to remove some libraries from your Xcode => Click on Target => General tab => Embedded Libraries (Keep only required libraries or Framework) > > Here, remove (Use - sign on bottom to delete). > > If you require the framework or libraries that you deleted, add this using Xcode => Click on Target => General tab => Linked framework and Libraries (Use - sign on bottom to add this).

This will work.

Solution 4 - Ios

In my case, I needed to check the option that says "Copy only when installing" under "Build Phases/Embed Frameworks" in one of the frameworks I was embedding.

Solution 5 - Ios

If you have moved or copied a folder named resources or resource into your project, try renaming it. Then perform a clean.

Solution 6 - Ios

I got this when a custom built .framework was missing its Info.plist.

Solution 7 - Ios

I deleted my Info.plist and I dragged a new info.plist into my project. Xcode did not show me any warning but my app would not launch until i changed the name to Info.plist.

Solution 8 - Ios

I've seen this error before when there is something in the entitlements file but is not enabled for the app id in the provisioning centre.

Specifically I had HealthKit enabled in the entitlements file but not configured for the application identifier.

Solution 9 - Ios

I had a potentially similar problem, hardware only, when I had an app which was given entitlement to run in the background and had run previously on the phone. For such apps, I found the Xcode deployment to phone broken and had to change the bundle identifier to unjam the deployment.

Solution 10 - Ios

I think there are third party files in your code, which might include compiled code which is not signed by you. If so, you can use iReSign to resign them using your own certificate. You can also use the command line:

 codesign -f -s "iPhone Developer: Name (XXXXXXXXXX)" nameOfAppToSign.app

Replace the example identity with your own (you can man codesign to read more about this command).

Solution 11 - Ios

I had the same issue, And was unable to install the ipa. It always ended with an error "Could not inspect the application package." and some warnings in device console

Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: Please include the kCFBundleIdentifierKey in the options   dictionary when installing an app.
Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: installing app with unknown bundleID
.
.
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 -[MIBundle _validateWithError:]: 28: Failed to load Info.plist from bundle at path
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 + [MIInstallable installablesAtURL:packageFormat:userOptions:error:]: Failed  to create bundle for …

After spending hours, I got it fixed by adding the "Application requires iPhone environment" in info.plist

<key>LSRequiresIPhoneOS</key>
<true/>

Solution 12 - Ios

Found a solution by adding the Framework to General -> Linked Frameworks And Libraries and setting the status to optional. (Leave the embedded binaries blank)

Solution 13 - Ios

deleting Pods and then calling pod install worked for me

Solution 14 - Ios

Mine turned out to be something to do with Apple's certificates and such. I was working between two different computers and I think something went amiss. So I had to revoke my developer certificate at the Apple iOS dev site, and request a new one with a private key etc. Once the new certificate was installed, the message went

Solution 15 - Ios

For my case, it was file missing in a newly added *.framework. One *.plist file and "_CodeSignature" folder were missing in that *.framework. Replacing corrupted *.framework file fixed my issue.

Solution 16 - Ios

http://www.developersalley.com/blog/post/2015/11/13/How-To-Fix-App-installation-failed-Could-not-inspect-application-package-Error-When-Installing-App-In-XCode.aspx

This link saved my life, I use the XUPorter plugin, the added folder has a plist file, which is my SDK provided to me

Solution 17 - Ios

Change the Display name in Targets > General > Identity

Build your app and switch back to your old name.

It worked for me

Solution 18 - Ios

I had the same issue, and the problem was that I had an alias in the xCode project. I removed it and it works.

Solution 19 - Ios

You can try following steps: Window->Projects and look for your project and delete 'Derived Data' for all your projects with the same name

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJosh KahaneView Question on Stackoverflow
Solution 1 - IosMarcos CurvelloView Answer on Stackoverflow
Solution 2 - IosborisgolovnevView Answer on Stackoverflow
Solution 3 - IosRoney FrancisView Answer on Stackoverflow
Solution 4 - IosDaniel MolinaView Answer on Stackoverflow
Solution 5 - IospiccianoView Answer on Stackoverflow
Solution 6 - IosDan FieldView Answer on Stackoverflow
Solution 7 - IosYannickView Answer on Stackoverflow
Solution 8 - IosearltedlyView Answer on Stackoverflow
Solution 9 - IosFaisal MemonView Answer on Stackoverflow
Solution 10 - IosRamya YenduriView Answer on Stackoverflow
Solution 11 - IosBilalView Answer on Stackoverflow
Solution 12 - IosLewis HotchenView Answer on Stackoverflow
Solution 13 - Iosjbart12View Answer on Stackoverflow
Solution 14 - IosaeldronView Answer on Stackoverflow
Solution 15 - IosDareDevilView Answer on Stackoverflow
Solution 16 - IosLiu HaoView Answer on Stackoverflow
Solution 17 - IosmattyUView Answer on Stackoverflow
Solution 18 - IosArnaudView Answer on Stackoverflow
Solution 19 - IosShen YuView Answer on Stackoverflow