Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Two things... first, <code>dataWithContentsOfURL:</code> and generally any of Apple's (temptingly convenient) <code>&lt;anything&gt;WithContentsOfURL:</code> methods are <strong>extremely unsafe</strong> in the real world. It's <strong>blocking</strong> which means that no other code will execute until your request succeeds or fails. That means that if the server isn't available or your device doesn't have internet or for some other reason cannot retrieve your data, your phone will sit there until either the iOS watchdog process kills your app for freezing for too long, or it just fails. Then the rest of your app that is expecting data will freak out because suddenly you have no data when your code assumes you should. This is one of many problems with synchronous requests. </p> <p>I won't go into how to implement asynchronous requests, but head over to Apple's documentation or you can use a wrapper framework like <a href="http://allseeing-i.com/ASIHTTPRequest/" rel="nofollow">http://allseeing-i.com/ASIHTTPRequest/</a> that does it for you. Also have a look at <a href="http://www.cocoabyss.com/foundation/nsurlconnection-synchronous-asynchronous/" rel="nofollow">http://www.cocoabyss.com/foundation/nsurlconnection-synchronous-asynchronous/</a></p> <p>To answer your actual question, you could have a tiny text file on your server with a version number or time stamp and download that along with your plist. on subsequent launches, you can pull down the time stamp/version number and compare it against the one you've got stored, and if the version on the server is more recent, then you pull it and save the new time stamp/version number.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload