iOS Question Publishing of a closed circuit application

ThePuiu

Active Member
Licensed User
Longtime User
I have an application that will be used only by the employees of a company. This is a small number of users, say 50. Reading the posting conditions on the apple site, I found the following phrase:
"The App Store is a great way to reach hundreds of millions of people around the world. If you build an app that you just want to show to family and friends, the App Store isn’t the best way to do that. Consider using Xcode to install your app on a device for free or use Ad Hoc distribution available to Apple Developer Program members. "

Under these circumstances, is there an alternative way to provide customers a B4I application without it being published in the App Store?
I know that there is the possibility of adding a number of about 100 devices to the developer account, but this is not a solution for me.
 

OliverA

Expert
Licensed User
Longtime User
Upvote 0

nwhitfield

Active Member
Licensed User
Longtime User
If you know the UDIDs of the devices, and add them all to the provisioning profile, you could then have the app on the company website - biggest issue is that if anyone changes their phone, you'll have to do another build to include the UDID, though. If you want the example plist file that's needed to deliver an ipa from the webserver, I can post that

You could - though it's strictly against the terms - have a version on Testflight, with people being invited by Apple ID instead. You'd have to upload a new one every 90 days, and at some point, I guess Apple might wonder why it's never going beyond beta...
 
Upvote 0

nwhitfield

Active Member
Licensed User
Longtime User
OK. Well, first, your download link on your server has to be of a special itms-services type (all the references here are to stuff on my bluf.com site, but it'll be easy enough to work out what you need to change)

B4X:
a href="itms-services://?action=download-manifest&url=https://bluf.com/apps/manifest.plist"

The plist file, which you put at whatever address you specified in the link, looks like this; again, it should be easy enough to edit, and save as manifest.plist somewhere appropriate on your server.

B4X:
<?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://bluf.com/apps/Navigator.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.bluf.navigator</string>
                <key>bundle-version</key>
                <string>0.9.9</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>Navigator</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>
 
Upvote 0

nwhitfield

Active Member
Licensed User
Longtime User
PS. Don't forget that https is mandatory for this; you can't self-host a file on a server that doens't have a valid certificate.
 
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
I bought an ASP hosting subscription on smarterasp.net. Here I benefit from the installation of an SSL certificate. What should I do to enable ITMS on it?
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I dont think any special configuration is necessary, all you need is a manifest.plist file in the directory at which you want to place the ipa file.

in my case, I had mine in https://xxxx.xxxx.com/ios/FB00.apk, as well as the manifest.plist in the same directory.

For example. a manifest would be:
B4X:
<?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://xxxx.xxxx.com/ios/FB00.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.xxxx.fb00</string>
<key>bundle-version</key>
<string>2.0.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Football FB00</string>
</dict>
</dict>
</array>
</dict>
</plist>

Then the link to access would be:
itms-services://?action=download-manifest&url=https://xxxx.xxxx.com/ios/manifest.plist
 
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
1. If I add a new UDID to the list of devices and recreate the provision file, on the phones that the application was previously installed, will it still work or need to be reinstalled with the new provision file?
2. What kind of certificate must be used to distribute the application in this way?
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
1. The application does not need to be reinstalled on any phone that it is installed on, At least until the certificate expires. Once the certificate expires, you would need to re-sign and reinstall the application. Or it wont run.

However, for each and every new device you add, you have to reupload the new IPA file that has been signed with the updated AD-HOC certificates.

2. AD-HOC distribution certificate, Not the App Store certificate. No different than installing an app on your development device that is not in debug mode.

BE AWARE!! Apple limits you to 100 devices AD-HOC, thats it. After that, you need an enterprise account.
 
Upvote 0

nwhitfield

Active Member
Licensed User
Longtime User
You don't need to do anything to enable 'itms' - it's a type of link that Safari recognises, and passes to the appropriate bit in the iPhone, which then grabs the manifest file via ordinary https. So as long as you can serve https you'll be fine.

Regarding the 100 devices limit, isn't that per year? It resets when you renew, so you can clear out unused devices then, and start with a new batch
 
Upvote 0

keirS

Well-Known Member
Licensed User
Longtime User
Under these circumstances, is there an alternative way to provide customers a B4I application without it being published in the App Store? I know that there is the possibility of adding a number of about 100 devices to the developer account, but this is not a solution for me.

Get your client to apply for their own developer account and use their certificates to build the app. Apple are perfectly happy with this approach (I asked them recently) for clients that do not qualify for the Apple Enterprise Developer Program: https://developer.apple.com/programs/enterprise/
 
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
So I bought an ASP hosting with a simple SSL certificate and at the root I copied the manifest.plist file:
B4X:
<?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://xxx.ro/extrasetrezo.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>xxx.extrasetrezo</string>
<key>bundle-version</key>
<string>1.0.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Extrase trezo</string>
</dict>
</dict>
</array>
</dict>
</plist>

At metadata key I need to write the package name, in my case: xxx.extrasetrezo ?

and a tag is:
B4X:
<a href="itms-services://?action=download-manifest&url=https://xxx.ro/manifest.plist">download here</a>

If I open Safari on the phone and navigate to the page where the download link is and click on it, I get a message: Cannot connect to xxx.ro

My UDID exists in the AD-HOC certificate.

Do I need to configure anything at MIME on the IIS server?
 
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
I found the following on the net:

Extension=.ipa
MIME type= application/octet-stream

Extension=.plist
MIME type= text/xml
and now everything seems to be going perfectly!

I also found this paragraph:

B4X:
The provisioning profile will expire after two months of it being created. You can check the expiry date when the provisioning profile is installed on a device through the Settings app. In order for the app to continue to run on the devices it is installed on, you will need to digitally sign the app with a new provisioning profile, which you will need a paid developer account for.
(https://stackoverflow.com/a/5205818)

it is real?? The developer.apple.com is down now (!) and I can't search for references on this topic.

Thanks to everyone who was kind enough to help me!
 
Upvote 0
Top