Submitting for Both iPhone and iPad
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 95
- Joined: Wed Mar 30, 2011 10:15 am
Submitting for Both iPhone and iPad
How do you submit for both iPhone and iPad, since LiveCode only asks for one icon size, and iTunes requires different icon sizes for ipad and the iphone?
I could just submit two apps, one for the iphone and one for the ipad, but then they would have different names.
I could just submit two apps, one for the iphone and one for the ipad, but then they would have different names.
Re: Submitting for Both iPhone and iPad
Couple of ways:
1
Make 2 stacks, one for each size of screen you want to support, duplicating all your controls, fields etc. in the right positions and at the right sizes for each screen size. Those are your target stacks.
Make a start up stack with the target stacks listed in the Copy Files part of the standalone settings for your app. Compile the start up stack when you make your iOS standalone.
The first time your app is launched on the device/simulator, run a script in the startup stack to copy the other stacks to the Documents folder on the device/simulator.
On the first and subsequent launches, go to the appropriate target stack for the device.
2
Make one stack, and use re-sizing and repositioning code to change its size, and move and switch all your controls etc, depending on which device the app finds itself running on.
I've done both, and there are pros and cons to each, depending on each circumstance.
Good luck
Gerry
1
Make 2 stacks, one for each size of screen you want to support, duplicating all your controls, fields etc. in the right positions and at the right sizes for each screen size. Those are your target stacks.
Make a start up stack with the target stacks listed in the Copy Files part of the standalone settings for your app. Compile the start up stack when you make your iOS standalone.
The first time your app is launched on the device/simulator, run a script in the startup stack to copy the other stacks to the Documents folder on the device/simulator.
On the first and subsequent launches, go to the appropriate target stack for the device.
2
Make one stack, and use re-sizing and repositioning code to change its size, and move and switch all your controls etc, depending on which device the app finds itself running on.
I've done both, and there are pros and cons to each, depending on each circumstance.
Good luck

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
-
- Posts: 95
- Joined: Wed Mar 30, 2011 10:15 am
Re: Submitting for Both iPhone and iPad
I mean when submitting for the app store. Apple requires icons of different sizes for ipad vs iphone apps, while livecode only gives you a place to input one icon size.
-
- Posts: 125
- Joined: Sat Jan 31, 2009 12:01 am
Re: Submitting for Both iPhone and iPad
Can one of you elaborate. I have prepared two stacks, one for iPad and one for the iphone/ipod. I made a mainstack that is invisible to open up either the iPad version or the iPhone version. Both stacks are in the "Copy File" of the standalone settings. When I put the app on the iPad, I only get a black screen.
on preOpenStack
set the visible of this stack to false
end preOpenStack
on openStack
if the environment is "mobile" then
if item 1 of iphoneDeviceResolution() = "640" then go to stack "spanish"
if item 1 of iphoneDeviceResolution() = "320" then go to stack "spanish"
if item 1 of iphoneDeviceResolution() = "768" then go to stack "spanishipad"
end if
end openStack[/color]
Where am I going wrong here?
on preOpenStack
set the visible of this stack to false
end preOpenStack
on openStack
if the environment is "mobile" then
if item 1 of iphoneDeviceResolution() = "640" then go to stack "spanish"
if item 1 of iphoneDeviceResolution() = "320" then go to stack "spanish"
if item 1 of iphoneDeviceResolution() = "768" then go to stack "spanishipad"
end if
end openStack[/color]
Where am I going wrong here?
Re: Submitting for Both iPhone and iPad
Hi Scotty,
from the "iOS Release Notes" about "iphoneDeviceResolution()":
## This will return a string in the form width, height – with the values being given in pixels.
The iPad has a resolution of 1024*768!
So it looks like you are just quering the wrong value!
Do the other conditons work?
I'm not sure about the iPhone resolutions.
Best
Klaus
from the "iOS Release Notes" about "iphoneDeviceResolution()":
## This will return a string in the form width, height – with the values being given in pixels.
The iPad has a resolution of 1024*768!
So it looks like you are just quering the wrong value!
Do the other conditons work?
I'm not sure about the iPhone resolutions.
Best
Klaus
Re: Submitting for Both iPhone and iPad
Although Livecode only asks you to specify the 57x57 icon path, it also looks for other icons and includes these if they are in the same folder as you 57x57 icon.Brittgriscom wrote:I mean when submitting for the app store. Apple requires icons of different sizes for ipad vs iphone apps, while livecode only gives you a place to input one icon size.
If your basic 57x57 icon is called 'icon.png' then you want to create the following icons for other devices...
icon.png (57x57 for iPhone original)
icon-72.png (72x72 for iPad)
icon-114.png (114x114 for iPhone Retina)
You just point live code at the icon.png file, and as long as the others are in the same folder it will do the rest.
Andy
-
- Posts: 95
- Joined: Wed Mar 30, 2011 10:15 am
Re: Submitting for Both iPhone and iPad
Great. Thanks.
Re: Submitting for Both iPhone and iPad
Hello -
I'm trying out the "three stack" method listed in this thread (i.e. using a main stack with two substacks for iPad and iPhone), and am having trouble getting my substacks to retain their "Main Stack" property.
Here is an example of my workflow:
1) Open up myMainStack and myiPadSubStack simultaneously
2) Change the "Main Stack" property of myiPadSubStack to "myMainStack"
3) Save the changes to each stack
So far so good, but...
When I return focus to myiPadSubstack after saving, I find that myiPadSubstack's "Main Stack" property has changed itself back to "myiPadSubStack". (The same holds true when I try this with myiPhoneSubStack.)
Does anyone have ideas on what I might be doing wrong? Thanks in advance for any suggestions!
--John
I'm trying out the "three stack" method listed in this thread (i.e. using a main stack with two substacks for iPad and iPhone), and am having trouble getting my substacks to retain their "Main Stack" property.
Here is an example of my workflow:
1) Open up myMainStack and myiPadSubStack simultaneously
2) Change the "Main Stack" property of myiPadSubStack to "myMainStack"
3) Save the changes to each stack
So far so good, but...
When I return focus to myiPadSubstack after saving, I find that myiPadSubstack's "Main Stack" property has changed itself back to "myiPadSubStack". (The same holds true when I try this with myiPhoneSubStack.)

