audio_recorder
audio_recorder copied to clipboard
compiler error:
/flutter/.pub-cache/hosted/pub.dartlang.org/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 ^ /flutter/.pub-cache/hosted/pub.dartlang.org/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(){
flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en) • Flutter version 1.12.13+hotfix.9 at /Users/henan_kefa/Development/flutter • Framework revision f139b11009 (4 days ago), 2020-03-30 13:57:30 -0700 • Engine revision af51afceb8 • Dart version 2.7.2
[✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/setup/#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location. You may also want to add it to your PATH environment variable.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.4, Build version 11E146 • CocoaPods version 1.9.1
[!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
[✓] VS Code (version 1.43.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.8.1
[✓] Connected device (1 available) • iPhone 11 Pro Max • 929D6746-F0B3-4B5B-8244-3A1756C1306D • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
A bit more readable log:
Running pod install... 1,7s
Xcode build done. 3,4s
Failed to build iOS app
Error output from Xcode build:
↳
2020-04-07 09:31:24.180 xcodebuild[11333:15243969] DTDeviceKit: deviceType from f96e187ec1f51b6be1830c7965a482dc653765d2 was NULL
2020-04-07 09:31:24.260 xcodebuild[11333:15243964] DTDeviceKit: deviceType from f96e187ec1f51b6be1830c7965a482dc653765d2 was NULL
** BUILD FAILED **
Xcode's output:
↳
/Users/dominik/.pub-cache/hosted/pub.dartlang.org/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/dominik/.pub-cache/hosted/pub.dartlang.org/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(){
^ ~~
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
I also experience this error. Any chance for it to be fixed? There is already a pull-request with fixes https://github.com/ZaraclaJ/audio_recorder/pull/51/commits/7b697fae63f8aaf64da380ce84b613ed4cbe4a63
Got same error: Could not build the precompiled application for the device
.