为什么 Settings.bundle 导致 iTunes 说我的 iPhone 应用程序无效?

发布于 2024-12-11 07:49:28 字数 888 浏览 0 评论 0原文

好的,过去几个月我一直在使用 MonoTouch 和 MonoDevelop 开发 iPhone 应用程序。这次,我已经能够将该应用程序部署到我的手机上以进行调试/测试,并且还能够编译 Adhoc 版本供我的雇主试用。这一切都运作良好......直到本周。

我发出的最新版本不会进入 iTunes,并会失败并出现以下错误:

The app "Payload.ipa" could not be added to your iTunes library because it is not a valid app.

所以基本上您的通用“出了问题,但我不会告诉您到底是什么”类型的错误。

我的初步调查似乎表明问题可能在于应用程序名称包含特殊字符,但由于我很长时间没有更改应用程序名称,这不是问题。我确实向 info.plist 添加了捆绑版本,但是删除它并没有解决问题。

然后我查看了输出文件夹中的文件,发现现在包含了 Settings.bundle(我添加了一个名为 Config.plist 的文件来存储应用程序使用的一些设置)。在 MonoDevelop 中,我按照我所遵循的指南的建议更改了选项,使其成为“内容”和“始终复制”。当在模拟器中或通过 MonoDevelop 在我的手机上运行应用程序时,这非常有效。但是当我将应用程序打包为 .ipa 文件时,iTunes 说该应用程序无效。如果我删除 Settings.bundle iTunes 会接受它。

我读过,设置“内容”时不需要“始终复制”选项,但即使选项设置为“不复制”,Settings.bundle 文件仍然出现在输出(bin)文件夹中。

我还认为也许我必须将名称更改为 Root.plist,因为这就是示例所使用的名称,并且可能应该是这样。但再次更改名称并没有什么区别。

所以我只是想知道其他人是否遇到过这个问题以及如何解决它?

Ok, I have been working on an iPhone App using MonoTouch and MonoDevelop for the last few months. In this time I have been able to deploy to the app to my phone for debugging/testing purposes and have also been able to compile Adhoc versions for my employers to try out. This has all worked fine... until this week.

The latest version I sent out will not go into iTunes and fails with the following error:

The app "Payload.ipa" could not be added to your iTunes library because it is not a valid app.

So basically your generic "something is wrong but I am not going to tell you exactly what" kind of error.

My initial investigations seemed to suggest that the problem may be with the app name containing special characters but as I have not changed the app name for a long time this isn't the problem. I did add a bundle version to info.plist though however removing this didn't fix the problem.

So then I had a look at the files in the output folder and I noticed that Settings.bundle was now included (I added a file called Config.plist to store some settings used by the app). In MonoDevelop I changed the options to make it "Content" and "Always copy" as suggested by the guides I was following. This works perfectly when running the app in the Simulator or on my phone via MonoDevelop. But when I package the app as a .ipa file iTunes says the app is not valid. If I remove Settings.bundle iTunes accepts it.

I have read that the "Always copy" option isn't required when setting "Content" but the Settings.bundle file still appears in the output (bin) folder even with the option set to "Do not copy".

I also thought that maybe I had to change the name to Root.plist because that's what the examples use and maybe it's expected to be that. But again changing the name didn't make a difference.

So I was just wondering if anyone else has run into this problem and how do you solve it?

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

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

发布评论

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

评论(2

何以心动 2024-12-18 07:49:28

好吧,经过一番摸索之后,我使用 TestFlight 将应用程序部署到我的手机上(我无法在我的开发计算机上使用 iTunes 进行同步)。

即使使用 TestFlight,使用有效负载中包含的 Settings.bundle 部署应用程序也不会安装在手机上。不过,我决定尝试不使用该文件,看看该应用程序是否可以在没有它的情况下运行,令我惊讶的是,它确实可以运行。

这有点烦人,因为之前只需将所有文件从输出目录复制到 Payload 目录就可以正常工作。我仍然不确定为什么当 Settings.bundle 存在时会出现问题,甚至不知道如果不需要它为什么会存在。

Ok, after some more mucking around I used TestFlight to deploy the app to my phone (I am not able to sync using iTunes on my development machine).

Deploying the app with the Settings.bundle included in the Payload would not install on the phone even using TestFlight. However I decided to try without that file to see if the app would work without it and to my surprise it does.

This is a little annoying as previously just copying all the files from the output directory to the Payload directory has worked fine. I am still not sure why there is a problem when Settings.bundle is present or even why it is there if it isn't needed.

老旧海报 2024-12-18 07:49:28

我遇到了同样的问题,经过几个小时的调查,我发现“settings.bundle”的资源分支丢失了,因为我在 FAT32 分区上创建/修改它。您应该在 OSX 分区上创建 settings.bundle 或修复资源分支。

I've faced the same issue and after hours of investigations I found out that the "settings.bundle"'s resource fork was lost because I was creating/modifying it on a FAT32 partition. You should create the settings.bundle on a OSX partition or repair the resource fork.

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