-
-
Notifications
You must be signed in to change notification settings - Fork 885
Description
Checklist
- I read the troubleshooting guide before raising this issue
- I made sure that the issue I am raising doesn't already exist
Current bug behaviour
When building a Flutter app using the latest audioplayers package on iOS with Xcode 16.2, the build fails due to multiple Swift compiler errors in the audioplayers_darwin plugin.
Environment
- Flutter version: 3.32.4 (stable)
- macOS: 14.5 (23F79) (Darwin ARM64 via Rosetta)
- Xcode version: 16.2
- Plugin version: audioplayers:^6.5.1
Error logs
`wift Compiler Error (Xcode): Type 'AVAudioSession.Category' (aka 'NSString') has no member 'playback'
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/AudioContext.swift:8:23
Swift Compiler Error (Xcode): 'AVAudioSession.Category' (aka 'NSString') is not implicitly convertible to 'String'
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/AudioContext.swift:32:30
Swift Compiler Error (Xcode): Type 'AVAudioSession.Category?' (aka 'Optional') has no member 'ambient'
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/AudioContext.swift:62:16
Swift Compiler Error (Xcode): Extraneous argument label 'preferredTimescale:' in call
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/Utils.swift:20:30
`
Expected behaviour
When I run, I try to build my app on iOS (Just in iOS), I got an error
`wift Compiler Error (Xcode): Type 'AVAudioSession.Category' (aka 'NSString') has no member 'playback'
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/AudioContext.swift:8:23
Swift Compiler Error (Xcode): 'AVAudioSession.Category' (aka 'NSString') is not implicitly convertible to 'String'
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/AudioContext.swift:32:30
Swift Compiler Error (Xcode): Type 'AVAudioSession.Category?' (aka 'Optional') has no member 'ambient'
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/AudioContext.swift:62:16
Swift Compiler Error (Xcode): Extraneous argument label 'preferredTimescale:' in call
/Users/USER/.pub-cache/hosted/pub.dev/audioplayers_darwin-6.3.0/darwin/audioplayers_darwin/Sources/audioplayers_darwin/Utils.swift:20:30
`
Steps to reproduce
- Execute
flutter runon the code sample - ...
- ...
Code sample
Code sample
void main() {
}Affected platforms
iOS
Platform details
Flutter version: 3.32.4 (stable)
macOS: 14.5 (23F79) (Darwin ARM64 via Rosetta)
Xcode version: 16.2
AudioPlayers Version
6.5.1
Build mode
release
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
my relevant logs
Full Logs
my full logs or a link to a gist
Flutter doctor:
Output of: flutter doctor -v
Related issues / more information
No response
Working on PR
no way