-3

I've been looking for an answer but have been unable to find one.

What's the best way to check for a website for an update (maybe using an RSS feed?) and show

    there has been an update

on the app in Swift if there has been an update?

Any help would be appreciated,

cheers

fusion
  • 27
  • 6
  • 1
    Forget about iOS/swift for the moment. And find out in general how it can be determined if a website has been updated. – Gruntcakes Apr 21 '16 at 20:28

1 Answers1

1

I would check the last modified field in the HTTP header.

The steps would be as follows :

  1. Check the current modified field for a webpage.

  2. Store that date into a variable or persist it somewhere.

  3. At a future date check the webpage's last modified field once more.

  4. Compare the old value to the new value, if the values aren't equal then the webpage has been modified.

    Check out this link : Getting Header Response in Swift you will find how to view the http header of a given URL in Swift.

Community
  • 1
  • 1
Jonathan Eustace
  • 2,469
  • 12
  • 31
  • 54