xcode 应用程序在启动时死亡,但没有崩溃报告
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1898733/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
App dies on startup but not crash report
提问by user230949
I've given an ad hoc version of my app to some users. Two of them have the app die on start up while one user has no issues. I can also install the ad hoc without issue...but that is always the case for me. One user sent the info below from the Xcode Organizer Console. They didn't find any crash logs. I don't know what to make of the info below. The one thing that stands out is "Permission denied".
我已经向一些用户提供了我的应用程序的临时版本。其中两个让应用程序在启动时死亡,而一个用户没有问题。我也可以毫无问题地安装临时...但对我来说总是这样。一位用户从 Xcode Organizer Console 发送了以下信息。他们没有找到任何崩溃日志。我不知道如何理解下面的信息。突出的一件事是“权限被拒绝”。
I place the provisioning and myapp.app files in a dropbox folder. The user then retrieves the files from the same location. I've run codesign against the .app file in the dropbox and get valid output:
我将配置和 myapp.app 文件放在 dropbox 文件夹中。然后用户从同一位置检索文件。我已经针对保管箱中的 .app 文件运行了 codesign 并获得了有效的输出:
codesign -vvvv myapp.app
myapp.app: valid on disk
myapp.app: satisfies its Designated Requirement
Any one have some ideas how I can figure out why the app doesn't work for this user?
任何人都有一些想法,我如何才能弄清楚为什么该应用程序不适用于该用户?
Here is the Console output from one user. They couldn't find any associated crash logs:
这是一位用户的控制台输出。他们找不到任何相关的崩溃日志:
Stats
totalMLSITDBPostProcessing=5.31s
commands=0.01
misc=0.45s
icuSort=4.41s (MLS_icu_data=0.23s, MLS_icu_sec_data=0.13, dropIdx=0.04, normalize=0.13, update_orders=1.31, tStatsICUOther1=0.02, createIndex=2.50)
Sun Dec 13 12:35:04 unknown com.apple.launchd[1] <Error>: (UIKitApplication:com.cygen.myapp[0x8cb6]) posix_spawn("/var/mobile/Applications/4B036396-3294-4E0A-BBCC-4118E72846D4/myapp.app/myapp", ...): Permission denied
Sun Dec 13 12:35:04 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x8cb6]) Exited with exit code: 1
Sun Dec 13 12:35:04 unknown SpringBoard[24] <Warning>: Failed to spawn myapp. Unable to obtain a task name port right for pid 179: (os/kern) failure
Sun Dec 13 12:35:04 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x8cb6]) Throttling respawn: Will start in 2147483647 seconds
Sun Dec 13 12:35:04 unknown SpringBoard[24] <Warning>: Application 'myapp' exited abnormally with exit status 1
Sun Dec 13 12:35:10 unknown springboardservicesrelay[155] <Warning>: Unable to parse property list data of length: 0
Sun Dec 13 12:35:13 unknown com.apple.launchd[1] <Error>: (UIKitApplication:com.cygen.myapp[0x3ce5]) posix_spawn("/var/mobile/Applications/4B036396-3294-4E0A-BBCC-4118E72846D4/myapp.app/myapp", ...): Permission denied
Sun Dec 13 12:35:13 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x3ce5]) Exited with exit code: 1
Sun Dec 13 12:35:13 unknown SpringBoard[24] <Warning>: Failed to spawn myapp. Unable to obtain a task name port right for pid 182: (os/kern) failure
Sun Dec 13 12:35:13 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x3ce5]) Throttling respawn: Will start in 2147483647 seconds
Sun Dec 13 12:35:13 unknown SpringBoard[24] <Warning>: Application 'myapp' exited abnormally with exit status 1
采纳答案by Shaggy Frog
Ad-hoc distribution is notoriously tricky. If you've missed one thing, the whole chain fails. Here's what I can think of, off the top of my head, based on the fact that it works for at least one of your users:
众所周知,临时分发非常棘手。如果你错过了一件事,整个链条就会失败。基于它至少适用于您的一个用户这一事实,我可以想到以下几点:
- Are you certain that the mobile ad-hoc provisioning certificate contains the UDID for the users who are seeing it fail?
- Do those users have an old certificate on their device? (i.e. did you delete the existing certificate before installing a new one? Settings->General->Profiles)
- Are you certain the code-signed .app bundle contains the UDIDs for those users, inside the file named embedded.mobileprovisioning? (Under the
ProvisionedDevices
key) - Is the mobile provisioning certificate expired?
- Is your developer code-sign certificate expired?
- Was the application package renamed by the user before installation?
- Did you try doing a clean before doing the distribution build?
- 您确定移动临时供应证书包含看到它失败的用户的 UDID?
- 这些用户的设备上是否有旧证书?(即您在安装新证书之前是否删除了现有证书?设置->常规->配置文件)
- 您确定代码签名的 .app 包在名为 Embedded.mobileprovisioning 的文件中包含这些用户的 UDID 吗?(下
ProvisionedDevices
键) - 移动供应证书是否已过期?
- 您的开发人员代码签名证书是否已过期?
- 用户在安装前是否对应用程序包进行了重命名?
- 在进行发行版构建之前,您是否尝试过清理?
回答by Shaggy Frog
The key word I think you have used is the word 'dropbox'. I've just spent the last 2 weeks trying to work out my app would not work on other machines and I have worked out that is because I have been distributing the app via DropBox with out zipping it.
我认为您使用过的关键词是“dropbox”这个词。我刚刚花了过去 2 周的时间试图解决我的应用程序无法在其他机器上运行的问题,我已经解决了这是因为我一直在通过 DropBox 分发应用程序而没有对其进行压缩。
Try putting the app in a zip file before uploading to DropBox. Instruct the users to download the zip file, unzip it and install the app.
在上传到 DropBox 之前,尝试将应用程序放入 zip 文件中。指导用户下载 zip 文件,解压缩并安装应用程序。
My guess is that DropBox is stuffing up some of the files in the app package.
我的猜测是 DropBox 正在塞满应用程序包中的一些文件。
回答by Tony
Yep, we had the same issue with DropBox... zip the file first.
是的,我们在 DropBox 上遇到了同样的问题...首先压缩文件。
回答by depicus
Dropbox for me as well, zipped and it worked fine.
Dropbox 对我来说也是如此,压缩后它运行良好。
回答by Dan Carter
Ensure the executable has the same name in the updated version. I found if these don't match up, I get the exact same error messages as the asker. This is defined in the info.plist.
确保可执行文件在更新版本中具有相同的名称。我发现如果这些不匹配,我会收到与提问者完全相同的错误消息。这在 info.plist 中定义。
My team was trying to simulate the user upgrading an old version of our app to a new one. The new version was very different and we'd created a whole new project with new target and everything. Unfortunately this changed the executable name. Changing this back to the original made the upgrade work perfectly.
我的团队试图模拟用户将我们应用程序的旧版本升级到新版本。新版本非常不同,我们创建了一个带有新目标和所有内容的全新项目。不幸的是,这改变了可执行文件的名称。将其改回原始版本使升级工作完美。
回答by Matt S.
Sun Dec 13 12:35:04 unknown SpringBoard[24] : Failed to spawn myapp. Unable to obtain a task name port right for pid 179: (os/kern) failure
Sun Dec 13 12:35:04 unknown SpringBoard[24]:无法生成 myapp。无法获得 pid 179 的任务名称端口权限:(os/kern) 失败
I've been fighting this for some time, and in my case it was a result of our build system using a different zip routine which did not respect OSX's resource forks. I don't know much about them, but in short they are an HFS construct for storing extra metadata about a file/dir which is hidden from most tools. Compressing with finder seems to work, as well as ditto. More info here: http://xahlee.org/UnixResource_dir/macosx.html
我已经为此抗争了一段时间,在我的情况下,这是我们的构建系统使用不同的 zip 例程的结果,该例程不尊重 OSX 的资源分支。我对它们了解不多,但简而言之,它们是一种 HFS 构造,用于存储有关大多数工具隐藏的文件/目录的额外元数据。使用 finder 压缩似乎有效,同上。更多信息在这里:http: //xahlee.org/UnixResource_dir/macosx.html
回答by Chris Neuss
Try using the iPhone Configuration Utility, a free download from Apple. I had the same problem, uninstalled and installed using the iPCU and now it works perfectly.
尝试使用 iPhone 配置实用程序,可从 Apple 免费下载。我遇到了同样的问题,使用 iPCU 卸载并安装,现在它运行良好。
It's somewhat unintuitive to use, try googling for provisioning profile iCPU. I found detailed instructions on a "redfin's developper blog".
使用起来有点不直观,请尝试使用谷歌搜索来配置配置文件 iCPU。我在“redfin's developer blog”上找到了详细说明。