Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enterprise application download cannot connect to "website address" error

I have created an Ad Hoc enterprise build.

I used the following

  • Save for enterprise or AD Hoc Deployment
  • Choose my distribution cert
  • Save as "MyAppName"
  • Select "Save for Enterprise Development"
  • Application URL "https://www.myurl.com/app/
  • Title "MyAppName"

After which I upload the build to my website

I have created a index.html page that looks like this.

<!DOCTYPE html>
<html>
<body>

<a href="itms-services://?action=download-manifest&url=itms-services://?action=download-manifest&url=https://www.myurl.com/app/MyAppName.plist" id="text">Download Here!</a>

</body>
</html>

Then when I direct my iPads safari browser to that URL and click the link I have made I get an error appear that says

"Cannot connect to www.myurl.com"

Now the address I was given was initially "HTTP" when I requested "HTTPS" due to 7.1 update in Enterprise rules the hosting company told me it will support "HTTPS" also, so I am not sure if this is what is causing the problem? or if It is something with my settings?

Update 1

I have been doing alot of reading and managed to find a helpful link to apples iOS_Deployment_Technical_Reference the last couple of pages are most helpful.

So what I have since realised is that the link I have placed inside my index.html file is incorrect... I was trying to directly link to my application, I thought I had read somewhere that when you create the archive build the manifest.plist is generated and place in the .ipa file. This as far as I can tell after reading apples deployment documentation is wrong.

The link is supposed to point to the manifest.plist file you also add to your web directory, the manifest file tells your iDevice where to go to download the application and a few other details.

At the bottom of the iOS_Deployment_Tecgnical_Refrence is an example manifest.plist file which I have now edited and added to my web directory, I have updated my index.html href to point to the manifest file.

Secondly I downloaded the websites certificate from the browser and emailed it to my iPad and installed it in reference to @borrrden comment.

After all of the above I am still reciving the error message when i click the link from my iPad "Cannot connect to www.thewebsitesname.com" in an alert box where the only option is to click okay.

This is an example of the web manifest for anyone else intrested.

<!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>
 <!-- optional. md5 every n bytes. will restart a chunk if md5 fails. -->
 <key>md5-size</key>
 <integer>10485760</integer>
 <!-- optional. array of md5 hashes for each “md5-size” sized chunk. -->
 <key>md5s</key>
 <array>
 <string>41fa64bb7a7cae5a46bfb45821ac8bba</string>
 <string>51fa64bb7a7cae5a46bfb45821ac8bba</string>
 </array>
 <!-- required. the URL of the file to download. -->
 <key>url</key>
 <string>https://www.example.com/app/AppName.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>http://www.example.com/image.57x57.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>http://www.example.com/image.512x512.jpg</
string>
</dict>
 </array><key>metadata</key>
 <dict>
 <!-- required -->
 <key>bundle-identifier</key>
 <string>com.example.fooapp</string>
 <!-- optional (software only) -->
 <key>bundle-version</key>
iOS Deployment Technical Reference Guide
 44 <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>Apple</string>
 <!-- required. the title to display during the download. -->
 <key>title</key>
 <string>App Name</string>
 </dict>
 </dict>
 </array>
</dict>
</plist>

My questions stand at this, are you supposed to generate the manifest.plist file yourself? or is there a way to do this from xcode? Secondly, what reasons are there that could be causing this error when I select the link and receive the cannot connect to website address?

like image 234
HurkNburkS Avatar asked Apr 04 '14 01:04

HurkNburkS


2 Answers

It turns out my manifest file was completely wrong. I used this as an example.

http://gknops.github.io/adHocGenerate/

So for the webpage you upload

  • myApp.ipa
  • manifest.plist
  • index.html

hope this helps.

like image 93
HurkNburkS Avatar answered Oct 08 '22 02:10

HurkNburkS


I have faced same issues but followed the below steps and solved.

Added the below MIME types in configured site server.

Extension .plist

MIME types text/xml

Extension .ipa

MIME types application/octet-stream

.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>App Name</title>
</head>

<body>
    <p><b>iOS App: Demo App</b></p>
<p>
    <a href="itms-services://?action=download-manifest&url=https://www.server.com/appname.plist">
        click this link to install
    </a>
</p>

</body>
</html>

.plist

<?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>https://www.server.com/Adhoc/Addhocdemo.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.companyname.appname</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>AdHoc Demo</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

In IOS version 10.3.1 working fine but failed in which IOS devices have IOS version below 10.3.

like image 43
Ashwin Avatar answered Oct 08 '22 04:10

Ashwin