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

ios not work #318

Closed
shichunlei opened this issue May 23, 2024 · 3 comments
Closed

ios not work #318

shichunlei opened this issue May 23, 2024 · 3 comments

Comments

@shichunlei
Copy link

Package version
record:5.1.0

flutter doctor

[✓] Flutter (Channel stable, 3.22.0, on macOS 13.2 22D49 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.22.0 on channel stable at /Users/***/workspace/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (8 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3
    • Pub download mirror https://pub.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/***/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/***/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
        🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
        🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

Environment

  • OS: [ios]

Logs

Swift Compiler Error (Xcode): Type 'String' has no member 'playAndRecord'
/Users/mac104/.pub-cache/hosted/pub.flutter-io.cn/record_darwin-1.1.0/ios/Classes/RecorderIOS.swift:17:34

Swift Compiler Error (Xcode): Type 'String' has no member 'playAndRecord'
/Users/mac104/.pub-cache/hosted/pub.flutter-io.cn/record_darwin-1.1.0/ios/Classes/RecorderIOS.swift:51:36

Swift Compiler Error (Xcode): 'setActive(:options:)' has been renamed to 'setActive(:with:)'
/Users/mac104/.pub-cache/hosted/pub.flutter-io.cn/record_darwin-1.1.0/ios/Classes/RecorderIOS.swift:71:23

Swift Compiler Error (Xcode): 'interruptionNotification' has been renamed to 'NSNotification.Name.AVAudioSessionInterruption'
/Users/mac104/.pub-cache/hosted/pub.flutter-io.cn/record_darwin-1.1.0/ios/Classes/RecorderIOS.swift:93:30

@llfbandit
Copy link
Owner

Please, cleanup your project.
flutter clean && flutter pub get

There's no issue here.

@shichunlei
Copy link
Author

I tried it, but it doesn't work on iOS.

@shichunlei
Copy link
Author

I added the following to the Podfile and it worked

target.build_configurations.each do |config|
       config.build_settings['SWIFT_VERSION'] = '5.10'    # add this line
end

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

2 participants