For some reason I imported some files in xcode (a third party SDK), and even if the app builds successfully I receive this error: Xcode Error Message: “could not inspect application package”. What does it mean? the app doesn't run on a real device but works on a simulator IOS...
11 Answers
I faced this issue with Google Sign-in SDK. below is the fix.
- BuildPhases -> Embedded Frameworks ->Enable "Copy only when installing"

- 1,725
- 16
- 34
-
2Right on! Been pulling my hair off that one, thanks! – J. Volkya Jan 23 '21 at 18:29
-
1This did the trick for me. Thank you @UdayM – jermhern Mar 22 '22 at 06:02
When I replaced the 'Resources' folder on the xcode, by mistake the below option was selected.
Create folder references for any added folders
But the correct option should be,
Create groups for any added folders
Taking care of the above option is important point in saving time ad fixing the above issue. (It is one of the possibilities for getting this error).

- 264
- 5
- 15
-
-
So how do we fix this AFTER we accidentally replace the 'Resources' folder. It seems your answer only applies to "don't do it to begin with". It should be noted that 'clean' did not fix my issue after removing the culprit. – Levi Roberts Apr 02 '14 at 00:00
-
1@Levi Roberts, Delete the 'Resources' folder from the eclipse, then add again through 'Create groups for any added folders'. This can be done at any time. – ArunJTS Apr 02 '14 at 02:48
-
Although this stops the error for me, I need at least some of my folders added as references to keep the hierarchy with the subfolders after it is copied to the app bundle. Is there a solution to get around this? Or a way to make everything references(assuming that mixing groups and folder refs is the problem)? – Rich Fox May 22 '14 at 23:51
I was getting the same error. I resolve it by removing third party library from "embbedded binaries" list and added into the "linked frameworks and libraries".

- 1,677
- 3
- 26
- 55
In my case I was working with Cordova and Firebase. Remove all Google frameworks from Embed frameworks
(but leave them under Linked Binary With Libraries
) solve the problem.

- 108
- 1
- 2
- 9

- 17,587
- 27
- 82
- 139
-
I also have these kind of experiences, working with someone that doesn't realize what he did. Took me whole day figuring out why the app does not installed on emulator and device – Parama Dharmika Sep 29 '17 at 17:37
It sounds like the third party files 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: Aaron Brager (XXXXXXXXXX)" nameOfAppToSign.app
Replace the example identity with your own (you can man codesign
to read more about this command).
You can circumvent this by not including the compiled code. It may not be necessary - are you including an example app which isn't necessary for the framework to function?
If this answer doesn't help, providing the name of the framework and showing which files you included would be helpful.

- 65,323
- 19
- 161
- 287
-
the third party SDK is the socialize api, and it is a framework, and some files like .nib and images, it is not an app – user2014474 Jan 31 '13 at 18:21
-
Try this: In Terminal, type `sysctl kern.maxprocperuid` to see how many max processes you can have. Then type `ps ax | wc -l` to see how many are running. If you're at or above the number of processes, quit everything and restart your machine. I think that might be the reason the compilation process is failing. If that does not resolve it, please post your entire compilation log. – Aaron Brager Feb 01 '13 at 16:05
-
Actually it fixed on its own, without me doing nothing. after 3 hours it fixed. I only restarted my computer, my ipad, run the app on the simulator, and closed xcode about 20 times! – user2014474 Feb 01 '13 at 16:42
-
This might not be fully correct, since XCode will resign the XCFramework on its own regardless of previous signing status via the option 'embed and sign'. Ref: https://stackoverflow.com/a/31126203/6709940 – ImShrey Oct 11 '22 at 11:06
I was importing a framework in my bridging header that I previously removed and Xcode gave me no error I guess because I didn't call the framework anymore?
Steps:
- remove the unused/nonexistent framework for bridging header
- cmd+shift+k
- quit Xcode
- find your project's build folder and trash the contents of the Intermediates and Products folders
- open your project and run
This may be overkill but it works now. I hope this helps.

- 711
- 11
- 17
I got the same error. It was after I added a new, empty text file to my project (to keep some notes in) and named it Resources. Renaming it to Resourcesx fixed the problem but not until doing a Clean. I proved repeatedly that the filename "Resources" is a sufficient condition to cause the error.
This is the same experience of someone in Xcode Error Message: "could not inspect application package"

- 1
- 1

- 1,177
- 8
- 10
Check whether you are embedding a static library into app package. Some third party packages their static library SDK like a dynamic framework. Which is unsupported by Xcode (yet?). In that case you can be fooled and put them in "Embedded Binaries" list. Static libraries SHOULD NOT be in the list.
To check whether it is a static library, use file
utility.
file /path/to/binary/in/Example1.framework/Example1
If it says something like ar archive
it's a static library, and dynamically linked shared library
for dynamic library.

- 83,476
- 81
- 317
- 516
For me, I had specified my resources incorrectly in my podspec file. In the bundle it was including both the .storyboard
and .storyboardc
files along with the .xib
and .nibs
files etc, I changed my resources only to include the specific file extension types as apposed to a generic /**/*
s.resource_bundles = {
s.name => [s.name + '/Assets/**/*.{xib,storyboard,strings,json,otf}']
}
s.resources = [s.name + '/Assets/*.{xcassets}']
This seemed to fix the error for me

- 11,447
- 3
- 45
- 74
In case someone here is consuming bazel based xcframework in your xcode project, this might solve your issue: https://stackoverflow.com/a/74027282/6709940

- 380
- 4
- 12