简体   繁体   English

尝试在iPhone上调试应用程序时收到消息“已添加,修改或删除已签名的资源”

[英]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.". 尝试调试在iPhone设备上使用3.2 SDK创建的内部版本时,我收到消息“已添加,修改或删除已签名的资源”。

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. 如果在为设备构建之前在build / Debug-iphoneos /中删除了.app文件,则该应用程序将安装成功而不会出现错误。 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 在XCode中,转到“项目”>“新建目标...”,然后在MacOSX / Other下找到“ Shell脚本目标”,将其命名并添加到当前项目中

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). 在打开的窗口中,将“#shell脚本转到此处”替换为“ rm -fr build / Debug-iphoneos / *。app”(不带引号)。 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". 捆绑软件名称 :这是文件系统中实际的应用捆绑软件名称,例如“ 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". 由于捆绑包名称将被截断为“ Awes…tion”,因此您可以选择使用更合适的较短名称,例如“ Awesome App”。 It should be similar to the App Store name (set in iTunes Connect) 它应该类似于App Store名称(在iTunes Connect中设置)

This is pretty clearly a bug in the 3.2 SDK, but I don't want to downgrade. 显然,这是3.2 SDK中的错误,但我不想降级。 I've found that doing a Clean by pushing Command+Shift+K , then Return is pretty fast before pushing Command+R to build. 我发现通过按Command+Shift+K进行“清理”,然后在按Command+R进行构建之前, Return非常快。

Xcode 8, reason of the "A signed resource has been added, modified, or deleted." Xcode 8,“已添加,修改或删除已签名资源”的原因。 was that target was signed with an enterprise provision profile. 该目标是与企业供应配置文件一起签署的。

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. 找出原因的最快方法是进入Xcode,“窗口”菜单,“设备”,然后单击窗格底部的显示按钮以显示控制台。 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. 先前发布的大多数解决方案只是让Xcode重新生成build文件夹的内容和/或重新签名文件的人为方法。

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). 就我而言,我的WatchKit扩展以某种方式获取了对Cocoapods框架的引用,这些框架仅针对主应用程序,因此在构建过程中对其进行了签名,然后在以后进行了修剪(因为未使用它们)。 Then on device, iOS complained that they were missing from the .appex folder for the extension. 然后在设备上,iOS抱怨扩展名.appex文件夹中缺少它们。 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. 以前在stackoverflow上:我刚刚在两个静态库项目中遇到了这个错误。 One builds and tests using the GHUnit test runner on the device without a problem. 可以使用GHUnit测试运行程序在设备上进行构建和测试,而不会出现问题。 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. 到目前为止,我已经尝试擦除构建目录,从可执行文件名称中删除空格,并按照此处的建议进行各种清理和构建。

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. 在界面构建器中编辑xib时似乎发生了错误。 If you try to run while the interface builder is open in xcode it will cause the above error. 如果您尝试在xcode中打开界面生成器时运行,则会导致上述错误。 To solve just close the interface builder editor. 要解决此问题,只需关闭界面生成器编辑器。 ie 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. 我通常会做一个干净的构建来摆脱它。

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. 但这很可能是3.2.2版本中的错误,因为在我的项目中的目标大量更改之前,我没有对此sdk版本进行过广泛的测试。

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". 我偶然发现某个空格“”将其插入了我的应用程序的产品名称,因此将其命名为“ First Second.app”而不是“ 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 我在这里进行了更改:右键单击目标“获取信息”,然后单击“构建选项卡包装”部分。产品名称<-此处的名称将用作捆绑包(.app)的名称

Hope this helps, let me know! 希望对您有所帮助,让我知道!

Cheers, nils 干杯,指甲

In my case, it happened when no changes were made. 以我为例,它没有进行任何更改就发生了。 Make a change to any file and run again. 更改任何文件,然后再次运行。

我可以通过更改项目名称来解决。

[project]-[Rename] menu. "phase1 (new)" -> "pahse1"

When I created ipa through terminal using xcodebuild commands, ipa created but while installing it I was getting same error. 当我使用xcodebuild命令通过终端创建ipa时,创建了ipa,但是在安装它时却遇到了相同的错误。 exportOptionsPlist solved my issue. exportOptionsPlist解决了我的问题。

xcodebuild -exportArchive -archivePath  projectPath/myapp.xcarchive  -exportPath  projectPath/myApp.ipa  -exportOptionsPlist  ProjectFolder/exportPlist.plist

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) (但是,如果您使用的是Cocoapods,添加其他构建配置会让您头疼,那么您就必须修改Podfile)

转到窗口>组织者>项目>查找项目并删除派生数据

I got this error intermittently while installing app using iPhone config utility on Windows7. 在Windows7上使用iPhone config实用程序安装应用程序时,间歇性地出现此错误。 Following solution works - Go to C:\\Users\\{lanusername}\\AppData\\Local\\Temp and delete app specific folders (eg abc.app) and try installing app again.

I reported this bug on ICU (Windows versions) to Apple in June 2011. With the following workarounds: 我在2011年6月向Apple报告了ICU(Windows版本)上的此错误。采用以下解决方法:

