7

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?

halfer
  • 19,824
  • 17
  • 99
  • 186
HurkNburkS
  • 5,492
  • 19
  • 100
  • 183
  • I have just read else where it could be the **itms-services** in the web address.. what else could I try? – HurkNburkS Apr 04 '14 at 01:24
  • Did you install the SSL certificate of the web server as a trusted certificate on the iDevice? – borrrden Apr 04 '14 at 01:28
  • No I have not done that.. so do I just ask for them to send me the SSL certificate then I add it to the bundle? and redeploy it? – HurkNburkS Apr 04 '14 at 01:30
  • It may or may not be the problem, but have a look at this page for more info: http://blog.httpwatch.com/2013/12/12/five-tips-for-using-self-signed-ssl-certificates-with-ios/ (Tip #2) – borrrden Apr 04 '14 at 01:32
  • This did not work for me.. added the SSL Cert to the build file and went through all the steps again and still nothing – HurkNburkS Apr 04 '14 at 02:22
  • I don't know what you mean by "added it to the build file". Tip #2 says nothing about build files and such. Did you manually install the .cer file? It also might be some server side settings (such as disallowing that directory under https, etc, but I'm not familiar with server settings) – borrrden Apr 04 '14 at 02:24
  • I went to the website and downloaded the main .crt then added that into my file directory. I then build it for ad hoc enterprise deployment uploaded the file and still same error. Is that how its supposed to be done? If not then I need to look into it again however I think the issue now might be that i have the wrong ssl cert, I have requested them to send me the certificate... am still waiting – HurkNburkS Apr 04 '14 at 02:34
  • Look at Tip #2 on that page...it says email the certificate to yourself and install it (completely separate from the app) – borrrden Apr 04 '14 at 02:51
  • This dose not sound related to enterprise build? This application will be downloaded by random people in the company how can I expect them all to email themselves etc... is there not another way? – HurkNburkS Apr 04 '14 at 02:55
  • Email, download, etc, get it somehow. It needs to be done. It can't simply just be stuck in the bundle. – borrrden Apr 04 '14 at 03:10
  • I did it via email, still reciving that same message. I have contacted the web administrator to make sure the certificate I downloaded via the browser is correct.... other than that I am not sure of a solution. – HurkNburkS Apr 04 '14 at 05:24

4 Answers4

6

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.

HurkNburkS
  • 5,492
  • 19
  • 100
  • 183
  • 2
    Remember to accept your own answer. :) Your reputation will be punished if you have too many questions without accepted answers. – Abhi Beckert Apr 06 '14 at 23:03
4

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.

Community
  • 1
  • 1
Ashwin
  • 41
  • 3
2

I was receiving the same or very similar error.

My resolution was to add the appropriate mime-types to the website being hosted by Internet Information Services (IIS).

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

enter image description here

aero
  • 1,654
  • 1
  • 21
  • 31
1

I had this issue and it turned out to be the space in the .ipa file name. Removed the space and it installed just fine.

Aaron Mason
  • 310
  • 3
  • 11