skip to Main Content

Swift – saving a file to icloud drive – Ios swift

I am trying to save a file to iCloud with the following code in my iOS app: if let containerUrl = FileManager.default.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents") { if !FileManager.default.fileExists(atPath: containerUrl.path, isDirectory: nil) { do { try FileManager.default.createDirectory(at: containerUrl, withIntermediateDirectories: true, attributes: nil) }…

VIEW QUESTION

AVPlayer / AVAudioPlayer – Play audio fileURL from iCloud Drive (work on simulator but not iPhone) + (OSStatus error -54.) – Ios swift

I'm making Audio Player. Importing file from iCloud Drive using .fileImporter. I get file URL that looks like this: file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/_Storage/Audio-books/%D0%91%D1%80%D0%B5%D0%BD%D0%B4%D1%8F%D1%82%D0%B8%D0%BD%D0%B0/Audiobook.mp3" Then I pass it to audio player (tried AVPlayer and AVAudioPlayer). Both works on iOS simulator. On the device after…

VIEW QUESTION
Back To Top
Search