The workaround is this .... 解决方法是此....

Win XP 赢XP

1) Close ICU 1)关闭ICU

2) Delete the temp folder: c:\\Documents and Settings\\[username]\\Local Settings\\Temp\\[AppName].app 2)删除临时文件夹:c:\\ Documents and Settings \\ [用户名] \\ Local Settings \\ Temp \\ [AppName] .app

3) Delete the deploy folder: c:\\Documents and Settings\\[username]\\Application Data\\AppleComputer\\MobileDevice 3)删除部署文件夹:c:\\ Documents and Settings \\ [用户名] \\ Application Data \\ AppleComputer \\ MobileDevice

4) Restart ICU. 4)重新启动ICU。 Drag in the App and install normally. 拖入应用程序并正常安装。

============================ ===========================

Win 7 赢7

1) Close ICU 1)关闭ICU

2) Delete the temp folder: c:\\Users\\[username]\\AppData\\Local\\Temp\\[AppName].app 2)删除临时文件夹:c:\\ Users \\ [用户名] \\ AppData \\ Local \\ Temp \\ [AppName] .app

3) Delete the deploy folder: c:\\Users\\[username]\\AppData\\Local\\Apple Computer\\MobileDevice\\Applications\\[AppName].app 3)删除部署文件夹:c:\\ Users \\ [用户名] \\ AppData \\ Local \\ Apple Computer \\ MobileDevice \\ Applications \\ [AppName] .app

4) Restart ICU. 4)重新启动ICU。 Drag in the App and install normally. 拖入应用程序并正常安装。

========================================================= ================================================== =======

我只是重建了我的应用,就解决了这个问题。

I'm getting the same thing, when installing on a iPod Touch. 在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. 我遇到的最小“清理”是手动删除build / Debug-iphoneos目录中的Foo.app。

看来这是xcode 3.2.2中的错误: iphonedevsdk

I had the same problem in Xcode 3.2.1 when I put a + in my app name. 当我在应用程序名称中添加+时,在Xcode 3.2.1中出现了相同的问题。 Specifically the "product name" in the build settings. 特别是在构建设置中的“产品名称”。 It is fine to have a + in the bundle name in your Info.plist. 在Info.plist的捆绑包名称中带有+可以。 The same probably applies to other punctuation characters. 其他标点符号也可能如此。

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. 在网络位置上有DerivedData文件夹对我来说造成了这个问题。

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. 最后,我放弃了并在本地构建,更改了Xcode> Preferences> Locations ...对于曾经在网络上构建过的设备完全感到很傻。

We ran into this issues on XCode_6.3.1. 我们在XCode_6.3.1上遇到了这个问题。 We were building a AppleWatch app, with an extension. 我们正在构建带有扩展功能的AppleWatch应用。 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.. 我们确实有很多Pod。在调试了将近一个小时的问题之后,我们发现文件添加到项目的方式存在问题。

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. 尽管在Watch App中使用了对未使用文件的某些引用,但该文件似乎已在iPhone App中使用。事实证明,XCode显示的错误完全没有用。

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.. 为了使调试问题更加困难,已安装调试版本而没有问题,但无法安装norman版本。

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. 确保将文件添加到正确的目标,然后查看git历史记录,并查看是否有残留的片段被添加到错误的目标。

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. 要找出特定的错误,可以转到Xcode-> Window-> Devices并检查设备日志。

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) 2月1日18:53:07已安装iPod-touch [40]:0x1001f8000-[MICodeSigningVerifier performValidationWithError:]:192:无法验证0xe8008017的代码签名(已添加,删除或修改了签名的资源)

Check on this 3rd party framework again, I found an extra CodeResources file under the framework root. 再次检查该第三方框架,我在框架根目录下找到了一个额外的CodeResources文件。 Remove that file fixed the problem. 删除该文件即可解决问题。

就我而言,退出并重新启动XCode是可行的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装IPA会导致错误“已添加,修改或删除已签名的资源” - Installing IPA results in error “A signed resource has been added, modified, or deleted” 在iPhone上安装应用程序:资源已被修改 - Installing Application on iPhone: Resource has been modified 当我收到消息 iPhone 应用程序时自动填充文本字段的 OTP - Autofill OTP to the TextField when I receive message iPhone app 当我在 Xcode 中用 iPhone 调试应用程序时出现“看门狗已过期” - "Watchdog has expired" when I debug app with iPhone in Xcode 当iPhone接到电话时,UIViewController将收到什么消息? - What message will UIViewController will receive when a the iPhone receive a telephone call? 检查进入前台时iPhone App在后台的时间长度 - Checking how long iPhone App has been in background when coming into foreground 再次打开已在iPhone中从后台杀死的应用时,调用哪种方法? - Which method is called when app which has been killed from background in iphone is opened again? 从后台删除应用程序状态后,将其保存 - Save the application state when it has been deleted from the background iPhone文件共享:如何识别何时添加文件? - iPhone File Sharing: How to recognize when files have been added? 添加 map 视图时,iphone 应用程序崩溃 - iphone app crashes when a map view is added
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM