It is possible for iPhone Apps to automatically download XML files?
Like the topic title mentioned. I'm trying to make an app (for iPhone) that will automatically update itself based on the modifications done to XML but am unsure on how to go about it.
I'm torn between creating a web-based app and a real app for a particular project that keeps track of events happening in a country, so any tip开发者_如何学Pythons regarding these two different methods are greatly appreciated.
NSTimer *timer = [NSTimer scheduledTimerWithInterval: 1.0 target:self selector:@selector(targetMethod) userInfo:nil repeats: YES];
targetmethod is your method to read xml and update your page after that. repeat yes if you want to repeat it again and again repeat NO if you want to execute it once. scheduledTimerWithInterval:1.0 represents 1 second. change it to 30 for 30 seconds or 120 for 2 minutes.
i dont know how to create web based application, but i know how to parse xml data. Let me know if you need any information on xml parsing.
i think you are trying to update contents of your screen like stock price in stock market app. you can do this with the help of a timer (check NSTimer).
Create a web-based app, and any modification in XML on server side will be reflected back in your app if you use random string at the end of each webservice call in your iphone side code.
精彩评论