ios – 如何:使用Automator分发Beta应用程序以进行无线安装
如何自动分发无线下载应用程序的过程.要通过无线下载,您必须在分发配置文件中(不确定用户是否需要下载多个这样的应用程序以下载多个应用程序)
步骤是: >构建和存档,并保存到磁盘 答案如下,我的答案很长.最初这是一个问题,但过了一段时间我自己解决了.您甚至可以对其进行设置,以便在发送某个电子邮件时它会构建它以便您可以随时编写代码(使用Dropbox和Droptext),然后安装到手机上并查看差异. 更新(2012年): 解决方法
网站文件布局
> name.com/index.php(iPhone网站,可选,但推荐) 使用Automator的解决方案: 第一个动作:运行Shell脚本来构建&存档并保存到.ipa文件.可能需要一段时间来弄清楚如何修改它以适应您的情况,就像它对我一样(这可能不适用于XCode 4,如果您只有在XCode内部构建和存档的问题) PROJDIR="/Users/username/Xcode/applicationfolder" PROJECT_NAME="application" APPLICATION_NAME="Application" TARGET_SDK="iphonesimulator4.0" PROJECT_BUILDDIR="${PROJDIR}/build/Distribution-iphoneos" TARGET_TEST_NAME="application" BUILD_HISTORY_DIR="${PROJDIR}/distribution/" #where you want the .ipa to go DEVELOPER_NAME="First Last (TMTE9G3NGS)" PROVISONING_PROFILE="/Users/username/Xcode/Application_Distribution_Profile.mobileprovision" # compile project echo Building Project cd "${PROJDIR}" xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration Distribution #Check if build succeeded if [ $? != 0 ] then exit 1 fi /usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}/${PROJECT_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}" 第二幕:获取Finder项目 刚刚保存的应用程序.ipa文件. 操作三:上传到FTP服务器 谷歌的脚本(不能发布网址)虽然在automatorworld dot com上应该很容易找到.使用该脚本将文件上载到您想要的位置.在我的情况下,name.com / application / application.ipa 现在为网站结束的事情. 如果你想让用户有一个基本的方法来下载文件,只需将index.php文件(在下面创建),Application.plist文件(在下面创建),.ipa文件和57像素和512像素图像放在一起.夹. 我已经更进一步,创建了一个iPhone HTML站点,您可以访问该站点,该站点还显示上次更新文件的时间.您可以使用此模板创建该站点:http://snipt.org/vmup/我必须使用基本站点来复制它为ipa和mobileprovision的链接创建的URL.这是我的链接片段,其中包含自动更新上次更新日期的链接.要使最后更新的文本生效,我必须将文件更改为.php <li><a href="URL FROM BASIC SITE HERE"><span class="menuname">Install Application Name</span><span class="itemarrow"></span></a></li> <sup> Last Updated: <?= date("m/d/Y H:i",filemtime("applicationfolder/application.ipa")) ?> (TIME ZONE HERE) <sup> 基本自动链接创建应用程序索引文件 <?php $ipas = glob('*.ipa'); $provisioningProfiles = glob('*.mobileprovision'); $plists = glob('*.plist'); $sr = stristr( $_SERVER['SCRIPT_URI'],'.php' ) === false ? $_SERVER['SCRIPT_URI'] : dirname($_SERVER['SCRIPT_URI']) . '/'; $provisioningProfile = $sr . $provisioningProfiles[0]; $ipa = $sr . $ipas[0]; $itmsUrl = urlencode( $sr . 'index.php?plist=' . str_replace( '.plist','',$plists[0] ) ); if ($_GET['plist']) { $plist = file_get_contents( dirname(__FILE__) . DIRECTORY_SEPARATOR . preg_replace( '/![A-Za-z0-9-_]/i',$_GET['plist']) . '.plist' ); $plist = str_replace('_URL_',$ipa,$plist); header('content-type: application/xml'); echo $plist; die(); } ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Install iOS App</title> <style type="text/css"> li { padding: 1em; } </style> </head> <body> <ul> <li><a href="<? echo $provisioningProfile; ?>">Install Team Provisioning File</a></li> <li><a href="itms-services://?action=download-manifest&url=<? echo $itmsUrl; ?>"> Install Application</a></li> </ul> </body> </html> 应用程序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>items</key> <array> <dict> <key>assets</key> <array> <dict> <key>kind</key> <string>software-package</string> <key>url</key> <string>IPA FILE LINK HERE</string> </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>needs-shine</key> <true/> <key>url</key> <string>URL FOR 512 PIXEL IMAGE HERE</string> </dict> <dict> <key>kind</key> <string>display-image</string> <key>needs-shine</key> <true/> <key>url</key> <string>URL FOR 57 PIXEL IMAGE HERE</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>COM.COMPANY.APPLICATION</string> <key>bundle-version</key> <string>VERSION NUMBER HERE (YOU DON'T REALLY NEED TO UPDATE IT UNLESS YOU WANT TO)</string> <key>kind</key> <string>software</string> <key>title</key> <string>APPLICATION NAME HERE</string> </dict> </dict> </array> </dict> </plist> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |