IsaiasSantana / keyboard_utils

A Flutter plugin to check keyboard visibility.
MIT License
49 stars 49 forks source link

Could not build iOS App #16

Closed SebastianKlaiber closed 4 years ago

SebastianKlaiber commented 4 years ago

/flutter/.pub-cache/hosted/pub.dartlang.org/keyboard_utils-1.2.0/ios/Classes/SwiftKeyboardUtilsPlugin.swift:49:66: error: type 'UIResponder' has no member 'NSNotification' name: UIResponder.NSNotification.Name.UIKeyboardWillShow,


   /flutter/.pub-cache/hosted/pub.dartlang.org/keyboard_utils-1.2.0/ios/Classes/SwiftKeyboardUtilsPlugin.swift:54:66: error: type 'UIResponder' has no member 'NSNotification'
                                                   name: UIResponder.NSNotification.Name.UIKeyboardWillHide,
                                                         ~~~~~~~~~~~ ^~~~~~~~~~~~~~
   /flutter/.pub-cache/hosted/pub.dartlang.org/keyboard_utils-1.2.0/ios/Classes/SwiftKeyboardUtilsPlugin.swift:59:66: error: type 'UIResponder' has no member 'NSNotification'
                                                   name: UIResponder.NSNotification.Name.UIKeyboardDidShow,
                                                         ~~~~~~~~~~~ ^~~~~~~~~~~~~~
    /flutter/.pub-cache/hosted/pub.dartlang.org/keyboard_utils-1.2.0/ios/Classes/SwiftKeyboardUtilsPlugin.swift:73:80: error: type 'UIResponder' has no member 'UIKeyboardFrameEndUserInfoKey'
                if let keyboardFrame: NSValue = notification.userInfo?[UIResponder.UIKeyboardFrameEndUserInfoKey] as? NSValue {

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.17.0, on Mac OS X 10.15.3 19D76, locale de-DE)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[!] Android Studio (version 3.6)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.44.0)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.
IsaiasSantana commented 4 years ago

Hi, @SebastianKlaiber what is your swift project version? Try update to Swift 5. Similar to #13

SebastianKlaiber commented 4 years ago
Bildschirmfoto 2020-04-09 um 16 28 31
lucas-sesti commented 4 years ago

I got the error too, but is not about UIResponder.. my error is: /flutter/.pub-cache/hosted/pub.dartlang.org/keyboard_utils-1.2.0/ios/Classes/KeyboardUtilsPlugin.m:2:9: fatal error: 'keyboard_utils/keyboard_utils-Swift.h' file not found

import <keyboard_utils/keyboard_utils-Swift.h>

how can i fixed?

IsaiasSantana commented 4 years ago

@lucas-sesti @SebastianKlaiber I fail to reproduce this problem. I will try to reproduce here.

lucas-sesti commented 4 years ago

Alrigth, thats is my dependencies: dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter cupertino_icons: ^0.1.2 bloc_pattern: ^2.5.1 http: ^0.12.0+2 flutter_secure_storage: ^3.2.1+1 rxdart: ^0.23.0 cached_network_image: ^2.0.0 flutter_svg: ^0.17.3+1 table_calendar: ^2.2.2 flutter_masked_text: ^0.8.0 intercom_flutter: ^2.1.1 url_launcher: ^5.4.2 dropdown_banner: ^1.4.0 menu_button: ^0.1.1+1 connectivity: ^0.4.8+2 firebase_core: ^0.4.4+3 firebase_messaging: ^6.0.13 flutter_rating_bar: ^3.0.1+1 percent_indicator: ^2.1.1+1 flutter_typeahead: ^1.8.0 uni_links: ^0.2.0 flutter_form_bloc: ^0.12.2

and i got this error when i added flutter_form_bloc, i created issue in flutter form bloc too, because if the error is really in the keyboard_utils, i can fix in the flutter form bloc and create new pull request..

SebastianKlaiber commented 4 years ago

With the new flutter version on the beta channel, the library is working on iOS. But now I have some issues with the custom keyboards on Android. Should I open a new issue for that?

LostInDarkMath commented 2 years ago

@lucas-sesti How did you solve your problem? I currently have the same problem :(

lucas-sesti commented 2 years ago

I had to change the dependency :(

jayjah commented 2 years ago

You probably need to update your min deployment targets. At least it solved it for me.