Hi I have arrays saved in NSUserDefaults in my ios application. I want to create a two way sync to get data from the sql server and store it in this database as well as updating the server with this database. How would i do this?
Can you explain a little better. I think I understand what you are trying to do.
First, you will need to create a server side page that will display the data you want to store on the iPhone in NSUserDefaults. I would recommend having the page display the data output in json format, then use a JSON Parser library like SBJSON to parse the data into an NSArray then you store this information in NSUserDefaults. To get this data you can use an NSURLConnection.
To send data to the server it's much of the same thing you will need to use NSURLConnection to send the data back to the server either via POST or GET methods.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With