如何在PowerPC Mac上正确地为iPhone进行开发?
我正在 PowerPC Mac 上进行 iPhone 开发。 如何让代码签名正常工作,以便我可以构建到我的 iPhone 上?
iPhone SDK 并不正式支持 PowerPC,但经过一番调整,还是可以安装的。 请参阅此处。 我已经安装了 SDK,并且在 Xcode 中运行良好,并且 iPhone 模拟器也运行良好。
然而,我无法在 Xcode 中构建我的 iPhone——代码签名是 fubar。 一些聪明的人在此处创建了解决方法。 也就是说,我使用了 Tiku 发布的协同设计脚本以及一些更正。 这帮助我取得了一些进步。 代码现在可以编译,但在尝试部署时仍然收到 0xE800003A 错误。
我认为我已正确设置所有密钥和配置文件。 我的 iPhone 已注册进行开发,我已创建配置文件。 开发门户中列出的 AppID 为 MagicNumber.com.website.*,在我的项目中,我将捆绑包 ID 设置为 com.website.${PRODUCT_NAME:identifier}。 项目设置中,产品名称为HelloWord,代码签名身份为我的开发者证书。
iPhone 的控制台日志显示: 2 月 18 日星期三 14:57:55 未知 afcd[180] :用户手机的 uid 501
2 月 18 日星期三 14:57:55 未知 afcd[180] :模式为 0x41e8 2 月 18 日星期三 14:57:55 未知 mobile_installation_proxy[182] :install_embedded_profile:跳过嵌入式配置文件的安装 2 月 18 日星期三 14:57:55 未知 mobile_installation_proxy[182]:verify_executable:无法验证签名:e800800e 2 月 18 日星期三 14:57:55 未知 mobile_installation_proxy[182]:preflight_application_install:无法验证 /var/tmp/install_staging.QNk2sD/HelloWorld.app/HelloWorld 2 月 18 日星期三 14:57:55 未知 mobile_installation_proxy[182]:install_application:无法预检应用程序安装 2 月 18 日星期三 14:57:55 未知 mobile_installation_proxy[182]:handle_install:安装失败
感谢任何帮助!
I'm doing iPhone development on a PowerPC Mac. How do I get code signing to work properly so that I can build to my iPhone?
The iPhone SDK doesn't officially support PowerPC, but with some fidgeting, it can be installed. See here. I've got the SDK installed and running fine in Xcode and the iPhone simulator works fine.
However, I can't build to my iPhone in Xcode -- the code signing is fubar. Some clever people have created workarounds here. Namely, I used the codesign script that Tiku posted along with some of the corrections. This has helped me make some progress. The code compiles now, but I still get an 0xE800003A error when it tries to deploy.
I think I have all my keys and provisioning profiles set up properly. My iPhone is registered for development, I've got the provisioning profile created. The AppID listed in the dev portal says MagicNumber.com.website.* and in my project, I have the Bundle ID set as com.website.${PRODUCT_NAME:identifier}. In project settings, product name is HelloWord, and the code signing identity is my developer certificate.
The console log of the iPhone says:
Wed Feb 18 14:57:55 unknown afcd[180] : user mobile has uid 501
Wed Feb 18 14:57:55 unknown afcd[180] : mode is 0x41e8
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : install_embedded_profile: Skipping the installation of the embedded profile
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : verify_executable: Could not validate signature: e800800e
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : preflight_application_install: Could not verify /var/tmp/install_staging.QNk2sD/HelloWorld.app/HelloWorld
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : install_application: Could not preflight application install
Wed Feb 18 14:57:55 unknown mobile_installation_proxy[182] : handle_install: Installation failed
Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的协同设计脚本是什么样的? 我以前在做G4的时候就用过这个:(原来的“/usr/bin/codesign”应该重命名为“/usr/bin/codesign.orig”,然后将此脚本保存为“/usr/bin/ codesign”。您必须使用“sudo”来完成此操作。如果您的路径名中包含空格,则此脚本将不起作用。)
What does your codesign script look like? I used to use this one when I was working on a G4: (The original "/usr/bin/codesign" should be renamed "/usr/bin/codesign.orig" and then save this script as "/usr/bin/codesign". You would have to do it with "sudo". Also this script doesn't work if your path names have spaces in them.)
我遇到了和你一样的问题 - 我可以在 iPhone 上交叉编译和安装该应用程序,但它总是会因安全违规而失败。
为了解决这个问题,我必须越狱我的手机并安装一个修补过的 MobileInstaller(我相信 Cydia 应用程序现在有一个名为 Installous 的软件包,可以修补您的 MobileInstaller。不幸的是,我认为 Installous 也用于盗版应用程序)。 然后在项目的 Info.plist 中,您需要添加以下内容:
这将允许您的手机运行未签名的二进制文件,这是我能够从我的 ppc mac 进行开发的唯一方法。
我仍然可以从应用程序商店购买应用程序并让它们运行没有任何问题。
I had the same problems as you - I could cross compile and install the app on the iphone, but it would always fail with a security violation.
To get around it, I had to jailbreak my phone and install a patched MobileInstaller (I believe the Cydia app now has package called Installous which patches your MobileInstaller. Unfortunately, I think Installous is also used to pirate apps). Then in your project's Info.plist, you need to add the following:
This will allow your phone to run unsigned binaries, which is the only way I was able to develop from my ppc mac.
I'm still able to purchase apps from the appstore and have them run without any problems.
截至 2009 年 4 月 12 日,iPhone Os 2.2.1 脚本修复在我的 iBook G4 上完美运行。
不管怎样,在花了一天的大部分时间在谷歌上搜索修复后,我发现有相当多的人仍然遇到问题。
确保正确复制/粘贴,因为如果脚本中出现错误并且失败,codesign Xcode 将不会注意到,并且会尝试以未签名状态安装应用程序,从而在部署时出现错误(而不是在构建时) 。 就我而言,我将文本粘贴到一个小终端窗口中,破坏了一些代码行,我花了一天时间才发现错误。 至少现在我对证书、代码签名和 Xcode 有了令人印象深刻的了解...
如果您仍然遇到问题,可能是由于包标识符/appId 不匹配,其中有大量的帖子。
As of 12 of April 2009, iPhone Os 2.2.1 the script fix works perfectly on my iBook G4.
Anyway, having spent the better part of the day searching for fixes on Google I see that there are quite a few people that still have problems.
Make sure you copy/paste correctly, because if you get an error in the script and fail the codesign Xcode won't notice and it will try to install the application in its unsigned state, giving you an error when deploying (NOT when building). In my case I had pasted the text in a small terminal window, breaking some lines of code and it took me one day to find the mistake. At least now I have an impressive knowledge of certificates, code signing and Xcode...
If you still have problems it's probably due to a bundle identifier/appId mismatch on which there are tons of posts.
还值得记住的是,当涉及到证书、签名和在设备上安装时,XCode 可能有点不稳定(可能只是在 PPC 上,还没有在 Intel mac 上尝试过)。
我发现当以前工作的配置突然停止工作时,通常可以采取以下步骤来解决问题:
如果您从未成功签署您的应用程序,则可能存在实际配置问题,但一旦它正常工作,请确保在担心某些内容损坏之前尝试上述操作:)
希望有所帮助。
It may also be worth bearing in mind that XCode can be a bit flaky when it comes to certificates, signing and installing on devices (perhaps just on PPC, haven't tried on an Intel mac).
I find the following steps usually sort things out when a previously-working configuration suddenly stops working:
If you've never successfully signed your app there may be an actual configuration issue, but once it's working make sure you try the above before worrying something's broken :)
Hope that helps.