Installing iOS app from your own website

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Installing iOS app from your own website

Post by Simon » Sat Jan 24, 2015 3:39 am

Hi there,
This has been asked a couple of times and I haven't seen a single location for all the info on how to do this. So here it is;

You will need an SSL certificate on your website (you need to hit it with https://), I think I read somewhere that you can use Dropbox but I have never tried it.
I am not describing how to get provisioning profiles to work, that is a different problem.

There are 3 groups of things to do, change .app into .ipa, build a plist file, build the index.html or linking page.

For this example the app will be called myApplication.app
version 1.0.1
The site is https://www.mySite.com

You've got your cool app as a .app courtesy of liveCode now you must change that into a .ipa
1) Make a new folder and name it Payload (case sensitive)
2) copy your .app into that new folder
3) zip (compress) the folder up
4) rename the .zip to your app name changing the extension to .ipa (e.g. Payload.zip becomes myApplication.ipa (you will have to confirm the extension change)).

Next the plist file

Code: Select all

<?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.mySite.com/wirelessInstall/myApplication.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.mySite.myApplication</string>
                <key>bundle-version</key>
                <string>1.0.1</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>myApplication</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>
The 5 things to change in there are
1) the url to myApplication.ipa (note the https://)
2) bundle-identifier (mySite.com become com.mySite.myApplication)
3) bundle-version (be careful here it must match the actual version listed in the standalone settings). -- 3 does not = 3.0 thanks Kevin!
4) title (same as above)
5) name the file myApplication.plist
the rest can stay the same.

The link for your HTML page;

Code: Select all

<p><a href="itms-services://?action=download-manifest&url=https://www.mySite.com/wirelessInstall/myApplication.plist"><img src="images/iOS-Apple_sm.png" width="100" height="100" /> iOS Device click here to install the application.</a></p>
and pretty picture
iOS-Apple_sm.png
iOS-Apple_sm.png (9.39 KiB) Viewed 8468 times
All you need to change in that link is the URL. Note that it leads to the plist not your .ipa.

Oh one last thing. Upload your files :)

I think I have listed everything, as feedback comes in I will edit this post so peeps don't have to troll through any replys.

Have Fun!
Simon
Last edited by Simon on Sun Mar 01, 2015 3:03 am, edited 3 times in total.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5683
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Installing iOS app from your own website

Post by jacque » Sat Jan 24, 2015 6:31 pm

An apk file is an android build, I don't think that's what you mean. You can't change an Android build into an iOS app.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Installing iOS app from your own website

Post by Simon » Sat Jan 24, 2015 7:06 pm

An apk file is an android build
oops! :oops:

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

trags3
Posts: 331
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Installing iOS app from your own website

Post by trags3 » Sat Jan 24, 2015 9:36 pm

Thanks Simon & Jacque,

This is clear now but I have one more question.
Just to confirm this can be done with the $99 Apple developer License on the 100 test devices?

Tom

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Installing iOS app from your own website

Post by Simon » Sat Jan 24, 2015 10:06 pm

Hi Tom,
Actually I've only used this with an Enterprise licence as my Developer license ran out.
I haven't seen any notes that this wont work with a Developer license. :roll:

The biggest problem will be ensuring your provisioning profile is correct, but if you get that working on one device adding others is easy.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

trags3
Posts: 331
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Installing iOS app from your own website

Post by trags3 » Sat Jan 24, 2015 10:28 pm

Thanks Simon, The difficulty I am having is I have changed computers, Installed xcode 6.1.1 which is newer than what I was used to.
I will get there but it is taking some time.
The app seems to compile ok but I get an error message saying that it didn't compile.
I even successfully downloaded it to a device.

Tom

stallik
Posts: 7
Joined: Sat Aug 23, 2014 7:23 pm

Re: Installing iOS app from your own website

Post by stallik » Tue Feb 24, 2015 12:33 am

Thankyou Simon, following your instructions, I'm prompted to install the app but then get a message "Unable to download App "myApp" cannot be downloaded at this time"
I have an Apple enterprise account, (as far as I can see) the correct In House provisioning profiles and am hosting the files on On-Rev with an SSL certificate
The app loads correctly to the device via a cable
Any ideas?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Installing iOS app from your own website

Post by Simon » Tue Feb 24, 2015 1:13 am

Hi stallik,
There is this;
http://help.testflightapp.com/customer/ ... this-mean-
Maybe you signed it with your Developer profile? Should be Distribution.

Write back if this is the problem so we know what works.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

stallik
Posts: 7
Joined: Sat Aug 23, 2014 7:23 pm

Re: Installing iOS app from your own website

Post by stallik » Thu Feb 26, 2015 10:36 am

Thanks Simon, I've gone through all the suggestions with no solution though I've managed to change the error messages in the iOS device log.
I have an Apple enterprise developer account and am using an in house distribution licence.
Built the app in Livecode commercial and carefully matched the bundle identifiers between the licence and the build options for the plist.
I've manually created a separate (install) plist as per your instructions again, matching bundle identifiers
The app is hosted on on-rev with an SSL certificate

link on web page is as per your instructions though wrapped in a simple table for formatting

IOS device askes if I want to install but the log contains the following:

Feb 25 00:29:40 Kevs-iPad kernel[0] <Notice>: flow_divert_token_set (0): Failed to get the key unit from the token: 22
Feb 25 00:29:40 Kevs-iPad lockdownd[24] <Error>: Could not set socket option SO_OPPORTUNISTIC: Invalid argument

and also

[cache timeout 60.00 mins]
Feb 25 00:29:51 Kevs-iPad assistant_service[176] <Warning>: the local store doesn't allow tasks and we have no default calendar :(

Am away on business but will take a good look at the next week
Thanks

stallik
Posts: 7
Joined: Sat Aug 23, 2014 7:23 pm

Re: Installing iOS app from your own website

Post by stallik » Sun Mar 01, 2015 1:32 am

I've successfully got my downloads working after correcting 2 things
1. Simon is correct about the app version number in the plist. 3 is not the same as 3.0 :roll:
2. The second thing appears a little strange to me. After correcting the above, downloads still gave errors. 2 days later, everything worked fine without me changing anything. The only thing i can think of is that the Mime type additions for .ipa and .plist which I'd created immediately prior to my last tests, had taken some time to become effective. Is there usually a delay?

Thankyou again Simon

Kevin

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Installing iOS app from your own website

Post by Simon » Sun Mar 01, 2015 1:42 am

Hi Kevin,
I'm glad you got it all working.
I didn't have to change any mime types for my server so never came across this problem. Normally I'd expect this to be instantaneous?
Wait I see you are on on-rev, me too, I'm on Diesel and didn't change mime types.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

stallik
Posts: 7
Joined: Sat Aug 23, 2014 7:23 pm

Re: Installing iOS app from your own website

Post by stallik » Sun Mar 01, 2015 11:35 am

Interesting Simon - I'm on Diesel too!

The standard Mime types through CPanel do not list ipa or plist so i added them. I too thought that these changes were instantaneous.
I'd only recently changed to static IP and added an SSL certificate - perhaps that was still settling down?

Kevin

MrFollies
Posts: 23
Joined: Tue Jul 15, 2014 8:30 am

Re: Installing iOS app from your own website

Post by MrFollies » Tue Mar 10, 2015 6:11 am

I struggled with this one over the last few nights.
I have it working thanks to the info in this thread.

One thing I struggled with was getting the provisioning right.
I found the following:
- Don't put apple's developer ID in the app name in LC. (i.e. use com.me.myapp as app name instead of 7DAF67FG8A.com.me.myapp).
- You don't need to install the provisioning profile first. Package the app as described in this thread and so long as the iPad's UDID is included in the profile, it will work fine. LC embeds the profile into the app directory (I assume that's normal, but for some reason I thought I had to provision the iPad first).
- Even if you have a self signed SSL cert you can make it work if you install the SSL certificate first by grabbing the file from your website with Safari and installing it into the keystore of the iPad.

To this end, I'm not sure now why someone would need to create an AdHoc profile. It seems to me the developer profile allows you to do what you wish (including packaging the app for web install...)

Does anyone know when you might use an AdHoc profile?

Post Reply

Return to “iOS Deployment”