Search code examples
iphonesoapxcode4

Where do I download the initial data required for iPhone app?


I have an app where I need to get the list of countries,languages etc from web service and this is needed throughout the app. So, I have to call around 6 web services (SOAP). Where do I call these web services? Should it run in the background? If so the arrays will not be filled if the parsing has not finished yet and the user chooses to select a country, for example. Should I run it in appDelegate and wait till I get the list, then it might take time. This question may be dumb or repeated anywhere. I really need to know what's the best way. Any help would save me! Thanks a lot!


Solution

  • In didFinishLaunchingWithOptions you could start a new thread to download these files, then when downloading finishes, you save them in order to be used later, note that you will have to start a new thread and not use the currrent one