[iOS] 第一次 Ad Hoc 就上手
之前都沒想過要用這個 Ad Hoc,這一次是因為用到了Dropbox API,在Submit被reject後
被要求要用Ad Hoc將url傳送給Dropbox去測試…
需要的動作:
1.APP Id,這個如果要正式版跟測試版可以並存的話,就要重新申請一個,不然就用原本的
2.Profile,這個得弄個新的,後面要選憑證、設備

完成後下載這個Profile,並安裝到Mac
3.打開Xcode,到Project -> Info -> Configurations
按下+,複製Release,名稱為 Ad-Hoc

4.換到TARGETS -> Build Settings -> Code Signing
多了一個Ad-Hoc的選項,把上面新增的Profile設定進去
我這裡是先設定最下面的Provisioning Profile,再設定Signing

5.設定Schema

因為接下來會用Archive來匯出ipa檔,所以這裡要把Build Configuration設成Ad-Hoc

6.Archive,這裡不能用Simulator




後面還有一些Profile的問題,反正就是選上面新建的那個
然後就匯出ipa檔了
7.再來是如何給測試者安裝的問題,這次我是用email寄url的方式,透過dropbox
7.1 先把ipa檔放到Dropbox上並取得『直接下載』的url


https://www.dropbox.com/s/wnxxxxxxxxxxxxx/GuitarImageTabViewer.ipa?dl=0
改成
https://dl.dropboxusercontent.com/s/wnxxxxxxxxxxxxx/GuitarImageTabViewer.ipa
7.2 建立plist檔 -手動建立,內容如下,ipa文件的url就是上面那行
from: http://zhidao.baidu.com/question/2011423077553574188.html?fr=iks&word=xcode6+%C9%FA%B3%C9ipa+plist&ie=gbk
7.3 如何給別人下載 - 建立下載的html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Setup My App</title>
</head>
<body>
<a style="font-size:100px"href="itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/hre0xxxxxxx/manifest.plist"> Tap Here to Install the Application</a>
</body>
</html>
紅字的部份是上一步的url,完成後存成AdHoc.html,上傳到Dropbox,再一次取得AdHoc.html的直接下載url
將這個url寄給測試者,用iPhone or iPad打開點擊url就可以安裝~~
參考:
iOS - ad-hoc教學 http://mewzilog.blogspot.tw/2014/10/ios-ad-hoc.html
End.
被要求要用Ad Hoc將url傳送給Dropbox去測試…
需要的動作:
1.APP Id,這個如果要正式版跟測試版可以並存的話,就要重新申請一個,不然就用原本的
2.Profile,這個得弄個新的,後面要選憑證、設備
完成後下載這個Profile,並安裝到Mac
3.打開Xcode,到Project -> Info -> Configurations
按下+,複製Release,名稱為 Ad-Hoc
4.換到TARGETS -> Build Settings -> Code Signing
多了一個Ad-Hoc的選項,把上面新增的Profile設定進去
我這裡是先設定最下面的Provisioning Profile,再設定Signing
5.設定Schema
因為接下來會用Archive來匯出ipa檔,所以這裡要把Build Configuration設成Ad-Hoc
6.Archive,這裡不能用Simulator
後面還有一些Profile的問題,反正就是選上面新建的那個
然後就匯出ipa檔了
7.再來是如何給測試者安裝的問題,這次我是用email寄url的方式,透過dropbox
7.1 先把ipa檔放到Dropbox上並取得『直接下載』的url
https://www.dropbox.com/s/wnxxxxxxxxxxxxx/GuitarImageTabViewer.ipa?dl=0
改成
https://dl.dropboxusercontent.com/s/wnxxxxxxxxxxxxx/GuitarImageTabViewer.ipa
7.2 建立plist檔 -手動建立,內容如下,ipa文件的url就是上面那行
<?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文件的url</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>//bundle id</string> <key>bundle-version</key> <string>//版本號</string> <key>kind</key> <string>software</string> <key>title</key> <string>//app名</string> </dict> </dict> </array> </dict> </plist>完成後存成manifest.plist,再上傳到dropbox,並同上一步的方式取得manifest.plist直接下載的url
from: http://zhidao.baidu.com/question/2011423077553574188.html?fr=iks&word=xcode6+%C9%FA%B3%C9ipa+plist&ie=gbk
7.3 如何給別人下載 - 建立下載的html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Setup My App</title>
</head>
<body>
<a style="font-size:100px"href="itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/hre0xxxxxxx/manifest.plist"> Tap Here to Install the Application</a>
</body>
</html>
紅字的部份是上一步的url,完成後存成AdHoc.html,上傳到Dropbox,再一次取得AdHoc.html的直接下載url
將這個url寄給測試者,用iPhone or iPad打開點擊url就可以安裝~~
參考:
iOS - ad-hoc教學 http://mewzilog.blogspot.tw/2014/10/ios-ad-hoc.html
End.
沒有留言:
張貼留言