[aerogear-dev] iOS client side data persistence

Yavuz Selim YILMAZ yavuzsel at buffalo.edu
Thu Jun 6 17:15:20 EDT 2013


thank you for your response Matthias. i want to clarify my first question more. so, i created my data store like this when user launched the app.

// create the datamanager
AGDataManager* dm = [AGDataManager manager];
// add a new (default) store object:
id<AGStore> myStore = [dm store:^(id<AGStoreConfig> config) {
    [config setName:@"tasks"];
    [config setType:@"PLIST"];
}]

then user switched to some other app and my app eventually terminated. then user came back to my app again. how do i retrieve the data store i created above? does this work (seems like it won't, as i lost my data manager above):

// create the datamanager
AGDataManager* dm = [AGDataManager manager];
// add a new (default) store object:
id<AGStore> myStore = [dm storeWithName:@"tasks"]


---
Yavuz Selim Yilmaz
SUNY at Buffalo
Computer Science and Engineering
PhD Candidate

On Jun 6, 2013, at 5:03 PM, Matthias Wessendorf <matzew at apache.org> wrote:

> 
> 
> 
> On Thu, Jun 6, 2013 at 9:34 PM, Yavuz Selim YILMAZ <yavuzsel at buffalo.edu> wrote:
> Hi All,
> 
> I am trying out the AeroGear iOS lib, and trying to achieve client side data persistency employing AeroGear as much as possible. Here are a few questions I have, and I would appreciate any comments, suggestions and/or directions:
> 
> - So, starting from the basic question, how can I retrieve my data stores once user leaves the app and comes back (or, can I do this at all)?
> 
> there are callbacks for the lifecycle of the app
> 
>  
> 
> -Then, what is the difference between "MEMORY" type data store and "PLIST" type one (especially considering my goal is data persistence)?
> 
> 
> MEM -> run of the app;
> PList -> property list => pers. storage on the file system (sandbox style)
>  
> 
> - Or alternatively, considering what AeroGear provides for now, what would be the best approach to implement offline support for the client? (for now, what I know is the lib does not provide DataSync. so data consistency is what I will take care of on my own.)
> 
> store PList and use the "Reachability" class (Apple example OR https://github.com/tonymillion/Reachability)
> 
> -M
> 
>  
> 
> Thanks for your time to read (and to respond). Bests,
> 
> ---
> Yavuz Selim Yilmaz
> SUNY at Buffalo
> Computer Science and Engineering
> PhD Candidate
> 
> 
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
> 
> 
> 
> -- 
> Matthias Wessendorf 
> 
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130606/f3e0a1dd/attachment-0001.html 


More information about the aerogear-dev mailing list