对于标准版iPhone,您需要支付每年99美元的费用成为开发者计划会员。然后,您可以使用adhoc系统将您的应用程序安装到多达100个设备上。开发者计划有详细信息,但涉及将每个设备的UUID添加到您的应用程序包中。可以使用App Store提供的Ad Hoc Helper轻松获取UUID。有关此方法的更多详细信息,请参见Craig Hockenberry的Beta testing on iPhone 2.0文章。
对于越狱的iPhone,您可以使用以下方法,我已经在iPhone OS 3.0上使用AccelerometerGraph示例应用程序进行了个人测试。
首先,您需要创建一个自签名证书并修补您的iPhone SDK以允许使用此证书:
启动Keychain Access.app。未选择任何项目,请从Keychain菜单中选择Certificate Assistant,然后Create a Certificate。
Name: iPhone Developer
Certificate Type: Code Signing
Let me override defaults: Yes
点击Continue
Validity: 3650 days
点击Continue
清空电子邮件地址字段。
一直点击Continue直到完成。
您应该会看到"This root certificate is not trusted"。这是正常现象。
设置iPhone SDK以允许使用自签名证书:
sudo /usr/bin/sed -i .bak 's/XCiPhoneOSCodeSignContext/XCCodeSignContext/' /Developer/Platforms/iPhoneOS.platform/Info.plist
如果您已经打开Xcode,请重新启动它以使此更改生效。
以下步骤需要先安装openssh
和uikittools
。将jasoniphone.local
替换为目标设备的主机名。在安装SSH后,请务必为mobile
和root
用户设置自己的密码。
要将应用程序手动编译并安装到手机上作为系统应用程序(绕过Apple的安装系统):
Project, Set Active SDK, Device and Set Active Build Configuration, Release。
正常编译您的项目(使用Build而不是Build & Go)。
在build/Release-iphoneos
目录中,您将拥有一个应用程序包。使用您喜欢的方法将其传输到设备上的/Applications目录下。
scp -r AccelerometerGraph.app root@jasoniphone:/Applications/
让SpringBoard知道新应用程序已安装:
ssh mobile@jasoniphone.local uicache
这只需要在添加或删除应用程序时执行一次。更新的应用程序只需要重新启动即可。
为了使开发更加
ssh root@jasoniphone.local rm -r /Applications/AccelerometerGraph.app &&
ssh mobile@jasoniphone.local uicache
uikittools
包,那么uicache
命令应该是存在的。 - Jason Weathered是的,一旦您加入了iPhone开发者计划并向Apple支付了99美元,您就可以在最多100个iOS设备上提供您的应用程序。
# compress application.
/bin/mkdir -p $CONFIGURATION_BUILD_DIR/Payload
/bin/cp -R $CONFIGURATION_BUILD_DIR/MyApp.app $CONFIGURATION_BUILD_DIR/Payload
/bin/cp iTunesCrap/logo_itunes.png $CONFIGURATION_BUILD_DIR/iTunesArtwork
/bin/cp iTunesCrap/iTunesMetadata.plist $CONFIGURATION_BUILD_DIR/iTunesMetadata.plist
cd $CONFIGURATION_BUILD_DIR
# zip up the HelloWorld directory
/usr/bin/zip -r MyApp.ipa Payload iTunesArtwork iTunesMetadata.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>appleId</key>
<string></string>
<key>artistId</key>
<integer>0</integer>
<key>artistName</key>
<string>MYCOMPANY</string>
<key>buy-only</key>
<true/>
<key>buyParams</key>
<string></string>
<key>copyright</key>
<string></string>
<key>drmVersionNumber</key>
<integer>0</integer>
<key>fileExtension</key>
<string>.app</string>
<key>genre</key>
<string></string>
<key>genreId</key>
<integer>0</integer>
<key>itemId</key>
<integer>0</integer>
<key>itemName</key>
<string>MYAPP</string>
<key>kind</key>
<string>software</string>
<key>playlistArtistName</key>
<string>MYCOMPANY</string>
<key>playlistName</key>
<string>MYAPP</string>
<key>price</key>
<integer>0</integer>
<key>priceDisplay</key>
<string>nil</string>
<key>rating</key>
<dict>
<key>content</key>
<string></string>
<key>label</key>
<string>4+</string>
<key>rank</key>
<integer>100</integer>
<key>system</key>
<string>itunes-games</string>
</dict>
<key>releaseDate</key>
<string>Sunday, December 12, 2010</string>
<key>s</key>
<integer>143441</integer>
<key>softwareIcon57x57URL</key>
<string></string>
<key>softwareIconNeedsShine</key>
<false/>
<key>softwareSupportedDeviceIds</key>
<array>
<integer>1</integer>
</array>
<key>softwareVersionBundleId</key>
<string>com.mycompany.myapp</string>
<key>softwareVersionExternalIdentifier</key>
<integer>0</integer>
<key>softwareVersionExternalIdentifiers</key>
<array>
<integer>1466803</integer>
<integer>1529132</integer>
<integer>1602608</integer>
<integer>1651681</integer>
<integer>1750461</integer>
<integer>1930253</integer>
<integer>1961532</integer>
<integer>1973932</integer>
<integer>2026202</integer>
<integer>2526384</integer>
<integer>2641622</integer>
<integer>2703653</integer>
</array>
<key>vendorId</key>
<integer>0</integer>
<key>versionRestrictions</key>
<integer>0</integer>
</dict>
</plist>
〜/文档/Installous / Downloads
。按照@Jason Weathered所描述的方式将应用程序复制到iPhone后,确保对该应用程序进行“chmod +x”操作,否则它将无法运行。
/Developer/Platforms/iPhoneOS.platform/Info.plist
,然后尝试使用来自苹果的真实开发配置文件在设备上调试应用程序,那么它可能无法正常工作。症状是来自com.apple.debugserver
的奇怪错误消息以及在Xcode中构建时可以使用任何捆绑标识符而不会出现错误。解决方案是恢复Info.plist
。*更改/注释以使其适用于Xcode 3.2.1和iPhone SDK 3.1.2
通过WiFi手动部署
2) 修改Info.plist后,请务必重新启动Xcode
3) "uicache"命令未找到,使用killall -HUP SpringBoard对我来说效果很好。
除此之外,我可以确认这个方法很好用。
Mac用户,使用PwnageTool 3.1.4进行越狱(通过种子下载)效果很好。