Does anyone have ideas on what I might be doing wrong? Thanks in advance for any suggestions!
--John
Last edited by jlally on Thu Sep 13, 2012 12:57 am, edited 1 time in total.
Lodestone Animation, Inc.
Macaroni Art for iOS
Macaroni Art for iOS
Re: Submitting for Both iPhone and iPad
Hi John,
in cases like this you should always:
...
4. Quit and restart Livecode!
This will solve the problem most of the time
If the problem still exists we will check what's going wrong, if it works, well, fine
Best
Klaus
in cases like this you should always:
...
4. Quit and restart Livecode!
This will solve the problem most of the time

If the problem still exists we will check what's going wrong, if it works, well, fine

Best
Klaus
Re: Submitting for Both iPhone and iPad
Hello, Klaus -
I quit LiveCode and ran steps 1-3 again as was suggested, but still no luck! I must have a couple of stubborn substacks. :p
Is there another way (through code, maybe) to change the Main Stack property?
Thanks again for your help!
--John
***Edit***
I've also tried setting the "Main Stack" property of "myiPhoneSubStack" via the message box, using this line of code:
set the mainStack of this stack to "myMainStack"
However, the message box throws this (not very descriptive) error:
Script compile error:
Error description:
(BTW, both "myiPhoneSubStack" and ""myiPadSubStack" will launch independently without error on both the physical and the virtual iPhone & iPad.)
I quit LiveCode and ran steps 1-3 again as was suggested, but still no luck! I must have a couple of stubborn substacks. :p
Is there another way (through code, maybe) to change the Main Stack property?
Thanks again for your help!
--John
***Edit***
I've also tried setting the "Main Stack" property of "myiPhoneSubStack" via the message box, using this line of code:
set the mainStack of this stack to "myMainStack"
However, the message box throws this (not very descriptive) error:
Script compile error:
Error description:
(BTW, both "myiPhoneSubStack" and ""myiPadSubStack" will launch independently without error on both the physical and the virtual iPhone & iPad.)
Lodestone Animation, Inc.
Macaroni Art for iOS
Macaroni Art for iOS
Re: Submitting for Both iPhone and iPad
Do either of your substacks have their own substacks? You can't do that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Submitting for Both iPhone and iPad
Hi, jacque -
Does a Data Grid Template count as a substack? If it does, then yes - I do.
I don't suppose there is a workaround for this...?
Cheers,
John
Does a Data Grid Template count as a substack? If it does, then yes - I do.

I don't suppose there is a workaround for this...?
Cheers,
John
Lodestone Animation, Inc.
Macaroni Art for iOS
Macaroni Art for iOS
Re: Submitting for Both iPhone and iPad
That would explain it then. The easiest way to deal with it is to just leave the stacks as independent files. Include them in the Stacks pane of the standalone settings and they should be found okay when your script wants to open them.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Submitting for Both iPhone and iPad
Hi, jacque -
Thanks again for your quick reply. I took your suggestion and left my iPhone & iPad versions as independent stacks, adding them to my "Launcher" stack via the standalone pane. (For anyone else following, I also had to add a "Data Grid Templates Dud" substack so LiveCode would know to pull in the required data grid elements; See lesson here: http://lessons.runrev.com/s/lessons/m/d ... -data-grid).
The good news is - it now works in both the iPhone and in the iPad simulators!
The bad news, however, is that it does not work on the physical devices. I suspect the reason for this is that while the simulators are able to find the other stacks on my Mac, that my physical iPhone and iPad have no idea where those files are.
So my questions is: if my iPhone and iPad stacks can't be added as substacks to my Launcher (since they contain data grids), and my physical devices can't find them as independent stacks (since they live on my Mac and apparently aren't being copied), do I need to specify these stacks as files to be copied over in the "Copy Files" pane? The "Copy Files" pane specifically says that it is for copying non-stack files, so I'm not sure this will even work.
Thanks to all for any advice!
--John
Thanks again for your quick reply. I took your suggestion and left my iPhone & iPad versions as independent stacks, adding them to my "Launcher" stack via the standalone pane. (For anyone else following, I also had to add a "Data Grid Templates Dud" substack so LiveCode would know to pull in the required data grid elements; See lesson here: http://lessons.runrev.com/s/lessons/m/d ... -data-grid).
The good news is - it now works in both the iPhone and in the iPad simulators!

The bad news, however, is that it does not work on the physical devices. I suspect the reason for this is that while the simulators are able to find the other stacks on my Mac, that my physical iPhone and iPad have no idea where those files are.
So my questions is: if my iPhone and iPad stacks can't be added as substacks to my Launcher (since they contain data grids), and my physical devices can't find them as independent stacks (since they live on my Mac and apparently aren't being copied), do I need to specify these stacks as files to be copied over in the "Copy Files" pane? The "Copy Files" pane specifically says that it is for copying non-stack files, so I'm not sure this will even work.

Thanks to all for any advice!
--John
Lodestone Animation, Inc.
Macaroni Art for iOS
Macaroni Art for iOS