Installing IPA results in error "A signed resource has been added, modified, or deleted" - iphone

I've recently stumbled upon a rather odd problem with Xcode which occurs when I build an IPA and attempt to install it, I've tried installing using Xcode, iTunes and iPhone Config Utility, all of which give the same error
A signed resource has been added, modified, or deleted.
I can successfully debug the app on my phone using XCode, it's only when I try to install an IPA I see the error.
I've tried unzipping the IPA and running the codesign validation tool which throws up the following response:
a sealed resource is missing or invalid In architecture: armv7
resource missing:
/Users/dev1/Documents/PoleTester.app/Settings.bundle/._Root.plist
This led me to look at the Settings.bundle file and ensure that it's being included in the build, which it is. Interestingly though, if I remove the Settings.bundle file, build an IPA and attempt to install it on my iPhone the install succeeds, however this of no use as I need the Settings.bundle file installing with the app.
Further investigations on some of my previous XCode projects has shown that I can build an IPA, with the Settings.bundle file included, and successfully install it. However, if I make a simple change to the Settings.bundle file, such as adding or removing a row, build an IPA and then attempt to install it I get the
"A signed resource has been added, modified, or deleted" error.
I'm at a bit of a loss as to what's causing this error and why the Settings.bundle file is causing the install to fail.
Has anyone seen this error before or potentially shed some light on what's causing it?
I'm using Xcode 4.6.3 and an iPhone 4 running iOS 6.1.3.

Clean Build Folder (⌘⌥⇧-K) has resolved this for me 3 out of 3 times.

I just ran into this issue using Xcode 6 beta 6 installing to my iPhone 5 running iOS 8 beta 5. The app I'm building uses a Today extension (aka widget).
It appears the issue stemmed from my having not set up dependencies properly. I have a third party framework (Alamofire) set up as part of the project as a dependency of the overall project, but not as a dependency of the today widget. I could build fine but when installing to device I would get this "signed resource has been..." error.
By adding Alamofire as a dependency of the Today widget this resolved the issue.

It's a bit late but I ran into the exact same issue today with Xcode 5.0.1.
According to https://developer.apple.com/library/ios/technotes/tn2318/index.html, "the resource missing: my.app/..*" error could be caused by:
The file prefixed with "._" is considered an AppleDouble file and it can result from copying the uncompressed Xcode project folder onto a non-HFS+ formatted disk. The AppleDouble files must be removed using the 'dot_clean' command. The Xcode project folder is the argument to dot_clean as illustrated below.
Steps I did to resolve this:
Close Xcode
Run "dot_clean /path/to/My_Xcode_Project" in Terminal
Open Xcode again and make a new build
Oddly enough most of these _* files don't seem to cause any issues except those inside Settings.bundle (Nearly every file in my directory had one, but only after I added Settings.bundle, the IPA failed to install).

I also faced the same issue and this post solved my problem:
http://code-ninja.org/blog/2012/04/17/signed-resource-has-been-added-modified-or-deleted/
It turns out that the problem was caused by having special character in the product name – in my case, a ?. Removing the ? from the product name fixed the problem.

In my case, what helped was adding a bash script into build phases (just before "compile sources"):
find ~/Library/Developer/Xcode/DerivedData -name "YouAppName.appex" | xargs -I % find % -type f -maxdepth 1 | xargs rm
What this script does, is to clean files in project's appex dir (e.g. assets), but leaving sub-directories (e.g. compiled storyboard). In effect, using this script while building is much faster to execute than full project clean.

Related

No such module 'IQKeyboardManagerSwift'

New to Xcode (dabble a little). I paid a developer to build an iOS app for me. He sent me the source code and I have opened it in Xcode 13.2.1. I needed to edit the info.plist to include a description why location was required (got this done). When I try to run the build, I get the error 'no such module 'IQKeyboardManagerSwift'. In AppDelegate, I see 'import IQKeyboardManagerSwift --- No such module 'IQKeyboardManagerSwift'. I went to the Podfile directory and ran 'pod install'. Output says:
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 7 dependencies from the Podfile and 8 total pods installed.
I'm still getting the error when trying to run the build. I tried cleaning the build folder and running the build again but still, same error. What am I missing?
I'm not sure why this happens, but one way to solve your issue is to go into your build settings and define the Framework Search Paths to a folder that contains the frameworks in question. If the frameworks are placed in your project directory, simply set the framework search path to $(SRCROOT) and set it to recursive.
Is the codebase completely in Swift?, else you will have to include import in the Bridging header file
If in swift you can try:
Select project name -> Select Build Settings(tab) and search Framework Search Paths double click and set the desired path($(SRCROOT)) to recursive
The missing module handles a number of keyboard behaviors so you don't have to reinvent that wheel. Check out the developer's website and get it for yourself. I've been using it for years. The developer has helped me more than once get past some obstacles.

