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

发布于 2024-08-20 00:50:00 字数 145 浏览 8 评论 0原文

在尝试在 iPhone 设备上调试使用 3.2 SDK 创建的版本时,我收到消息“已添加、修改或删除了签名资源。”。

我可以清理、重建,然后安装,不会出现错误,但如果我尝试在不清理的情况下安装,则会显示错误。

任何人都知道可能是什么原因造成的?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(26

允世 2024-08-27 00:50:00

我找到了该错误的解决方法。

如果在为设备构建之前删除 build/Debug-iphoneos/ 中的 .app 文件,则应用程序安装时不会出现错误。
在每次构建之前有一个简单的方法可以做到这一点。

确保您已在下拉概览菜单中选择“设备”。
在 XCode 中,转到“项目”>“新目标...
然后在MacOSX/Other下找到“Shell Script target”
为其命名并将其添加到当前项目

现在,在左侧导航面板中的目标下,展开新创建的目标并双击运行脚本。
在打开的窗口中,将“# shell script gone here”替换为“rm -fr build/Debug-iphoneos/*.app”(不带引号)。
现在打开您的主要目标首选项,并在直接依赖项下添加新创建的目标。
构建并开始! :)

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! :)

绝情姑娘 2024-08-27 00:50:00

当产品名称中存在特殊字符时,就会出现此错误。就我而言,它是一个“?”

如果您更改产品名称,它会自动更新“捆绑包名称”和“捆绑包显示名称”,因此它通常是重命名应用程序的最佳选择。

如果您想在应用名称中包含特殊字符,则必须手动重命名“捆绑包名称”和“捆绑包显示名称”

捆绑包名称:这是实际的应用捆绑包文件系统中的名称,例如“Awesome App.app”。它通常对用户不可见。

捆绑包显示名称:这是设备上应用图标下显示的短名称。由于捆绑包名称将被截断为“Awes…tion”,您可以选择更适合的更短名称,例如“Awesome App”。它应该类似于 App Store 名称(在 iTunes Connect 中设置)

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)

落花随流水 2024-08-27 00:50:00

这显然是 3.2 SDK 中的一个错误,但我不想降级。我发现,在按 Command+R 进行构建之前,先按 Command+Shift+K 执行 Clean,然后按 Return 的速度相当快。

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.

扛起拖把扫天下 2024-08-27 00:50:00

Xcode 8,“已添加、修改或删除签名资源”的原因。该目标是通过企业配置文件签署的。

Xcode 8, reason of the "A signed resource has been added, modified, or deleted." was that target was signed with an enterprise provision profile.

仅此而已 2024-08-27 00:50:00

就我而言,这是在没有进行任何更改的情况下发生的。对任何文件进行更改并再次运行。

In my case, it happened when no changes were made. Make a change to any file and run again.

[旋木] 2024-08-27 00:50:00

这可能有多种原因。找出原因的最快方法是进入 Xcode、窗口菜单、设备,然后单击窗格底部的显示按钮以显示控制台。现在尝试运行。您应该看到日志输出,其中命名了它所抱怨的特定文件。

之前发布的大多数解决方案只是让 Xcode 重新生成构建文件夹的内容和/或重新签署文件的人为方法。

就我而言,我的 WatchKit 扩展以某种方式获取对 Cocoapods 框架的引用,这些框架仅针对主应用程序,因此它们在构建期间得到签名,然后在稍后进行修剪(因为它们没有被使用)。然后在设备上,iOS 抱怨扩展的 .appex 文件夹中缺少它们。我最终不需要扩展中的任何 pod,因此我只是将它们全部删除并将扩展作为目标删除,然后进行一些小的清理以删除构建步骤中留下的与 pod 相关的碎片。现在一切都很完美。

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.

猥︴琐丶欲为 2024-08-27 00:50:00

(已解决)这是一个奇怪的问题。我尝试了我能找到的一切。最终我将产品名称从“单元测试(设备)”更改为“设备单元测试” - 删除了括号。现在一切正常了。里面的空间看起来不错。

之前在 stackoverflow 上:
我刚刚在两个静态库项目中遇到了这个错误。在设备上使用 GHUnit 测试运行程序进行构建和测试不会出现任何问题。其他项目将无法安装并出现此错误。这意味着这两个项目之间存在一些不同。到目前为止,我已经尝试擦除构建目录,从可执行文件名称中删除空格,以及按照此处建议的各种清理和构建。

