no restart when closed?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

no restart when closed?

Post by jorgecaballero » Mon Apr 28, 2014 8:19 pm

How I can get my app on ipad not restart when closed,
I need to continue on the last card where you stay?


Thanks

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: no restart when closed?

Post by jmburnod » Mon Apr 28, 2014 9:09 pm

Olà Jorge,
Standalone remains as you compiled it (for all platforms)
You have to write the name of current card in a file when you quit and read it at preopenstack and go to this card.
Best regards
Jean-Marc
https://alternatic.ch

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

Re: no restart when closed?

Post by Simon » Tue Apr 29, 2014 4:58 am

Hi jorgecaballero,
Didn't you ask this already?
http://forums.runrev.com/phpBB2/viewtop ... 49&t=20045

If you trouble understanding the stack I provided just ask. :)

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

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Re: no restart when closed?

Post by jorgecaballero » Tue Apr 29, 2014 6:31 am

Hello

It worked fine in the simulator, but I uploaded it to the appstore and does not work.

Do not save the file in the "Documents" folder, create a different, you think that is the problem?
I must save the "documents" folder? or I can try it on the "Engine" folder.

What is your recommendation?

thanks

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: no restart when closed?

Post by sefrojones » Tue Apr 29, 2014 6:40 am

jorgecaballero,

You can not write to the "engine" folder, or create a new folder, so you should use specialfolderpath("documents")
Here's a link to a lesson about reading and writing files on mobile:
http://lessons.runrev.com/s/3527/m/4069 ... -on-mobile

Hope this helps

--Sefro

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

Re: no restart when closed?

Post by Simon » Tue Apr 29, 2014 6:45 am

Hi jorgecaballero,
You don't save anything with the standalone, it writes the preference file on first run.
Did you look at the preference.txt file in your documents folder while running it just in the IDE?

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

jorgecaballero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Nov 26, 2012 6:07 pm

Re: no restart when closed?

Post by jorgecaballero » Tue Apr 29, 2014 7:04 am

.

ok thanks, then that's my mistake,
will update and will use the folder "documents"





,

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: no restart when closed?

Post by Jellicle » Tue Apr 29, 2014 7:13 am

You can make a folder in the Documents folder - or just use the Documents folder to hold your file. The engine "folder" is in the app binary and as we said previously you can't change the app binary.

Did you really upload your app to the Apple app store without testing it on a device?

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply