xcode 试图在我越狱的 iphone 上部署我的应用程序,但应用程序立即关闭!

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1285980/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:44:06  来源:igfitidea点击:

Attempting to deploy my app on my jailbroken iphone, but the app closes immediately!

iphonexcodeios-simulatorjailbreak

提问by Stefan Kendall

I'm trying to develop iphone apps on my jailbroken iphone, and I can't seem to get the process down, for whenever I deploy my app, set all file permissions to 777, and respring, the application closes immediately when I try to launch it. Furthermore, it does not have the auto-gloss xcode shows in the iphone simulator, so what gives?

我正在尝试在我越狱的 iphone 上开发 iphone 应用程序,但我似乎无法停止这个过程,因为每当我部署我的应用程序,将所有文件权限设置为 777,然后重新启动时,应用程序会在我尝试时立即关闭启动它。此外,它没有在 iphone 模拟器中显示的自动光泽度 xcode,那么是什么给出的呢?

I've generated the cert via keychain access and added the two keys for REQUIREPROVISIONING and ALLOWPROVISIONING (both values no), and then set the appropriate cert in xcode, but the application still closes immediately when I attempt to run it on my phone.

我已经通过钥匙串访问生成了证书,并添加了 REQUIREPROVISIONING 和 ALLOWPROVISIONING 的两个密钥(两个值都是否),然后在 xcode 中设置了适当的证书,但是当我尝试在我的手机上运行它时,应用程序仍然立即关闭。

What gives?

是什么赋予了?

回答by GregH

I had the same issue, ldid did not work for me at all. Here's my solution:

我有同样的问题, ldid 根本不适合我。这是我的解决方案:

  1. Open Keychain Access on the Mac
  2. In the menu, go to "Keychain Access -> Certificate Assistant -> Create a Certification"
  3. Name it "Cydia Developer" or whatever, type is "self-signed root" and check "let me override defaults".
  4. The only option you need to set in the wizard is to change Certificate Type to "Code Signing". Click continue or enter your desired info for the rest.
  5. Once it's created, find it in Keychain Access's Certificates list and right click -> Get Info, under Trust change "When Using This Cert" to "Always Trust".
  6. Write an iPhone app in XCode. Change "Project->Project Settings->Build->Code Signing Ident->Any iPhone Device" to "Don't Code Sign".
  7. Compile the program with the Active SDK set for "iPhone Device" instead of "Simulator". Ignore the errors about provisioning or signing.
  8. Under "Executables", drag the newly compiled app to somewhere that is easy to get to from the terminal.
  9. In a terminal, run 'codesign -fs "Cydia Developer" /path/appname.app/appname'
  10. Somehow get your app to the phone (ssh, cydia, teleportation, whatever) and viola! Working app.
  1. 在 Mac 上打开钥匙串访问
  2. 在菜单中,转到“钥匙串访问 -> 证书助手 -> 创建证书”
  3. 将其命名为“Cydia Developer”或其他名称,键入“自签名根”并选中“让我覆盖默认值”。
  4. 您需要在向导中设置的唯一选项是将证书类型更改为“代码签名”。单击继续或输入您想要的信息以获取其余信息。
  5. 创建后,在钥匙串访问的证书列表中找到它并右键单击 -> 获取信息,在信任下将“使用此证书时”更改为“始终信任”。
  6. 用 XCode 编写一个 iPhone 应用程序。将“Project->Project Settings->Build->Code Signing Ident->Any iPhone Device”更改为“Don't Code Sign”。
  7. 使用为“iPhone 设备”而不是“模拟器”设置的 Active SDK 编译程序。忽略有关配置或签名的错误。
  8. 在“可执行文件”下,将新编译的应用程序拖到易于从终端访问的位置。
  9. 在终端中,运行 'codesign -fs "Cydia Developer" /path/appname.app/appname'
  10. 以某种方式将您的应用程序连接到手机(ssh、cydia、传送等等)和中提琴!工作应用程序。

To deploy with an Apple devel key, just set your project build code sign identity to the name of the Apple dev key name instead of "Don't code sign".

要使用 Apple 开发密钥进行部署,只需将您的项目构建代码签名标识设置为 Apple 开发密钥名称的名称,而不是“不要代码签名”。

回答by kersny

Did you sign your app? I'm not sure if this is needed for Xcode apps, but to run Jailbreak-toolchain compiled apps you have to run ldid -S (as root) on the app executable (ex. MyApp.app/MyApp). This Thread may help: Thread

你签署了你的应用程序吗?我不确定 Xcode 应用程序是否需要这样做,但是要运行 Jailbreak-toolchain 编译的应用程序,您必须在应用程序可执行文件(例如 MyApp.app/MyApp)上运行 ldid -S(以 root 身份)。这个线程可能有帮助:线程