user preferences and maintaining state

96 views
Skip to first unread message

potem...@googlemail.com

unread,
Aug 14, 2008, 7:17:04 AM8/14/08
to iPhone SDK Development
Hello,

first I want to say that I really enjoy the tutorials!
The point about Iphone development I am left most puzzled about is how
best to store user preferences and how to maintain the state of an app
when it is forced to quit by the OS.

Should I store everything in a "plist" file?

It would be great if someone could post some sample code.

Thank you very much.
Phil
Message has been deleted

iphonea...@gmail.com

unread,
Aug 17, 2008, 12:39:40 AM8/17/08
to iPhone SDK Development
Hello,

I have two new tutorials on Application Preferences.

http://www.iphonesdkarticles.com/2008/08/application-preferences.html
http://www.iphonesdkarticles.com/2008/08/application-preferences-part-2.html

Please, leave a comment and let me know what you think.

Thanks,
iPhone SDK Articles
http://www.iPhoneSDKArticles.com

On Aug 15, 7:41 am, "Lata Rastogi" <lethal.lo...@gmail.com> wrote:
> Hi
>
> I am facing a similar problem... I want to store the state of the app when a
> user leaves the app for a phone call, message etc. When he comes back, i
> want to take him to the same place where he left!
>
> Would really like some tuts on that!
>
> Thanks,
> Lata

potem...@googlemail.com

unread,
Aug 19, 2008, 9:08:46 AM8/19/08
to iPhone SDK Development
Hello,

thank you for the tutorials - great job! I have a question regarding
the invoking of the preferences within an app, but I will ask it in
the comments sections.

Back to the second part of the question of this thread on how to
maintain state. Is it possible to dump an object to memory when the
app is quitting or should
I always store the current content and data of the app in a XML file
or something similar as the application might be killed rather
aprupt?

Thanks,
Phil

On Aug 17, 6:39 am, iphoneartic...@gmail.com wrote:
> Hello,
>
> I have two new tutorials on Application Preferences.
>
> http://www.iphonesdkarticles.com/2008/08/application-preferences.htmlhttp://www.iphonesdkarticles.com/2008/08/application-preferences-part...
>
> Please, leave a comment and let me know what you think.
>
> Thanks,
> iPhone SDK Articleshttp://www.iPhoneSDKArticles.com

iphonea...@gmail.com

unread,
Aug 20, 2008, 8:13:14 PM8/20/08
to iPhone SDK Development
Hi Phil,

You can implement "applicationWillTerminate" method in your
application delegate implementation file. Which will be called if you
app is shutting down for any reason.

It depends, you store the state in the database, application
preferences, I think it would depend on the data.

I know Apple said that we could store the status of the app in their
cloud and get it again when the application is launched.

Thanks,
iPhone SDK Articles
http://www.iPhoneSDKArticles.com

On Aug 19, 9:08 am, potemki...@googlemail.com wrote:
> Hello,
>
> thank you for the tutorials - great job! I have a question regarding
> the invoking of the preferences within an app, but I will ask it in
> the comments sections.
>
> Back to the second part of the question of this thread on how to
> maintain state. Is it possible to dump an object to memory when the
> app is quitting or should
> I always store the current content and data of the app in a XML file
> or something similar as the application might be killed rather
> aprupt?
>
> Thanks,
> Phil
>
> On Aug 17, 6:39 am, iphoneartic...@gmail.com wrote:
>
> > Hello,
>
> > I have two new tutorials on Application Preferences.
>
> >http://www.iphonesdkarticles.com/2008/08/application-preferences.html......
Reply all
Reply to author
Forward
Message has been deleted
0 new messages