<div dir="ltr">Yes,<div><br></div><div style>here is an simple example:</div><div style><br></div><div style><a href="https://gist.github.com/matzew/80ef7d756c15ca774907">https://gist.github.com/matzew/80ef7d756c15ca774907</a><br>
</div><div style><br></div><div style>Run a simple app like that in Xcode:</div><div style><br></div><div style>1) in &quot;<span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:11.818181991577148px;line-height:14.545454025268555px;white-space:pre">application:</span><span style="color:rgb(0,0,0);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:11.818181991577148px;line-height:14.545454025268555px;white-space:pre">didFinishLaunchingWithOptions</span>&quot; we create the (persistent) PList store</div>
<div style>2) once the app becomes &quot;active&quot;,the &quot;<span style="color:rgb(221,17,68);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:11.818181991577148px;line-height:14.545454025268555px;white-space:pre">didFinishLaunch</span>&quot; log statement shows an empty store (surprise :))</div>
<div style>2a) Afterwards, we save some values into the store (note: the entry requires @&quot;id&quot; as it&#39;s field...).</div><div style>3) Now, on your phone, kill the iOS app (see [1] if not sure how to do that)</div>
<div style>4) start the app, via Xcode, again - and see the &quot;<span style="color:rgb(221,17,68);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:11.818181991577148px;line-height:14.545454025268555px;white-space:pre">didFinishLaunch</span>&quot; log statement now shows the values, we stored before on the &quot;<span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:11.818181991577148px;line-height:14.545454025268555px;white-space:pre">applicationDidBecomeActive</span>&quot; delegate function.</div>
<div style><br></div><div style><br></div><div style>Do you think we should be more clear on this in our docs ? </div><div style><br></div><div style>-Matthias</div><div style><br></div><div style>[1] <a href="http://www.imore.com/daily-tip-close-backgrounded-app-ios-5">http://www.imore.com/daily-tip-close-backgrounded-app-ios-5</a></div>
<div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 6, 2013 at 11:15 PM, Yavuz Selim YILMAZ <span dir="ltr">&lt;<a href="mailto:yavuzsel@buffalo.edu" target="_blank">yavuzsel@buffalo.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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.<div>
<br></div><div><pre style="font-family:Courier,Consolas,monospace;font-size:13px;line-height:18px;border:1px solid rgb(199,207,213);background-color:rgb(241,245,249);color:rgb(102,102,102);padding:0.3em 1em"><code style="font-family:Courier,Consolas,monospace">// create the datamanager
AGDataManager* dm = [AGDataManager manager];
// add a new (default) store object:
id&lt;AGStore&gt; myStore = [dm store:^(id&lt;AGStoreConfig&gt; config) {
    [config setName:@&quot;tasks&quot;];
    [config setType:@&quot;PLIST&quot;];
}]</code></pre><div><br></div><div>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&#39;t, as i lost my data manager above):</div>
<div><br></div><div><pre style="font-family:Courier,Consolas,monospace;font-size:13px;line-height:18px;border:1px solid rgb(199,207,213);background-color:rgb(241,245,249);color:rgb(102,102,102);padding:0.3em 1em"><code style="font-family:Courier,Consolas,monospace">// create the datamanager
AGDataManager* dm = [AGDataManager manager];
// add a new (default) store object:
id&lt;AGStore&gt; myStore = [dm storeWithName:@&quot;tasks&quot;]</code></pre><div><br></div></div><div class="im"><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<br>---</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Yavuz Selim Yilmaz</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
SUNY at Buffalo</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Computer Science and Engineering</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
PhD Candidate</div>
</div>
<br></div><div><div class="h5"><div><div>On Jun 6, 2013, at 5:03 PM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr">
<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 6, 2013 at 9:34 PM, Yavuz Selim YILMAZ <span dir="ltr">&lt;<a href="mailto:yavuzsel@buffalo.edu" target="_blank">yavuzsel@buffalo.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi All,<div><br></div><div>

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:</div>

<div><br></div><div>- 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)?</div></div></blockquote><div><br></div><div>there are callbacks for the lifecycle of the app</div>

<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">

<div><br></div><div>-Then, what is the difference between &quot;MEMORY&quot; type data store and &quot;PLIST&quot; type one (especially considering my goal is data persistence)?</div></div></blockquote><div><br></div><div>

<br></div><div>MEM -&gt; run of the app;</div><div>PList -&gt; property list =&gt; pers. storage on the file system (sandbox style)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><br></div><div>- 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.)</div>

</div></blockquote><div><br></div><div>store PList and use the &quot;Reachability&quot; class (Apple example OR <a href="https://github.com/tonymillion/Reachability" target="_blank">https://github.com/tonymillion/Reachability</a>)</div>

<div><br></div><div>-M</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br></div><div>Thanks for your time to read (and to respond). Bests,<br><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">

<br>---</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">

Yavuz Selim Yilmaz</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">

SUNY at Buffalo</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">

Computer Science and Engineering</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">

PhD Candidate</div>
</div>
<br></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>

<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>

twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote>
</div><br></div></div></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div>