简体   繁体   中英

Installing IPA results in error “A signed resource has been added, modified, or deleted”

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.

清洁构建文件夹(⌘⌥⇧-K)已经为我解决了3次中的3次。

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:

  1. Close Xcode
  2. Run "dot_clean /path/to/My_Xcode_Project" in Terminal
  3. 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 (eg assets), but leaving sub-directories (eg compiled storyboard). In effect, using this script while building is much faster to execute than full project clean.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM