在没有开发者程序的设备上安装 iOS 应用程序,iOS 5.1

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

Install iOS Apps on device without developer program, iOS 5.1

iphoneiosxcodeios5iphone-developer-program

提问by Kersch

I'm trying to install my iOS app on to my device running iOS 5.1. It's not currently jailbreaked but if that's what it takes I'll do that.

我正在尝试将我的 iOS 应用安装到运行 iOS 5.1 的设备上。它目前尚未越狱,但如果需要的话,我会这样做。

When i was running iOS 5.0.1 I followed this thread: How can I deploy an iPhone application from Xcode to a real iPhone device?and created a self-signed certificate, that worked like a charm.

当我运行 iOS 5.0.1 时,我遵循了这个线程:如何将 iPhone 应用程序从 Xcode 部署到真正的 iPhone 设备?并创建了一个自签名证书,效果很好。

I'm not able to get it working after updating to Xcode 4.3.2 and iOS 5.1

更新到 Xcode 4.3.2 和 iOS 5.1 后,我无法让它工作

I'v also tried following this thread but with no success: Test iOS app on device without apple developer program or jailbreak

我也试过关注这个线程,但没有成功:在没有苹果开发者程序或越狱的设备上测试 iOS 应用程序

So how do I install my apps from Xcode 4.3.2 to my iPhone 4 running iOS 5.1, without being member in a developer program?

那么如何将我的应用程序从 Xcode 4.3.2 安装到运行 iOS 5.1 的 iPhone 4 上,而无需成为开发人员计划的成员?

EDIT: I am now able to get the applications on to the iPhone. But when i try to start them they crash, not even the launch image comes up. I've Jailbroken the device, installed Appsync, edited the SDKSettings.plist and changed the build properties to "Don't code Sign".

编辑:我现在可以将应用程序安装到 iPhone 上。但是当我尝试启动它们时,它们崩溃了,甚至没有出现启动图像。我已经越狱了设备,安装了 Appsync,编辑了 SDKSettings.plist 并将构建属性更改为“不编码签名”。

This is what the console gives me when i try to start the app, i'm not getting any crash log in Xcode:

这是当我尝试启动应用程序时控制台给我的信息,我在 Xcode 中没有收到任何崩溃日志:

May  8 18:25:35 unknown SpringBoard[54] <Warning>: Unable to obtain a task name port right for pid 1017: (os/kern) failure
May  8 18:25:35 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.KerschApps.Test[0x2fa8]) Exited: Killed: 9
May  8 18:25:35 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.KerschApps.Test[0x2fa8]) Throttling respawn: Will start in 2147483647 seconds
May  8 18:25:35 unknown SpringBoard[54] <Warning>: Application 'Test' exited abnormally with signal 9: Killed: 9
May  8 18:25:36 unknown kernel[0] <Debug>: AMFI: hook..execve() killing pid 1017: no code signature

Why are all my applications crashing in the iPhone when they run fine in the simulator?

为什么我的所有应用程序在模拟器中运行良好时都会在 iPhone 中崩溃?

Thanks /Tim

谢谢/蒂姆

采纳答案by fundead

I've had exactly the same problem as you, getting apps running on iOS 5.1 with Xcode 4.3.2 and I've just managed to get it working almost perfectly using this method here:

我遇到了与您完全相同的问题,使用 Xcode 4.3.2 在 iOS 5.1 上运行应用程序,我刚刚设法在此处使用此方法使其几乎完美运行:

Building Apps for iOS 5.1 with Xcode 4.3.2

使用 Xcode 4.3.2 为 iOS 5.1 构建应用程序

It's based on this one from iPhone Dev wiki, but I had to include some alterations - the -gta switch results in a build error, and the instructions aren't exactly explicit. The complete tutorial is in that blog post, but the steps basically are:

