-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the consoledependency: dartDart team may need to help usDart team may need to help usplatform-iosiOS applications specificallyiOS applications specifically
Description
Hello, Team Flutter!.
I have a task to hide content in a trey, I chose a radical method, I do the following
override func applicationWillResignActive(_ application: UIApplication) {
self.window.isHidden = true
}
override func applicationDidBecomeActive(_ application: UIApplication) {
self.window.isHidden = false
}
this code work, but if the textFormField is on the screen or appears, the application crashes, if tap on textFormField(keyboardShow) =>
019-01-03 23:01:14.433808+0300 Runner[30531:8999397] *** Assertion failure in -[FlutterTextInputPlugin showTextInput], ../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm:703
2019-01-03 23:01:14.556435+0300 Runner[30531:8999397]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The application must have a key window since the keyboard client must be part of the responder chain to function'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d16b1bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010c709735 objc_exception_throw + 48
2 CoreFoundation 0x000000010d16af42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010c10c877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 Flutter 0x000000010a924dec -[FlutterTextInputPlugin showTextInput] + 298
5 Flutter 0x000000010a924bda -[FlutterTextInputPlugin handleMethodCall:result:] + 149
6 Flutter 0x000000010a9137fa __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 115
7 Flutter 0x000000010a92fdc8 _ZNK5shell21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrIN5blink15PlatformMessageEEE + 166
8 Flutter 0x000000010a9337b8 _ZN5shell15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrIN5blink15PlatformMessageEEE + 38
9 Flutter 0x000000010a983d7d _ZNSt3__110__function6__funcIZN5shell5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrIN5blink15PlatformMessageEEEE4$_26NS_9allocatorIS9_EEFvvEEclEv + 57
10 Flutter 0x000000010a93f13e _ZN3fml15MessageLoopImpl15RunExpiredTasksEv + 522
11 Flutter 0x000000010a9424bc _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26
12 CoreFoundation 0x000000010d0d0f34 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
13 CoreFoundation 0x000000010d0d0b32 __CFRunLoopDoTimer + 1026
14 CoreFoundation 0x000000010d0d039a __CFRunLoopDoTimers + 266
15 CoreFoundation 0x000000010d0caa1c __CFRunLoopRun + 2252
16 CoreFoundation 0x000000010d0c9e11 CFRunLoopRunSpecific + 625
17 GraphicsServices 0x000000011196d1dd GSEventRunModal + 62
18 UIKitCore 0x0000000116c5b81d UIApplicationMain + 140
19 Runner 0x000000010a613314 main + 68
20 libdyld.dylib 0x0000000110bd9575 start + 1
21 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
flutter doctor -v
[✓] Flutter (Channel master, v1.1.6-pre.11, on Mac OS X 10.14.2 18C54, locale ru-RU)
• Flutter version 1.1.6-pre.11 at /Users/alexfix/Flutter/flutter
• Framework revision 53727866e6 (15 hours ago), 2019-01-03 12:05:53 +0700
• Engine revision 844c3274e6
• Dart version 2.1.1 (build 2.1.1-dev.0.1 88e6fe0f67)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/alexfix/Library/Android/sdk
• Android NDK at /Users/alexfix/Library/Android/sdk/ndk-bundle
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consoledependency: dartDart team may need to help usDart team may need to help usplatform-iosiOS applications specificallyiOS applications specifically