IOS Over the air installation not working – cannot connect to server

enterpriseiosipaitunes

We are facing an issue while deployment of our enterprise iOS application. We are following the documentation from Apple link – https://help.apple.com/deployment/ios/#/apda0e3426d7

We have followed the below steps,

•   Created an ipa with our enterprise app provisioning profile. 
•   Created a manifest file that points to ipa and png files
•   Created an html with hyperlink to - itms-services://?action=download-manifest&url=https://location.company.com/sites/mobile/Files/Mobile/deploy/manifest.plist

Hosted the html, ipa, manifest and png files in a folder in the server https://location.company.com.

The following mime type is in the web server

.plist -> application/xml 
.ipa -> application/octet-stream

We instructed our employees to access the download page, in the following way,

1.  Open https://location.company.com. It will as for userid and password. Need to login.
2.  Display a page which have install app link.
3.  Tap on the link to install the app.

When I trying to click on the link, I am getting an error:

Cannot connect to <>

I tried to download the plist file from my iOS browser. It is working fine.
The device log in the Xcode shows, the below log.

Jun 23 15:17:15 TOM-iPhone itunesstored[106] : Could not load download
manifest with underlying error: Error Domain=SSErrorDomain Code=2
"Cannot connect to iTunes Store"
UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}
I have checked with our IT team and confirmed that the certificates are valid.

But it is worked when I moved the plist, ipa and png files to dropbox and the link is

itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/55yozabctc2npd6/manifest.plist

Only difference between these two what I feel is iTunes can access the link https://dl.dropboxusercontent.com/s/55yozabctc2npd6/manifest.plist directly. But iTunes cannot directly access the link – https://location.company.com/sites/mobile/Files/Mobile/deploy/manifest.plist, as it has an authentication page in between. That means if I open a fresh browser and try to open link – https://dl.dropboxusercontent.com/s/55yozabctc2npd6/manifest.plist, it download the file in my iPhone browser. But if I try the same with the link https://location.company.com/sites/mobile/Files/Mobile/deploy/manifest.plist it ask me for user name and password.

Any help much appreciated.

Best Answer

According to this answer, any cookies required for authentication are lost during the install process, so the request to download the app (ipa file) will fail. You could try removing authentication for the link to the app, or maybe leaving the app file in Google Drive and see if that works.