Posts

Post not yet marked as solved
0 Replies
244 Views
Hello, We've an iOS application that can be launched on macOS (with the "designed for iPhone" available with Catalyst). This application request authorization on MPMediaLibrary and play MPMediaItem with an audio player. After accepted, the authorization status is well flagged as .authorized I can browse all MPMediaItem without issue and display them in my app. But, when it comes the time to convert the MPMediaItem file's URL in AVAudioFile with: AVAudioFile(forReading: fileURL) We got 2 warnings in the console: ExtAudioFile.cpp:211 about to throw -54: open audio file AVAEInternal.h:109 [AVAudioFile.mm:135:AVAudioFileImpl: (ExtAudioFileOpenURL((CFURLRef)fileURL, &_extAudioFile)): error -54 We finally get an exception with this error: Error Domain=com.apple.coreaudio.avfaudio Code=-54 "(null)" UserInfo={failed call=ExtAudioFileOpenURL((CFURLRef)fileURL, &_extAudioFile)} This working perfectly on iOS and iPadOS, but with Catalyst we always got this error whatever the audio (from iTunes library) we try to play. Why do we have this permission issue only on macOS ? There is something different to do to get permission on macOS ? thanks !
Posted
by JHW.
Last updated
.
Post not yet marked as solved
3 Replies
618 Views
Hello, I need to get all files (recursively) from an iCloud Drive folder. So I use UIDocumentPickerController with UTType.folder. Then I use FileManager to get all files from the picked folder, but when I try to access it with startAccessingSecurityScopedResource it return false. It's work perfectly if I dont get files by FileManager but directly by the UIDocumentPickerController when configured for multiple files selection. How can I access to all files from a picked directory with permission granted ? Is it at least possible ? Thanks
Posted
by JHW.
Last updated
.