I'm looking to create in app updates, currently my app creates a signed url for my plist file in my Amazon was s3 bucket, I've also created a signed url for my .ipa file and stored that signed url in my plist file, as can be seen below:
URL Call in App:
NSMutableString *downloadURL = [NSMutableString string] ;
[downloadURL appendString:#"itms-services://?action=download-manifest&url="];
[downloadURL appendString:plistURL];
NSString *ipaDownloadString = [NSString stringWithString:downloadURL];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:ipaDownloadString]];
where ipaDownloadString is a signed url appended to item-services://?action etc.
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://bucket_name.s3-eu-west-1.amazonaws.com/ipa_name.ipa?AWSAccessKeyId=xxxxxxxxxxxxx&Expires=1435587320&Signature=xxxxxxxxxxxx</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.name.DropboxTest</string>
<key>bundle-version</key>
<string>1.1</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Dropbox Test</string>
</dict>
</dict>
</array>
</dict></plist>
The urls are working when you plug them into a browser however, the app won't download the app as it should when the link is clicked.
I have tried url encoding the url in the plist to no avail.
The plist has content-type: text/plain
the ipa has content-type |: application/octet-stream
cheers,
ben
I solved this myself, for those who need this information in the future:
The url in the plist file needs to be signed and and the '&''s in said url need to be encoded in the form & .
I have found the content-type on s3 has no being on the issue at all.
I have included a sample 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>
<!-- 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>
<!-- required. the URL of the file to download. -->
<key>url</key>
<string>https://s3-eu-west-1.amazonaws.com/bucket/path-to-ipa?AWSAccessKeyId=xxxxxxxxxxxxx&Expires=1437661858&Signature=xxxxxxxxxxxxxxxxxxxxxx</string>
</dict>
<!-- display-image: the icon to display during download. -->
<dict>
<key>kind</key>
<string>display-image</string>
<key>url</key>
<string>link to image</string>
</dict>
<!-- full-size-image: the large 512×512 icon used by iTunes. -->
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>link to image</string>
</dict>
</array>
<key>metadata</key>
<dict>
<!-- required -->
<key>bundle-identifier</key>
<string>com.hostname.appname</string>
<!-- optional (software only) -->
<key>bundle-version</key>
<string>1.2.5.0</string>
<!-- required. the download kind. -->
<key>kind</key>
<string>software</string>
<!-- optional. displayed during download; -->
<!-- typically company name -->
<key>subtitle</key>
<string>Command Centre</string>
<!-- required. the title to display during the download. -->
<key>title</key>
<string>Command Centre</string>
</dict>
</dict>
</array>
</dict>
</plist>
I hope this helps someone in the future.
In my case, I replaced & with &
If I use & with & it did not work.
Related
we have a lot of inhouse apps and want an app like AppStore. We did a demo. We can open installed apps but apps,not installed on iPhone, can't be downloaded from our servers to the iPhone.
We do:
if([UIApplication sharedApplication] canOpenURL:..] == false){
NSString *schemelink = [NSString stringWithFormat:#"itms-services://?action=download-manifest&url=%#",**plist_url**];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:schemelink]]
}
The things that we do to find the reason:
Copy-paste plist url to the Mac Safari and I check the plist and it's correct everything(ipa links and others). They all at the same path.
Copy-paste just ipa url. It started to download on Mac.
Copy-paste ipa url with itms-services://?action=download-manifest&url=, it says
There is no application set to open the URL ......ipa
Search the App Store for an application that can open this document, or choose an existing application on your computer.
How can I solve it?
.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://....../AppName.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.company.AppName</string>
<key>bundle-version</key>
<string>1.3</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>AppName</string>
</dict>
</dict>
</array>
</dict>
</plist>
Your plist file should be hosted on HTTPS SSL enabled serve only otherwise you can not install it.
I have attached a sample manifest.plist file with sample data, you can modify with your original one.
<?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://127.0.0.0/app/App.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>url</key>
<string>https://127.0.0.0/app/icon57.png</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>url</key>
<string>https://127.0.0.0/app/icon512.jpg</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>Your application name</string>
</dict>
</dict>
</array>
</dict>
</plist>
Place all the following files in same directory on your server.
App.ipa
icon57.png
icon512.jpg
manifest.plist
Your download URL should look like following.
itms-services://?action=download-manifest&url=https://127.0.0.0/app/manifest.plist
Example Click here to download App.
Also make sure your server supports MIME Type of application/octet-stream for ipa and text/xml for plist.
I'm working on an application where I can use over the air deployment for iOS applications.
At runtime generated .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><![CDATA[https://myapp.com/file/d8A5s]]></string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.myapp.example</string>
<key>bundle-version</key>
<string>1</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>App Name</string>
</dict>
</dict>
</array>
</dict>
</plist>
You'll notice that the <url> tag is not a direct link to the file, it is a url that sends a redirect with a direct link to the file. When I change these lines to a direct link to the file, the installation succeeds.
<key>url</key>
<string><![CDATA[https://myapp.com/file/file.ipa]]></string>
I want to do this without a direct URL to the file in the manifest.
The content type https://myapp.com/file/d8A5s returns is application/octet-stream and I am able to download the file when I use my desktop browser to navigate to the URL.
Any help would be appreciated and I'd be happy to provide additional information.
I have a hyperlink with an href to:
itms-services://?action=download-manifest&url=https://www.example.com/myFile.plist
And it installs correctly. Before IOS 8, the app downloaded and took you to the home screen on the device where you would watch the app icon indicate downloading. From there the user could easily launch the app as a next step.
This no longer happens...
Is there something that needs to be changed in the plist to trigger this?
<?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.myexample.com/download/iOS/myenterpriseapp.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.swatchdog.enterprise</string>
<key>bundle-version</key>
<string>1.0.34</string>
<key>kind</key>
<string>software</string>
<key>subtitle</key>
<string>myApp for iPad II and above</string>
<key>title</key>
<string>SwatchDog</string>
</dict>
</dict>
</array>
</dict>
</plist>
I'm trying to deploy an app thorough a manifest file. After clicking on button in Safari, nothing happens, no error, just loading. My manifest looks like this:
<?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>
<!-- Array der Downloads. -->
<key>items</key>
<array>
<dict>
<!-- Array der zu ladenden Ressourcen -->
<key>assets</key>
<array>
<!-- Softwarepaket: die zu installierende ipa-Datei. -->
<dict>
<!-- Pflicht: die Art der Ressource. -->
<key>kind</key>
<string>software-package</string>
<!-- Pflicht: die URL der zu ladenden Datei. -->
<key>url</key>
<string>%url%</string>
</dict>
</array><key>metadata</key>
<dict>
<!-- Pflicht -->
<key>bundle-identifier</key>
<string>%bundleIdentifier%</string>
<key>bundle-version</key>
<string>%bundleVersion%</string>
<!-- Pflicht: die Art des Downloads. -->
<key>kind</key>
<string>software</string>
<!-- Pflicht: der beim Download anzuzeigende Titel. -->
<key>title</key>
<string>%title%</string>
</dict>
</dict>
</array>
</dict>
</plist>
EDIT 1
My link looks like this:
Installieren
EDIT 2
This is one of my plists:
<plist version="1.0">
<dict>
<!-- Array der Downloads. -->
<key>items</key>
<array>
<dict>
<!-- Array der zu ladenden Ressourcen -->
<key>assets</key>
<array>
<!-- Softwarepaket: die zu installierende ipa-Datei. -->
<dict>
<!-- Pflicht: die Art der Ressource. -->
<key>kind</key>
<string>software-package</string>
<!-- Pflicht: die URL der zu ladenden Datei. -->
<key>url</key>
<string>
https://someSite.de/applications/557170c4ffcb521300cacb59/versions/557170e7ffcb521300cacb5a/app.ipa?access_token=g3hf32v8h5bfeg4t50zfepwzrb9w8b3rv9382va0we7352635baivo
</string>
</dict>
</array>
<key>metadata</key>
<dict>
<!-- Pflicht -->
<key>bundle-identifier</key>
<string>com.someSite</string>
<key>bundle-version</key>
<string>0.0.1</string>
<!-- Pflicht: die Art des Downloads. -->
<key>kind</key>
<string>software</string>
<!-- Pflicht: der beim Download anzuzeigende Titel. -->
<key>title</key>
<string>MyApp</string>
</dict>
</dict>
</array>
</dict>
</plist>
Two steps, that fixed the issue:
1. Specify a display-image
2. Encode manifest-url:
e.g.
Installieren
Assuming you have a plist something like this:
<?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>http://somewebsite.com/APP.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.mycompany.APP</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>NAME OF APP</string>
</dict>
</dict>
</array>
</dict>
</plist>
And a valid .ipa then if you provide a webpage with a link to the plist like this:
Install App
Then the user should be able to install the Enterprise app assuming they have the right provisioning etc. You also need to ensure that your website allows for the user to execute .IPA files
I've read a lot of conflicting information all over the internet. Because it's such a complex process, a lot of suggestions are made "just to be safe", but it ends up wasting time because they're just one more variable that you think you have to do.
things that don't matter
URL encoding of url: you can do <a href="itms-services://?action=download-manifest&url=http://example.com/APP.plist">
mime types: It's suggested that plist = application/xml and ipa = application/octet-stream but I regularly drag to s3 and change nothing.
plist and ipa locations: they don't need to be in same place or be on same server as the anchor link. I have a site that then links directly to s3
html page in https: during testing, I found I could point to a server on the local network at 192.168.1.x which doesn't have https and it downloaded fine
things that matter
https - the plist, ipa does need to be https
query string parameters - adding ?key=value at then end of my url broke the download.
xml headers - my personal problem after 6 hours of debugging. don't forget to include the <?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">. The xml parser and writer I was using was stripping it out.
<?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://app.company.com/myapp/app.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.company.*</string>
<key>bundle-version</key>
<string>1.0.0 (1.0.0)</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Conference APp</string>
</dict>
</dict>
</array>
</dict>
</plist>
I am trying to access manifest file, to download the App on iPhone.
I point it to the manifest file but it does not seems to read it on the iOS device:
Download
The url parameter of the itms-services link needs to be properly escaped (you can't use a / character, has to be %2f) and it needs to be an absolute URL instead of a relative URL.
Try changing it to:
Download ProjectA Reports
The path was incorrect. There's not difference between this file for IOS6 and IOS7