In-house(Enterprise) Distribution (iOS)
Flow
註冊成為Apple Enterprise Program
付款後,要等待二週,才能開始使用
取得發佈憑證
Visual Studio設定
新增plist檔案
參考資料:https://help.apple.com/deployment/ios/#/apda0e3426d7
Sample
<?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>
<!-- array of downloads. -->
<key>items</key>
<array>
<dict>
<!-- an array of assets to download -->
<key>assets</key>
<array>
<!-- software-package: the ipa to install. -->
<dict>
<!-- required. the asset kind. -->
<key>kind</key>
<string>software-package</string>
<!-- required. the URL of the file to download. -->
<key>url</key>
<string>https://YourServer/com.xxx.xxx.ipa</string>
</dict>
<!-- display-image: the icon to display during download.-->
<dict>
<key>kind</key>
<string>display-image</string>
<!-- optional. indicates if icon needs shine effect applied. -->
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://YourServer/empHelperAPPIcon.png</string>
</dict>
<!-- full-size-image: the large 512x512 icon used by iTunes. -->
<dict>
<key>kind</key>
<string>full-size-image</string>
<!-- optional. one md5 hash for the entire file. -->
<key>md5</key>
<string>61fa64bb7a7cae5a46bfb45821ac8bba</string>
<key>needs-shine</key>
<true/>
<key>url</key><string>https://YourServer/empHelperAPPIcon.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<!-- required -->
<key>bundle-identifier</key>
<string>com.xxx.xxx</string>
<!-- optional (software only) -->
<key>bundle-version</key>
<string>1.0</string>
<!-- required. the download kind. -->
<key>kind</key>
<string>software</string>
<!-- optional. displayed during download; typically company name -->
<key>subtitle</key>
<string>you company</string>
<!-- required. the title to display during the download. -->
<key>title</key>
<string>app name</string>
</dict>
</dict>
</array>
</dict>
</plist>
新增HTML提供iOS APP下載
Xamarin.iOS建置後,會產生IPA的檔案,但不能讓user直接下載,必需透過連結plist,才能下載
<a href="itms-services://?action=download-manifest&url=https://server/emphelper.plist">
使用者安裝注意事項
iPhone使用者必需允許開發者(以公司為單位),才能把安裝後的App,開啟使用
檢查使用該憑證產生的ipk是不是正確
使用Mac機器,將app安裝至手機
操作方式:
- 在Mac上,下載 Apple Configurator 2
- 開啟Apple Configurator,並接上手機
點選手機後,按上正上面的 + ,選擇Apps
選擇IPK檔案,即可確認是不是能將開發的ios app佈署至手機
疑難排解
下載app出現caanot connect to XXX
- 確認SSL的憑證為公開的
- 下載plist or ipk都要透過 https 協定
- IIS Application MIME 需有以下兩項目設定
.ipa application/octet-stream
.plist text/xml
Useful resources
https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/app_distribution/in-house-distribution/ https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/app_distribution/app-store-distribution/