I am programmatically downloading an ipa file (enterprise version of my app) and prompting the user to install it.
The problem is similar to Download and install an ipa from url on iOS, but the difference is that the ipa is already downloaded in my case.
I tried the following variation for the above problem's solution:
- Modify the plist to contain URL to the local downloaded ipa.
```
<?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>file://{path-to-local-ipa}</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.yourCompany.productName</string>
<key>bundle-version</key>
<string>1</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>productName</string>
</dict>
</dict>
</array>
</dict>
</plist>
```
- Update itms link to point to the locally updated plist file -
itms-services://?action=download-manifest&url=file://{path-to-local-plist}
But, when opening the itms link using [[UIApplication sharedApplication] openURL:itmsLink]
it doesn't work and gives me an error saying Cannot install applications because the certificate for (null) is not valid
This is with reference to how Facebook distributes its internal app for dogfooding. Want to do something similar so that the user is prompted to install the app after the app is downloaded, thus increasing the turnaround rate for its installation.