它基于iPhone Dev wiki 中的这个,但我必须包括一些更改 - -gta 开关会导致构建错误,并且说明并不完全明确。完整的教程在该博客文章中,但步骤基本上是:

  1. Create self-signed certificate with name 'iPhone Developer'
  2. Turn 'Code Signing Identities' in Xcode project Build Settings back on - to use your self-signed certificate 'iPhone Developer'
  3. Change info.plist occurrences as stated
  4. Download ldid, make executable
  5. Create python script, stick it in /usr/bin, change python script references accordingly
  6. Change iPhoneCodeSign.xcspec to use ldid3.py
  7. Create tdmtanf file on device with touch over ssh
  8. Don't put -gta flags in 'Other Code Signing Flags'
  1. 创建名为“iPhone Developer”的自签名证书
  2. 重新打开 Xcode 项目构建设置中的“代码签名身份” - 使用您的自签名证书“​​iPhone 开发人员”
  3. 按照说明更改 info.plist 出现次数
  4. 下载ldid,使其可执行
  5. 创建Python脚本,把它贴在/ usr / bin中,变化python脚本引用相应
  6. 将 iPhoneCodeSign.xcspec 更改为使用 ldid3.py
  7. 通过 ssh 触摸在设备上创建 tdmtanf 文件
  8. 不要将 -gta 标志放在“其他代码签名标志”中

I happen to use Unity for debugging so the lack of Xcode debugging with -gta didn't bother me - obviously Objective C developers will need this functionality, so hopefully someone can expand on this if they get it working. I'm currently playing with a dev build of my app on my iPhone on 5.1, and fingers cross you can get the same result.

我碰巧使用 Unity 进行调试,因此使用 -gta 进行 Xcode 调试的缺失并没有困扰我 - 显然 Objective C 开发人员将需要此功能,因此希望有人可以在其运行时对此进行扩展。我目前正在 5.1 上的 iPhone 上使用我的应用程序的开发版本,手指交叉可以得到相同的结果。

回答by user2629581

I was trying to do the same and had failed at a few points, then I found Moustafa Hassan's blog, which had the steps I successfully used.

我试图做同样的事情,但在几个点上失败了,然后我找到了Moustafa Hassan 的博客,其中包含我成功使用的步骤。

It works fine testing with Xcode 4.6.3 on OS X 10.8.4 (on my Hackintosh) and iOS 6.1.2 on my iPad

它可以在 OS X 10.8.4(在我的 Hackintosh 上)和 iOS 6.1.2 在我的 iPad 上使用 Xcode 4.6.3 进行良好的测试

That page contained step by step examples and pictures to do the job. It only takes about 15 minutes.

该页面包含一步一步的示例和图片来完成这项工作。只需要大约 15 分钟。

The only thing I can think of that is not listed on the page is how to access /usr/local/bin on your OS X device. That is easily done by showing hidden files in terminal[1].

我能想到的唯一没有在页面上列出的是如何访问 OS X 设备上的 /usr/local/bin。这很容易通过在终端 [1] 中显示隐藏文件来完成。

[1]: defaults write com.apple.Finder AppleShowAllFiles YES

[1]:默认写入 com.apple.Finder AppleShowAllFiles YES

回答by Matteo

I don't know if you resolve your problem but I had the same that you had. I'll explain how solve.

我不知道你是否解决了你的问题,但我遇到了和你一样的问题。我会解释如何解决。

Require:

要求:

Xcode 4.3.2, iPhone with iOS 5.1.x, Mac.

Xcode 4.3.2,带有 iOS 5.1.x 的 iPhone,Mac。

All you need is auto sign your application. All steps that you did are corrects, so when you have your application builded from Xcode you need to sign it. Create a self certificate in keychain and then go in the folder (by terminal) where xcode compile the application, then write this:

您所需要的只是自动签署您的应用程序。您所做的所有步骤都是正确的,因此当您从 Xcode 构建应用程序时,您需要对其进行签名。在钥匙串中创建一个自我证书,然后进入 xcode 编译应用程序的文件夹(通过终端),然后编写:

mac$ platform=/Developer/Platforms/iPhoneOS.platform
mac$ allocate=${platform}/Developer/usr/bin/codesign_allocate
mac$ export CODESIGN_ALLOCATE=${allocate}
mac$ codesign -fs "Name" Program

where "Name" is the name of the certificate and Program is the name the Program.app (you must specify .app). The copy your app in /Applications by ssh or cyberduck or iTunes... Then respring and enjoy!

其中“Name”是证书的名称,Program 是 Program.app 的名称(您必须指定 .app)。通过 ssh 或 Cyber​​duck 或 iTunes 在 /Applications 中复制您的应用程序...然后重新启动并享受!