2

I have a little app that works with iCloud. It stores audio files into the cloud. I noticed that loading the audio files from a second device doesn't work immediately. So I implemented

- (BOOL)downloadFileIfNotAvailable:(NSURL*)file

That helped but still it works sluggish. I wanted to speed up the downloading process on other iCloud devices by wrapping the audio file in a UIDocument. Is this even possible? I could store the file contents in a NSData, but is there a point (seeing as how AVAudioPlayer wants a URL)? Is there another way for me to speed up the synchronization?

Thanks

Joseph
  • 9,171
  • 8
  • 41
  • 67

1 Answers1

0

You can use NSFileCoordinator's coordinateReadingItemAtURL method for this. Take a look at the answer from this SO?

Community
  • 1
  • 1
user523234
  • 14,323
  • 10
  • 62
  • 102