Target Integrity - The file "Pods-ios.xcconfig" couldn't be opened because its path couldn't be resolved. It may be missing"

I'm trying to utilize the four Examples that ship with RestKit Version 0.20.1 Currently trying to Build RKSearchExample. The Build "succeeds" but no simulator appears and I get two warnings
1st one - Target Intergrity - The file "Pods-ios.xcconfig" couldn't be opened because there is no such file. ....
2nd one - Target Integrity - The file "Pods-ios.xcconfig" couldn't be opened because its path couldn't be resolved. It may be missing"
I assume that this file is missing and even though the Build succeeds with only warnings, it missing is causing the project to not actually complete its Build.
Does anyone have any idea where to find this file? Has one built the Examples included in RestKit successfully?
Thanks!
Came across same problem. Solved it by
Make sure .pch file is updated and missing frameworks are added to Build Phases (See 'Adding Frameworks to the Precompiled Header File' in https://github.com/RestKit/RestKit/wiki/Installing-RestKit-v0.20.x-via-CocoaPods)
Close the workspace, re-run '$ pod install' in the project directory,
Re-open the project (using .xcworkspace), do a Clean and Build.
Hey i had this same problem, I was getting the following error when running pod update however i didn’t realise the update wasn’t working.
$ pod update
Analyzing dependencies
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory
It was because I forgot to run "pod setup" after installing cocoapods.
I ran pod setup from the terminal, followed it up with pod update (or pod install) and everything went to plan.

Xcode codesigning fails every other build

My iPhone project fails to build every other time and gives me the following info:
CodeSign build/Debug-iphoneos/coati.app
cd /Users/rpeck/Documents/Coati
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: Ryan Peck (6VVQHFN5NU)" --resource-rules=/Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app/ResourceRules.plist --entitlements /Users/rpeck/Documents/Coati/build/Coati.build/Debug-iphoneos/Coati.build/coati.xcent /Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app
/Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1
The first time I build it always fails. The second time succeeds, even if I've made changes to the files between the builds. If I clean the target, the next build will always fail.
This is all in debug mode. In release mode the builds fail the same, but the successful builds always say "Failed to load" when installing onto the phone. I checked that the provisioning profile matches and is selected.
I've found one similar question where the answer turned out to be multiple Info.plist files in the project. I've looked mine over completely and there is no extra Info.plist file. I've also removed and reinstalled my provisioning profiles.
The other answers I've seen for this error involved defining the path for the ResourceRules.plist file. I've tried the solutions presented in those cases with no success.
Right now it's more of an inconvenience than anything since the second time I build it works fine. I'm more worried that down the line when I'm ready for a distribution build it will give me problems, especially since the release build configuration won't install to the phone.
All of this started after a problem with a mercurial commit when I did not pay attention to the fact that xCode was open. It corrupted my project file, and while all the source was fine, when I created a new project and then brought in all of my old source files this problem cropped up.
Ok, I gave starting over from scratch with a new project a try again. This time I added back my source in chunks trying to isolate any issues. Some of the files created by the project template had to be modified by hand instead of just replaced. It seems to be working fine now though.

Receive message "A signed resource has been added, modified, or deleted" when trying to debug an App on iPhone

While attempting to debug a build created using the 3.2 SDK on an iPhone device I receive the message "A signed resource has been added, modified, or deleted.".
I can clean, rebuild, then install with no error, but if I try to install without cleaning the error shows.
Anyone have an idea as to what might be causing this?
I found a workaround for the bug.
If you delete the .app file in build/Debug-iphoneos/ before building for the device, the app gets installed without errors.
And there is a simple way to do that before every build.
Make sure you have selected "Device" in the dropdown overview menu.
In XCode go to Project > New target...
Then find "Shell Script target" under MacOSX/Other
Name it and add it to the current project
Now, in the left navigation panel, under targets, expand your newly created target and double-click on Run Script.
In the window that opens replace "# shell script goes here" with "rm -fr build/Debug-iphoneos/*.app" (without the quotes).
Now open your main target preferences and under Direct Dependencies add your newly created target.
Build and Go! :)
This error occurs when there is a special character in the Product Name. In my case it was a "?"
If you change the Product Name it automatically updates the "Bundle Name" and "Bundle Display Name" so it is often the best choice to rename an app.
If you want to include special characters in the app name you have to manually rename the "Bundle Name" and "Bundle Display Name"
Bundle Name: This is the actual app bundle name in the file system such as "Awesome App.app". It is generally not visible to the user.
Bundle Display Name: This is a short name displayed under the app icon on the device. Since the bundle name would be truncated to "Awes…tion" you have the option to have a shorter name which fits better such as "Awesome App". It should be similar to the App Store name (set in iTunes Connect)
This is pretty clearly a bug in the 3.2 SDK, but I don't want to downgrade. I've found that doing a Clean by pushing Command+Shift+K, then Return is pretty fast before pushing Command+R to build.
Xcode 8, reason of the "A signed resource has been added, modified, or deleted." was that target was signed with an enterprise provision profile.
In my case, it happened when no changes were made. Make a change to any file and run again.
This can have several causes. The fastest way to figure out what is causing it is to go into Xcode, Window menu, Devices, then click the reveal button at the bottom of the pane to show the Console. Now attempt to run. You should see log output that names the specific files it is complaining about.
Most of the solutions previously posted are just artificial ways of getting Xcode to regenerate the contents of the build folder and/or re-sign the files.
In my case, my WatchKit extension was somehow acquiring references to Cocoapods frameworks that were only targeted toward the main app so they got signed during the build, then pruned later (as they were not used). Then on device, iOS complained that they were missing from the .appex folder for the extension. I ended up not needing any pods in the extension so I just removed them all and removed the extension as a target, then did some minor cleanup to remove the pod-related debris left in the build steps. Now everything works perfectly.
(SOLVED) This is a weird one. I tried everything I could find. Eventually I changed the product name from "Unit Tests (device)" to "Device Unit Tests" - removing the brackets. Now everything works. The spaces in it appear to be fine.
Previously on stackoverflow:
I've just run into this bug with two static library projects. One builds and tests using the GHUnit test runner on the device without a problem. The other projects will not install and gets this error. That means it's something thats different between these two projects. I've so far tried wiping the build directory, taking spaces out of the executable name, and various clean and builds as suggested here.
Same for me, thought it has something to do with multiple targets etc. because I changed a lot there. But it's highly possible that it's a Bug in the 3.2.2 release since I did not test extensively in this sdk version before the massive target changes in my project.
solved my issue!!!
I found out by accident that somehow a space " " found it's way into the Product Name of my app so it was called "First Second.app" instead of "FirstSecond.app". After deleting the space the issue was gone!
I changed it here:
right click on target
Get Info
Build Tab
Packaging Section
Product Name <- The name here will be used for the bundle (.app) name
Hope this helps, let me know!
Cheers,
nils
I could solved by changing project name.
[project]-[Rename] menu. "phase1 (new)" -> "pahse1"
I was getting this same error, but intermittently. I tried all the above and it still didn't work. Today I found what was causing it.
The error seems to occur when editing a xib in interface builder. If you try to run while the interface builder is open in xcode it will cause the above error. To solve just close the interface builder editor. i.e. just select a code file from your project so you are in the Source Editor.
The simplest (and probably most common cause) appears to be rebuilding without any changes.
So the simplest thing to cure it is to make a trivial change to a source file (such as adding a space, then deleting it), and then rebuilding.
If this doesn't work, feel free to try all the other answers here.
For months, I'd get this error without realizing it was due to such a simple cause. I'd usually do a Clean Build to get rid of it.
When I created ipa through terminal using xcodebuild commands, ipa created but while installing it I was getting same error. exportOptionsPlist solved my issue.
xcodebuild -exportArchive -archivePath projectPath/myapp.xcarchive -exportPath projectPath/myApp.ipa -exportOptionsPlist ProjectFolder/exportPlist.plist
In my case, Quit and restarting XCode worked.
For me the issue was related to the provisioning profile settings. The clue to this was that debug builds were installing ok, but release builds were not. I wanted to test a release build, so I ran the scheme with that build configuration.
I fixed it by duplicating the Release Configuration, then modifying those fields in the Build Settings to have the same provisioning stuff as if I am debugging it.
(Adding another build configuration will give you headaches if you are using Cocoapods however, then you'll have to modify your Podfile)
I'm getting the same thing, when installing on a iPod Touch. I can't link for the simulator (for other reasons), so can't say whether the problem occurs there.
Yes, rebuilding clean or deleting the app from the device allows me to install again. Neither are desirable, iterative solutions!
The minimal "cleaning" I've come across as a work around is manually deleting the Foo.app in the build/Debug-iphoneos directory.
it seems this is a bug in xcode 3.2.2:
iphonedevsdk
I had the same problem in Xcode 3.2.1 when I put a + in my app name. Specifically the "product name" in the build settings. It is fine to have a + in the bundle name in your Info.plist. The same probably applies to other punctuation characters.
Go to Window > Organizer > Projects > Find your project and delete derived data
I got this error intermittently while installing app using iPhone config utility on Windows7. Following solution works - Go to C:\Users\{lanusername}\AppData\Local\Temp and delete app specific folders (e.g. abc.app) and try installing app again.
I reported this bug on ICU (Windows versions) to Apple in June 2011. With the following workarounds:
The workaround is this ....
Win XP
1) Close ICU
2) Delete the temp folder: c:\Documents and Settings\[username]\Local Settings\Temp\[AppName].app
3) Delete the deploy folder: c:\Documents and Settings\[username]\Application Data\AppleComputer\MobileDevice
4) Restart ICU. Drag in the App and install normally.
============================
Win 7
1) Close ICU
2) Delete the temp folder: c:\Users\[username]\AppData\Local\Temp\[AppName].app
3) Delete the deploy folder: c:\Users\[username]\AppData\Local\Apple Computer\MobileDevice\Applications\[AppName].app
4) Restart ICU. Drag in the App and install normally.
=========================================================
I simply rebuilt my app, and that solved the issue.
I also faced the same issue. After wasting lot of time I realized that my product name has a special character "?" which cased the problem
Having the DerivedData folder at a network location caused this problem for me.
After trying everything else, I found out my workstation couldn't agree with the University server about what the time was. (It thought everything was always modified). I also had to clean for every rebuild to avoid that frustrating message.
In the end I gave up and built locally, changing Xcode > Preferences > Locations ... feeling altogether pretty dumb for having ever built over the network.
We ran into this issues on XCode_6.3.1. We were building a AppleWatch app, with an extension. We do have a bunch of Pods.. After debugging the issue for almost a bunch of hours, what we found was that there was an issue with the way a file was adde to the project..
It seems like some references to a unused file was sitting in the iPhone App, though it was used in the Watch App.. It turns out that the error XCode was showing was totally useless.
After removing this file and re adding it back to the project the project started working fine & was able to install to the device. To make it even harder to debug the issues, the debug version was installed without an issue, but was unable to install the norman version..
Make sure you add your files to the right target and, look at git history and see if there are lingering fragments that are added to the wrong target.
This is a very general error message indicating something is wrong during the validation process of the code signature. To find out the specific error, you can go to Xcode->Window->Devices and check your device log.
In my case, I have following console spew
Feb 1 18:53:07 iPod-touch installd[40] : 0x1001f8000 -[MICodeSigningVerifier performValidationWithError:]: 192: Failed to verify code signature of : 0xe8008017 (Signed resources have been added, removed, or modified)
Check on this 3rd party framework again, I found an extra CodeResources file under the framework root. Remove that file fixed the problem.

Upgrade to iPhone SDK 3.0 Causing UIKit Problems

I have an existing project that I was working on, and I recently decided to update my iPhone SDK and updated to the latest 3.0 SDK.
I update my SDK and go to open my existing project. Sure enough, there are some problems including some certificate problems and so on. Anyway, google and I were able to solve most of them, but I haven't had any luck on what I hope to be the last of my problems.
When running my program in the simulator, I now get
dyld: Library not loaded:
/System/Library/Frameworks/UIKit.framework/UIKit
Referenced from:
/Developer/iGameLib/iGameLib/build/Debug-iphonesimulator/iGameLib.app/iGameLib Reason: image not found
Now, I discovered the UIKit has moved to
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0sdk/
System/Library/FrameWorks/UIKit
and I have updated my target and project settings to point to that new framework location, but still when I build it, no luck.
I have also tried clearing out the simulator's applications and settings, still no luck.
The referencing .app is cleared when I run the "clean" menuitem, I have confirmed this, so clearly something in my project settings are still pointing to use the old UIKit location.
Where should I be looking?
I've gone as far as I can to help myself but I'm afraid I'm at a loss here. I don't see it under the target settings, or the project settings, or the plist, or any of the other files within my project.
I was getting the same error
dyld: Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit
The solution on my case was simply quit Xcode and try again.
OK, SO I HAVE THE ANSWER!!!
Quite simply, Xcode is not changing all of the variables correctly in the actual .xcodeproj file. So, here are the steps I took.
Get out of Xcode, you've got to do this job at the terminal. Bring up a terminal and go to where your project is. Find your .xcodeproj and go into it as if it were a directory. It looks like an actual file in finder, but it is one of those package directories.
Now, I couldn't get textedit to allow me to edit it, but you can go into nano, so like I did
sudo nano project.pbxproj which is under my .xcodeproj file/folder/package/whatever.
In this file, you need to find where the SDKROOT is set. Chances are there are a few places it is referenced, but you're looking for SDKROOT = iphoneos2.2.1 or something similar. Change ALL OF THESE (there are a few) to SDKROOT = iphoneos3.0
Now, you're half way there. do ctrl x and save the file. Next you're going to do ls and find out what the .pbxuser file is. Mine is myname.pbxuser. run the same command of
sudo nano myname.pbxuser
In this file, there are a HUGE number of references to the 2.1 iphone sdk directory. Do a search/replace of iPhoneSimulatorOLDVERSION.sdk, in my case it was iPhoneSimulator2.1.sdk
and change the 2.1 to 3.0. Be very careful with this though, I wouldn't want to know what happens when you mess this file up.
Save it and open xcode. CLEAN the project and build and run. Presto!
Check your target settings
Make sure you're actually linking to all of those frameworks in the Target (check under "link binary with libraries")
Make sure you've chosen the 3.0 sdk as your base SDK
Create a blank project and add your frameworks as before; if you still have issues, probably a borked SDK install
BTW, you shouldn't have to re-add sdk frameworks, as the paths are relative to the current SDK
Just trying to be helpful… not sure I can debug from here :)
I have had some similar problems with Xcode that seem to have no apparent cause. The fact of the matter is that Xcode does still have bugs here and there and sometimes you WILL run into a wall.
My Experience: Similar to your situation somewhat, on one particular occasion, an Xcode project I was working just stopped building for whatever mysterious reason, and no amount of cleaning, googling or SO-ing provided me any answers. So I simply created a FRESH, NEW project and filled the source-code from my corrupt project into that of the new project. The new project used the SAME source, libraries, resources, settings, mind you -- and yet it built with no problems. It took about 20-25 minutes to make the transfer but considering that I had spent several HOURS trying to address a bug that would not reveal itself in the corrupt project, the time was well worth it.
So, I'd suggest doing what I did: Maybe try creating a fresh project and transfer your old source and resources over.
Good Luck
I just deleted the UIKit.framework from the 'Frameworks' folder, right-clicked and added it back again.
Clean build, and no problem..
I had the same problem using Xcode 3.2.1 but it was solved in an easier manner. I realized I had recently disabled my target's environment variables, specifically ones to do with memory debugging (NSDebugEnabled, NSZombieEnabled, NSAutoreleaseFreedObjectCheckEnabled, MallocStackLogging, MallocStackLoggingNoCompact). The app ran once in the simulator after removing the environment variables but never again after that.
Quitting Xcode, the Simulator, restarting Xcode and doing a complete clean of the target (including it's dependencies off course) brought me back to a good state.
Same problem when launching my application without debugging.
In my experience the produced binary does not seem to be the culprit.
I created an app from the xcode wizard which does launch OK in the simulator (let's call it testApp, my application being called myApp), I tried to figure out where is the difference with my app.
otool -L myApp
gives correct (relative paths) to the frameworks, same as testApp
ps -E
DYLD_ROOT_PATH, DYLD_FALLBACK_FRAMEWORK_PATH, DYLD_FRAMEWORK_PATH, DYLD_LIBRARY_PATH environment variables needed by ld to locate the framework
are OK for myApp compared to the values of these variables when testApp is launched
I suspect that the problem lies somewhere in the communicartion between XCode and the simulator once the app is launched ... altough I can't find what's wrong ...
The solution that worked (at least for me) have certainly some big side effects but here it is :
quit xcode
browse the content of the package myApp.xcodeproj
unlock .model1v3 and .pbxuser for modification (the lock in the information panel (cmd-I on the file))
delete these two files
start xcode and retry to launch your application from there