swiftflutterxcodeflutter-audioplayers

Cannot find 'AVURLAssetOverrideMIMETypeKey' in scope


I am using audioplayers package in my flutter app. It works well on android, but when i try to generate an archive for iOS, the build fails with the following message:

Cannot find 'AVURLAssetOverrideMIMETypeKey' in scope

and the cuasing file is WrappedMediaPlayer inside the audioplayers> audioplayers_darwin

I have been looking around for any solution but no luck so far.


Solution

  • I encountered this issue a few days ago, and here’s some information that might help.

    This problem seems to be due to Apple's restrictions on Xcode. You need Xcode version 15 or higher to use the audioPlayers package.

    An issue has been opened on the audioplayers GitHub repository:

    GitHub Issue