xcode - Updating Plist file via download iOS -


I have found a quiz app on the Apple App Store. The questions are submitted in a plastering file. What I'm going to do is find a way to update the flv file by downloading a new version and every time I'm unable to present a new question to add a new question

Does anyone know a good tutorial which can help me?

Many thanks

I'm not sure about the tutorial, but you The steps are very simple to achieve: <

  • Create a URL request on your remote data
  • Parsing the returned data
  • Percead Type the data in a new local plast

    example:

      // Create an NSURL in your data NSString * Datapath = @ "www.mydata.com / Path "; NSURL * dataURL = [NSURL URLWithString: Datapath]; [[NSURLRequest alloc] initWithURL: dataURL] line: [[NSOperationQueue alloc] init] completionHandler: ^ (NSURLResponse * reaction, NSData * data, NSError // to be executed to create a asycnhronous request when completed [NSURLConnection sendAsynchronousRequest with a block * Error) {if (error) {NSLog (@ "% @", error.localizedDescription); // Control the request error} Other {// We have some data, now we need to sort it so that it is usable NSError * serializationError; NSDictionary * serializedDictionary = [NSJSONSerialization JSONObjectWithData: data option: 0 error: & serialization error]; If (serialization error) {NSLog (@ "% @", serialization error, local description); // Control the serialization error} else {// We have a serialized NSE encryption, now we want to write it. First we make a way to write it, e.g. Uers documents directory NSURL * Documents directory = [[[NSFileManager defaultManager] URLForDirectory: NSDocumentDirectory inDomains: NSUserDomainMask] lastObject]; // Then write it BOOL success = [serializedDictionary writeToFile: documentsDirectory.path atomically: yes]; If (! Success) {NSLog (@ "Error writing file"); }}}}];   

    Note: You can query your data in a remote database such as - for this you can query for new queries and simply download them so that you do not use unnecessary bandwidth Please. Instead of maintaining your local data, you may want to consider using the core data to write in writing. The main advantage of this is that you do not need to sort the entire plast in memory to use it - you can only check the special questions that you need.

    Hope this will be helpful.

  • Comments

    Popular posts from this blog

    java - ImportError: No module named py4j.java_gateway -

    python - Receiving "KeyError" after decoding json result from url -

    .net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -