The easiest question regarding dropbox integration in iPhone.
I followed DropBoxSDK setup and everything works fine. I can log in to my account and link it. Therefore, I set everything up correctly.
Now, I would like to use it to just download the file from dropBox and save it again. Think that you only want to sync ONE FILE (for simplicity) called "example.txt" which is located in the "Example" folder in my DropBox. The same โexample.txtโ is saved locally on the iPhone in the Documents folder of my application.
The readme file dropBox offers vaguely the following code, which I find very cryptic and cannot see how to load or save the file:
2. Make an request on the rest client: [[self restClient] loadMetadata:@"/"]; 3. Implement the DBRestClientDelegate methods needed to get the results of the particular call you made: - (void)restClient:(DBRestClient*)client loadedMetadata:(DBMetadata*)metadata { NSLog(@"Loaded metadata!"); } - (void)restClient:(DBRestClient*)client metadataUnchangedAtPath:(NSString*)path { NSLog(@"Metadata unchanged!"); } - (void)restClient:(DBRestClient*)client loadMetadataFailedWithError:(NSError*)error { NSLog(@"Error loading metadata: %@", error); }
So my (hopefully) simple question is: how can I:
- check if there is an example folder in my Dropbox
- if not, create it and save the example.txt file from the application documents to this examples folder
- load example.txt
- after program termination: save example.txt in DropBox
I cannot find the answer to these rather simple steps in the Dropbox documents on the website. The example they provided, I find it too confusing ... especially because it concerns downloading files and not saving them, as far as I can see.
I would be grateful for any help or suggestions on how to do this.
n.evermind
source share