IOS Enterprise Deployement: Clicking on the "Service Links" link means that the message "Unable to connect to [domain]"

In an attempt to deploy the iOS app for enterprise, I created the following link:

Unencoded version (for readability):

<a href="itms-services://?action=download-manifest&url=https://example.com/api/distribution/ios?token=abc123">Download</a> 

Encoded Version:

 <a href="itms-services://?action=download-manifest&url=https%3A%2F%2Fexample.com%2Fapi%2Fdistribution%2Fios%3Ftoken%3Dabc123">Download</a> 

The link is correctly encoded, as discussed here and here .

Assuming the user token is valid, the .plist file .plist returned via SSL, as discussed here . The URL of the .ipa file referenced by the .plist file is generated on the fly. Here's what the .plist file looks like:

 <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>TEMP_URL</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>org.cocos2d.ready-ios</string> <key>bundle-version</key> <string>0.0.1</string> <key>kind</key> <string>software</string> <key>title</key> <string>Ready</string> </dict> </dict> </array> </dict> </plist> 

As far as I can tell, our GoDaddy SSL certificate is on a trusted list .

However, despite all of the above, after clicking the link and waiting for the moment, I get the following error:

 Cannot connect to [domain] 

This is the output of the iPhone console after clicking the link:

 Aug 29 07:30:56 My-iPhone wifid[15] <Notice>: WiFi:[431015456.799163]: Client itunesstored set type to background application Aug 29 07:30:56 My-iPhone wifid[15] <Notice>: WiFi:[431015456.804319]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd networkd itunesstored Aug 29 07:30:56 My-iPhone wifid[15] <Notice>: WiFi:[431015456.806066]: Already connected to [Company Name]. Aug 29 07:30:58 My-iPhone itunesstored[100] <Warning>: Could not load download manifest with underlying error: Error Domain=SSErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo=0x15788270 {NSLocalizedDescription=Cannot connect to iTunes Store} Aug 29 07:31:03 My-iPhone wifid[15] <Notice>: WiFi:[431015463.925398]: Client itunesstored set type to normal application Aug 29 07:31:03 My-iPhone wifid[15] <Notice>: WiFi:[431015463.928745]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd networkd 

Any ideas?

+6
source share
7 answers

I had this problem and none of the documented solutions here or in the other answers worked for me. Using the correct SSL certificate, it was possible to easily load plist into safaris on the target device. However, an attempt to install using the "itms-services: // ..." link always fails with the error "Unable to connect to [domain]".

The problem was that the medium SSL certificate is not configured on the web server. Web browsers did not have any problems with this, SSL was valid, but connecting the device to the Mac and viewing the log through the device panel in Xcode showed the error below:

 iPhone itunesstored[83] <Warning>: Could not load download manifest with underlying error: Error Domain=NSURLErrorDomain Code=-1202 "Cannot connect to the Store".... "The certificate for this server is invalid. You might be connecting to a server that is pretending to be "[mydomain]", which could put your confidential information at risk." 

Installing an intermediate SSL certificate in Apache solved this problem.

+7
source

I had such a problem for a while and it drove me crazy. I got a pop-up window “I can’t connect to [domain]” and I saw the same error in the log “Could not connect to iTunes Store”.

The initial problem was that I did not have a ">" in my .plist XML file.

But I fixed the missing ">" and it worked on another ipad. So it had to work with the original ipad, right? Well, no, because a bad typo with a typo must have been still in the cache of this ipad.

So, the fix is ​​to either rename the .plist file, or close and reload the ipad, or find another way to clear the ipad cache from the flat plist file.

+5
source

Check for trailing slashes of your URL value for TEMP_URL and remove them. If you check the URL with trailing slashes in the browser, it will load without any problems. In the plist he will fail.

+2
source

Not sure if this would help the original poster, since I don’t know how itms-services work, but it can help others see the message “Unable to connect to [domain]”.

We tried to install a corporate deployment through Safari and continued to see this error. Plis was beautiful, and the ipa file he was pointing to would load if we entered the URL right away. However, we realized that we were making the first (pre-installed) connection through http. Changing this parameter to https allowed the installation to continue as expected.

+2
source

I was getting the same error.

In my case, ".plist" was not available.

My solution was to add the appropriate mime types to a website hosted by Internet Information Services (IIS).

Namely, ".ipa" and ".plist".

enter image description here

+2
source

We faced the same problem because the internal device date was set to a valid date range in . (January 1, 1970)

The invalid date is also invalid for the ssl certificate, and devices with 7.1+ require valid https connections to install enterprise applications.

We achieve this problem by changing the device date to the current date.

+1
source

If you tried everything else and still get the message “Cannot connect to [domain]”, make sure that the URLs inside your .plist that point to the images end with “.jpg” or “.png”. If this is a dynamically generated image, you can create a special route that ends with one of these extensions.

+1
source

Source: https://habr.com/ru/post/974532/


All Articles