Page 1 of 1

no restart when closed?

Posted: Mon Apr 28, 2014 8:19 pm
by jorgecaballero
How I can get my app on ipad not restart when closed,
I need to continue on the last card where you stay?


Thanks

Re: no restart when closed?

Posted: Mon Apr 28, 2014 9:09 pm
by jmburnod
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

Re: no restart when closed?

Posted: Tue Apr 29, 2014 4:58 am
by Simon
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

Re: no restart when closed?

Posted: Tue Apr 29, 2014 6:31 am
by jorgecaballero
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

Re: no restart when closed?

Posted: Tue Apr 29, 2014 6:40 am
by sefrojones
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

Re: no restart when closed?

Posted: Tue Apr 29, 2014 6:45 am
by Simon
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

Re: no restart when closed?

Posted: Tue Apr 29, 2014 7:04 am
by jorgecaballero
.

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





,

Re: no restart when closed?

Posted: Tue Apr 29, 2014 7:13 am
by Jellicle
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