Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.3 Flutter run on IOS error #58

Open
SnowLittleStone opened this issue Jun 17, 2020 · 13 comments
Open

1.7.3 Flutter run on IOS error #58

SnowLittleStone opened this issue Jun 17, 2020 · 13 comments

Comments

@SnowLittleStone
Copy link

when i use Flutter 1.7.3, flutter run appear the following error

/Users/yfb/flutter/.pub-cache/hosted/pub.flutter-io.cn/audio_recorder-1.0.2/ios/Classes/SwiftAudioRecorderPlugin.swift:39:108: error:
'AVAudioSessionCategoryOptions' has been renamed to 'AVAudioSession.CategoryOptions'
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, with:
AVAudioSessionCategoryOptions.defaultToSpeaker)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AVAudioSession.CategoryOptions
AVFoundation.AVAudioSessionCategoryOptions:2:18: note: 'AVAudioSessionCategoryOptions' was obsoleted in Swift 4.2
public typealias AVAudioSessionCategoryOptions = AVAudioSession.CategoryOptions
^
/Users/yfb/flutter/.pub-cache/hosted/pub.flutter-io.cn/audio_recorder-1.0.2/ios/Classes/SwiftAudioRecorderPlugin.swift:67:52: error: cannot call value
of non-function type 'AVAudioSession.RecordPermission'
switch AVAudioSession.sharedInstance().recordPermission(){

@dannycortesv
Copy link

I'm also having this issue

1 similar comment
@progid
Copy link

progid commented Jun 26, 2020

I'm also having this issue

@JhonPreston
Copy link

I have the same issue

@Shakle
Copy link

Shakle commented Jul 3, 2020

Can't you just upgrade to the latest stable flutter version?

@D4n1378472
Copy link

Is someone working on that issue?

@dinit-lukose-sada
Copy link

Can someone solve this. We cant build with this bug

@gabrielferreir
Copy link

I'm also having this issue

@daniilsv
Copy link

Same, can't build with this bug

@kbokarius
Copy link

I'm on Flutter 1.20.1 and am getting this error.

@SnowLittleStone
Copy link
Author

you can follow the modifications below
1、in 'AVAudioSession.CategoryOptions' in 'flutter/.pub-cache/hosted/pub.flutter-io.cn/audio_recorder-1.0.2/ios/Classes/SwiftAudioRecorderPlugin.swift'
change 'try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, with: AVAudioSessionCategoryOptions.defaultToSpeaker)' to 'try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playAndRecord, options: AVAudioSession.CategoryOptions.defaultToSpeaker)'
2、in 'AVAudioSession.CategoryOptions' in 'flutter/.pub-cache/hosted/pub.flutter-io.cn/audio_recorder-1.0.2/ios/Classes/SwiftAudioRecorderPlugin.swift' change 'switch AVAudioSession.sharedInstance().recordPermission(){' to 'switch AVAudioSession.sharedInstance().recordPermission{'

@kbokarius
Copy link

@SnowLittleStone that seems to have done the trick, thank you!

@mrtian
Copy link

mrtian commented Sep 4, 2020

swift version cause it!

@jonathanwork
Copy link

merge it with master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests