Download inhouse app from another app programmatically
Asked Answered
D

1

1

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:

  1. 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.
  2. Copy-paste just ipa url. It started to download on Mac.
  3. 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>
Destalinization answered 11/5, 2016 at 8:9 Comment(1)
is your manifest.plist file hosted on SSL enabled server? if not it will not work.Pudgy
P
1

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.

Pudgy answered 11/5, 2016 at 8:42 Comment(11)
They are all correct but same result; nothing :/ I add my plist content to the question. There is no icon on the app now.Destalinization
Yes it is SSL enabled server and MIME Types are same.Destalinization
it always try to download inhouse app with AppStoreDestalinization
It should not go on AppStore, is your download URL same as shown in example pointing to .plist file? Are you getting any error?Pudgy
You can do one thing, Upload your app bundle, plist and everything on dropbox. Point your download link there. if it works then there is some problem with your server.Pudgy
One more thing you are missing is your Display Image and small image for app in plist, All the files should be there .plist, .ipa, icon57 and icon512. Add them if missing.Pudgy
Yes it's true and no error . itms-services://?action=download-manifest&url=https://.........plistDestalinization
is it working now? Otherwise go through Apple DocumentPudgy
we have some inhouse apps also in dropbox but same for them too. but i can download ipa url via safari on iphone. But itms-service....plist url for safari it asks open it with app store. how to force it just download and not open with app store?Destalinization
My app allows to download another app inside app on button click, it works fine without any problemPudgy
the problem was on the server side. The guy didn't tell me why but after he did something it resolved. Thank you anyway. Sorry for the late response.Destalinization

© 2022 - 2024 — McMap. All rights reserved.