gpt4 book ai didi

objective-c - OSX Cocoa 错误指令崩溃

转载 作者:行者123 更新时间:2023-12-03 17:02:33 26 4
gpt4 key购买 nike

我正在开发一个应用程序(大约一年了),在提交到 App Store 时它运行良好 -> 我的所有问题都开始了:

1)应用程序商店会让我的应用程序在沙箱中运行(为什么是苹果?为什么!?)。我花了大约 2 天的时间才明白为什么仅仅在功能中切换“ON”并不能做到这一点......等等...最后我设法说服我的应用程序在沙箱中运行。

2)现在应用程序通过了验证,可以提交到该死的应用程序商店然而,当我在提交之前检查应用程序时,我发现它根本不想工作(从 Xcode 或产品运行)。

它只是在“applicationDidFinishLaunchingWithOptions”之前崩溃了崩溃本身更是史诗般的“thread1: EXC_BAD_INSTRUCTION (code=EXC_i386_INVOP, subdued = 0x0)”

我看到很多装配线 -> 从程序集中的注释中我了解到该应用程序尝试“打开”沙箱,但随后出现了错误的指令:( ud2

我看到的卡住的是:

_libseinit_initialize_once
0 _libsecinit_setup_secinitd_client
1 _libsecinit_initialize_once
2 _dispatch_client_callout
3 dispatch_once_f
4 libSystem_initializer
5 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ()

我认为其余的都不相关,因为它们都是关于一些图像加载器的:/

最近我确保删除应用程序沙箱键或将其设置为NO可以解决我的问题,但如果我这样做,我会回到问题1

所以我有点陷入鸡蛋和火鸡的问题:(

也许有人知道任何有趣的解决方法或解决方案来将该死的应用程序提交到强大的应用程序商店?

最佳答案

听起来像苹果文档 here :

OS X’s enforcement of container integrity impacts your development and distribution cycle. This is because, in the course of creating and distributing an app, the app is code signed using various signatures. Here’s how the process works:

Before you create a project, you obtain three code signing certificates from Apple: a development certificate, a distribution certificate, and (optionally) a Developer ID certificate. (To learn how to obtain these code signing certificates, read App Distribution Guide.) When used in conjunction with the corresponding private keys from your keychain, these certificates form three separate digital identities. For development and testing, you sign your app with your development identity. When you submit a version to the app store, you use your distribution identity. If you are distributing a version outside the app store, you use your Developer ID identity.

When the Mac App Store distributes your app, it is signed with an Apple code signature. For testing and debugging, you may want to run both versions of your app: the version you sign and the version Apple signs. But OS X sees the Apple-signed version of your app as an intruder and won’t allow it to launch: Its code signature does not match the one expected by your app’s existing container.

If you try to run the Apple-signed version of your app, you get a crash report containing a statement similar to this:

Exception Type: EXC_BAD_INSTRUCTION (SIGILL) The solution is to adjust the access control list (ACL) on your app’s container to recognize the Apple-signed version of your app. Specifically, you add the designated code requirement of the Apple-signed version of your app to the app container’s ACL.

关于objective-c - OSX Cocoa 错误指令崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27368117/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com