(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.

囚我心虐我身 2024-08-27 00:50:00

对我来说也是如此,认为这与多个目标等有关,因为我在那里改变了很多。但这很可能是 3.2.2 版本中的一个 Bug,因为在我的项目中发生大规模目标更改之前,我没有在这个 sdk 版本中进行广泛的测试。

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.

彼岸花似海 2024-08-27 00:50:00

解决了我的问题!!!

我偶然发现,不知何故,一个空格“”出现在我的应用程序的产品名称中,因此它被称为“First Second.app”,而不是“FirstSecond.app”。删除空间后问题就消失了!

我在这里改了:
右键单击目标
获取信息
构建选项卡
包装工段
产品名称 <- 此处的名称将用于捆绑包 (.app) 名称

希望这有帮助,请告诉我!

干杯,
尼尔斯

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

李白 2024-08-27 00:50:00

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

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

I could solved by changing project name.

[project]-[Rename] menu. "phase1 (new)" -> "pahse1"
一抹淡然 2024-08-27 00:50:00

我也遇到了同样的错误,但是是间歇性的。我尝试了以上所有方法,但仍然不起作用。今天我找到了造成这种情况的原因。

在界面生成器中编辑 xib 时似乎会发生该错误。如果您尝试在 xcode 中打开界面生成器时运行,则会导致上述错误。要解决此问题,只需关闭界面生成器编辑器即可。即只需从项目中选择一个代码文件即可进入源代码编辑器。

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.

内心旳酸楚 2024-08-27 00:50:00

最简单(也可能是最常见的原因)似乎是在不进行任何更改的情况下进行重建。

因此,解决这个问题最简单的方法就是对源文件进行一些简单的更改(例如添加一个空格,然后删除它),然后重建。

如果这不起作用,请随意尝试此处的所有其他答案。

几个月来,我一直收到这个错误,却没有意识到这是由于如此简单的原因造成的。我通常会做一个干净的构建来摆脱它。

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.

咽泪装欢 2024-08-27 00:50:00

当我使用 xcodebuild 命令通过终端创建 ipa 时,创建了 ipa,但在安装它时出现了相同的错误。 exportOptionsPlist 解决了我的问题。

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

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
唔猫 2024-08-27 00:50:00

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

In my case, Quit and restarting XCode worked.

心房敞 2024-08-27 00:50:00

对我来说,问题与配置文件设置有关。线索是调试版本安装正常,但发布版本安装失败。我想测试发布版本,因此我使用该构建配置运行了该方案。

我通过复制发布配置来修复它,然后修改构建设置中的这些字段以具有与调试它相同的配置内容。

(如果你使用 Cocoapods,添加另一个构建配置会让你头疼,但是,你必须修改你的 Podfile)

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)

吾家有女初长成 2024-08-27 00:50:00

在 iPod Touch 上安装时,我也遇到同样的情况。我无法链接模拟器(由于其他原因),所以不能说问题是否在那里发生。

是的,重建干净或从设备中删除应用程序可以让我再次安装。两者都不是理想的迭代解决方案!

我遇到的最小“清理”方法是手动删除 build/Debug-iphoneos 目录中的 Foo.app 。

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.

东北女汉子 2024-08-27 00:50:00

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

it seems this is a bug in xcode 3.2.2:
iphonedevsdk

旧梦荧光笔 2024-08-27 00:50:00

当我在应用程序名称中添加 + 时,我在 Xcode 3.2.1 中遇到了同样的问题。特别是构建设置中的“产品名称”。 Info.plist 中的捆绑包名称中可以包含 + 号。这同样可能适用于其他标点字符。

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.

你的笑 2024-08-27 00:50:00

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

Go to Window > Organizer > Projects > Find your project and delete derived data

倾`听者〃 2024-08-27 00:50:00

我在 Windows7 上使用 iPhone 配置实用程序安装应用程序时间歇性地收到此错误。 以下解决方案有效 - 转到 C:\Users\{lanusername}\AppData\Local\Temp 并删除应用程序特定文件夹(例如 abc.app),然后再次尝试安装应用程序。

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.

小梨窩很甜 2024-08-27 00:50:00

我于 2011 年 6 月向 Apple 报告了 ICU(Windows 版本)上的此错误。采用以下解决方法:

解决方法是这样...

Win XP

1) 关闭 ICU

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

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

4) 重新启动 ICU。拖入App并正常安装。

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

Win 7

1) 关闭 ICU

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

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

4) 重新启动 ICU。拖入App并正常安装。

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

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.

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

虐人心 2024-08-27 00:50:00

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

I simply rebuilt my app, and that solved the issue.

你不是我要的菜∠ 2024-08-27 00:50:00

我也面临同样的问题。浪费了很多时间后我意识到我的产品名称有一个特殊字符“?”这就是问题所在

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

懒猫 2024-08-27 00:50:00

将 DerivedData 文件夹放在网络位置给我带来了这个问题。

在尝试了其他所有方法之后,我发现我的工作站无法与大学服务器关于时间的一致。 (它认为一切总是被修改)。我还必须在每次重建时进行清理,以避免出现令人沮丧的信息。

最终我放弃了,本地构建,更改 Xcode >首选项>位置……感觉对于通过网络进行构建来说非常愚蠢。

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.

一曲琵琶半遮面シ 2024-08-27 00:50:00

我们在 XCode_6.3.1 上遇到了这个问题。我们正在构建一个带有扩展的 AppleWatch 应用程序。我们确实有很多 Pod。在调试问题近几个小时后,我们发现文件添加到项目的方式存在问题。

似乎有一些对未使用文件的引用位于 iPhone 应用程序中,尽管它在 Watch 应用程序中使用。事实证明,XCode 显示的错误完全没有用。

删除此文件并将其重新添加回项目后,项目开始正常工作能够安装到设备上。为了使调试问题变得更加困难,调试版本安装没有问题,但无法安装 Norman 版本。

确保将文件添加到正确的目标,然后查看 git 历史记录并查看是否有添加到错误目标的挥之不去的片段。

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.

予囚 2024-08-27 00:50:00

这是一条非常常见的错误消息,表明代码签名验证过程中出现问题。要找出具体错误,您可以进入 Xcode->Window->Devices 并检查您的设备日志。

就我而言,我有以下控制台喷出

Feb 1 18:53:07 iPod-touch installd[40] : 0x1001f8000 -[MICodeSigningVerifier PerformValidationWithError:]: 192: 无法验证代码签名: 0xe8008017 (已添加、删除签名资源,或修改)

再次检查这个第三方框架,我在框架根目录下发现了一个额外的CodeResources文件。删除该文件解决了问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文