如何从 Xcode 在 iPhone 上安装未签名的应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8204969/
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
How can I install an unsigned application on an iPhone from Xcode?
提问by john stoe
How can I install an unsigned application on an iPhone from Xcode? I am using last version of Xcode and the iOS 5 SDK.
如何从 Xcode 在 iPhone 上安装未签名的应用程序?我使用的是最新版本的 Xcode 和 iOS 5 SDK。
回答by Moshe
You can't.
你不能。
Apple wants people to sign up with their developer program, and so the only way to install an unsigned app might involve jail breaking, but I don't know enough as I've never jailbroken an iOS device.
Apple 希望人们注册他们的开发者计划,因此安装未签名应用程序的唯一方法可能涉及越狱,但我知道的还不够多,因为我从未越狱过 iOS 设备。
回答by Julian F. Weinert
CAUTION!This DOES require a jailbroken iOS Device.
警告!这确实需要越狱的 iOS 设备。
Yes, you CAN!
是的你可以!
If you've built it on your own, you can simply use your phone as developer device (if you don't know how, just google it, I don't remember yet).
如果你自己构建了它,你可以简单地将你的手机用作开发者设备(如果你不知道如何,就谷歌一下,我不记得了)。
The trick is to force Xcode to don't try to code sign your app. If you don't, you'll get an error every time, you try to build it.
诀窍是强制 Xcode 不要尝试对您的应用程序进行代码签名。如果不这样做,则每次尝试构建它时都会出错。
Go to Terminal and type:
转到终端并输入:
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/SDKSettings.plist
(You might replace iPhoneOS5.0 with your target SDK)
(你可以用你的目标 SDK 替换 iPhoneOS5.0)
You'll be asked for your admin password.
系统会要求您输入管理员密码。
Now change the value for the key CODE_SIGNING_REQUIRED
to NO
.
现在将键的值更改CODE_SIGNING_REQUIRED
为NO
。
You are almost done.
你快完成了。
Go to your project settings, look for "Code Signing" and set all values to Don't Code Sign
.
转到您的项目设置,查找“代码签名”并将所有值设置为Don't Code Sign
.
Set the active scheme to your iPhone instead of iPhone 5.0 Simulator and go to Product → Build For → Build For Archiving
将活动方案设置为您的 iPhone 而不是 iPhone 5.0 Simulator 并转到 Product → Build For → Build For Archiving
Now go to your Organizer Window, head for your iPhone, go to Applications, press the plus sign at left bottom and choose your build path.
In Xcode4 it's /Users/you/Library/Developer/Xcode/DerivedData/yourApp/Build/Products/Release-iphoneos/
by default.
现在转到您的管理器窗口,前往您的 iPhone,转到应用程序,按左下角的加号并选择您的构建路径。在 Xcode4 中它是/Users/you/Library/Developer/Xcode/DerivedData/yourApp/Build/Products/Release-iphoneos/
默认的。
Select your App binary (it will have a "forbidden" badge, because you're on Mac architecture) and click open.
选择您的应用程序二进制文件(它将有一个“禁止”标志,因为您使用的是 Mac 架构)并单击打开。
Wait a few seconds and now your app should be available from your SpringBoard.
等待几秒钟,现在您的应用程序应该可以从您的 SpringBoard 使用。
回答by Varun Mulloli
Maybe you're not ready to purchase the license yet. That's when you require JailCoder- an easy to use app for tweaking your project and Xcode. Purchase the license and publish your app when you're happy testing with JailCoder.
也许您还没有准备好购买许可证。这就是您需要JailCoder的时候——一个易于使用的应用程序,用于调整您的项目和 Xcode。当您对 JailCoder 的测试感到满意时,购买许可证并发布您的应用程序。
Note: Here also a jailbroken device is required.
注意:这里还需要越狱设备。
回答by Drew
It would require jailbreaking, which I don't see why not because my jailbroken iPad doesn't have a virus after probably 300 apps. All the apps from the default repositories are checked and don't have a virus.
它需要越狱,我不明白为什么不这样做,因为我的越狱 iPad 在大约 300 个应用程序之后没有病毒。默认存储库中的所有应用程序都经过检查并且没有病毒。