简体   繁体   中英

How to display live data in iphone app?

I am building an iphone app for my local high school football team. What is the best way to show live data for the scores of games without using a sql db and having to updated the entire app after every game.

there are a few ways of doing it, one would be to create an rss feed on a remote server, and parse that, and if you wanted realtime updates, you could use push notifications.

If you plan on creating the app to only show what the end result of each game was you can use NSXMLParser as @MCannon suggests. If you plan on having the app update in REAL TIME, as in. "The ball is on the 45 Yard line, 3rd and 3". Then you can stick with NSXMLParser but create a NSTimer to update the information every 30 seconds or so.

That would also mean you would need to have the RSS feed updated in real time as well.

The only way to do what you're asking is to have the data stored on the internet in some fashion, then build into your app a routine for consulting the remote data source (on the internet) and update its internal storage accordingly.

It can be done with no DB but the data must exist and be accessible over the internet. As others have suggested, an RSS feed would be a great way to pipe in the data.

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