简体   繁体   中英

How do I update the content of my app without releasing another version?

I have an app that basically has news and updates about a certain subject. How do I get it to work that when I update something let's say in my website it would also update what's on the app. Do I usee RSS for this?

You need some web service to deliver the data. In terms of what format a web service can use, there are a variety, but two prevalent formats are XML and JSON. RSS is, essentially, a particular form of XML.

On the iOS side, you can parse XML using NSXMLParser (see NSXML Parser Class Reference ). If you're parsing JSON, you can use NSJSONSerialization (see NSJSONSerialization Class Referece ). For both of these, you can google the class keyword followed by "example" or "demonstration" (eg, " NSXMLParser example" or " NSJSONSerialization demonstration") and you'll see tons of examples. If you have an RSS feed, you can google something like "iOS RSS example".

It may be dictated by what you can easily render from your server, XML (or, in particular, RSS) or JSON. For example, if you're using some content management system on your web site, it might offer RSS feeds, or something like that. In the absence of that, you may have to write your own server interface to retrieve the data in XML (or RSS) or JSON formats.

In addition to @Rob answer I would point couple mode things:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM