Decimal Pad keyboard not working properly in iOS 8 - ios

I'm developing an iOS 8 app in Xcode 6.0.1 and running it on my iPhone 5 (which has iOS 8.0.2 on it). In my app, I'm using a UITextField with the Decimal Pad keyboard type (I use the Xcode storyboard to set the keyboard type). Everything worked as expected when I was using iOS 7 and Xcode 5. However, after updating my software, I'm having this problem:
Every time I click on the UITextField, the Decimal Pad keyboard pops up normally (although the decimal button in the lower left corner is a half the size it should be), but then the UITextField won't animate upwards above the keyboard (like it used to) and the following message gets printed out on the console (however, my app does not crash):
Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using 1425143906_Portrait_iPhone-Simple-Pad_Default
A number of "solutions" on the internet suggest going to iOS Simulator > Hardware > Keyboards and toggling an option in there. However, I'm not running my app on a simulator; I'm running it on my phone, so this solution does not work.
Thanks for the help!

Turns out, the issue with the UITextField animation was not due to the keyboard problem. I needed to set up constraints in Xcode's storyboard for the UITextField, make outlets for them in my view controller, and use the constraints to programmatically move the UITextField. I have that working now. However, the error message still pops up when the decimal pad comes up. I guess I can just ignore it until Apple fixes it.
EDIT:
I reported the bug to Apple.

Related

UIKeyboardWillChangeFrameNotification not always called

When developing an app for iOS, I've encountered a strange problem.
To be precise, it's about a chat app. Inside the chat view controller, the message input box should stick to the keyboard when it appears. I've got that one covered with the UIKeyboardWillChangeFrameNotification.
However, the problem is that this notification is not called when I change from the default keyboard to the emoji keyboard, which is slightly taller, the notification is not called (I'm leading both UIKeyboardWillChangeFrameNotification and UIKeyboardDidChangeFrameNotification to the same selector, none of them is called, I've tested it by doing a NSLog and setting a breakpoint). That results in the keyboard overlapping the message box. I made some screenshots to visualize the problem.
Default keyboard
Emoji keyboard
I've tested it on an iPhone X and on the iPhone 8 Plus Simulator, but there, everything's fine because the auto-completion bar makes up the difference between the two keyboards.
Am I implementing the wrong notification? How should I solve this problem?
Okay, it seems like this was an actual bug in iOS 11. It seems to be fixed in iOS 11.2.6.

Keyboard buttons disappear and keyboard rendered wrong on iOS9

I'm getting reports of keys disappearing or becoming invisible on iPhone native keyboard and have also seen this happen on my iPhone 4S. The keyboard is setup for dark appearance decimal pad.
The bug is typically accompanied by this message.
Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using 4131139949_Portrait_iPhone-Simple-Pad_Default
The problem seems to go away if I background the app and open another app and then come back.
As you can see in the screenshot the background of the keys also seems to be wrong for "dark" setting.
Snapshot of missing keys

keyboard displays in simulator on one machine, and not on another

So I just switched the keyboard type for the three textViews I have on one of my viewControllers to use the Number Pad keyboard. I also added a library (not a cocoapod) for a custom ScrollView object that I added to the view; the Scrollview makes all subviews scroll up/down to respond to instances of the keyboard being displayed onscreen.
It displays fine when I run the code on my machine's simulators (simulators for iPhones 5s and 6.) But when the other guy on the project tries it, the keyboard shows up briefly on the 5s simulator before hiding. On his simulator for the 6, the keyboard doesn't appear at all.
Could it be the custom Scrollview screwing with the UI? I'll post a link to the repo..I'd post some code but aside from this object, I can't think of anything else that could be responsible.
https://github.com/michaeltyson/TPKeyboardAvoiding
If you tap into a textfield and the keyboard does not appear, hit command+k on your physical keyboard to bring up the simulator one. You will still be able to type with your physical keyboard but the simulator one will come up as well.
Try command+shift+k. That turns on and off the simulated hardware keyboard. I have had it fix this kind of issue before, even when I didn't realize I had it turned on.

Warning in IOS when keyboard appear connect with device ( not for Simulator) [duplicate]

I have a UITextField Ctrl-dragged as an #Outlet in my .swift class.
Now in viewDidLoad i'm using this code
self.myTextField.keyboardType = UIKeyboardType.DecimalPad
When i launch my app on simulator and click on the UITextField i got this log
Can't find keyplane that supports type 8 for keyboard
iPhone-Portrait-DecimalPad;
using 2617181025_Portrait_iPhone-Simple-Pad_Default
I have no crash or something but the keyboard is not displayed. I also tried to set it from Storyboard but it's the same.
I also noticed that whenever i click on any UITextField the keyboard is never displayed (but no log is shown for the default keyboard)
I'm using Xcode-Beta 3 anyone faced this issue?
I too had this problem after updating to the latest Xcode Beta. The settings on the simulator are refreshed, so the laptop (external) keyboard was being detected. If you simply press:
iOS Simulator -> Hardware -> Keyboard -> Connect Hardware Keyboard
then the software keyboard will be displayed once again.
Go to iOS Simulator-> Hardware-> Keyboard -> Uncheck the Connect Hardware Keyboard Option.
This will fix the issue.
This message comes when the keyboard type is set to numberPad or DecimalPad. But the code works just fine. Looks like its a bug with the new Xcode.
If you're getting this bug with Xcode Beta, it's a beta bug and can be ignored (as far as I've been told). If you can build and run on a release build of Xcode without this error, then it is not your app that has the problem.
Not 100% on this, but see if this fixes the problem:
iOS Simulator -> Hardware -> Keyboard -> Toggle Software Keyboard.
Then, everything works
I have fixed this issue by unchecking 'Connect Hardware Keyboard'. Please refer to the image below to fix this issue
Xcode: 6.4 iOS:8
I got this error as well, but for a very different reason.
//UIKeyboardTypeNumberPad needs a "Done" button
UIBarButtonItem *doneBarButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:#selector(doneBarButtonTapped:)];
enhancedNumpadToolbar = [[UIToolbar alloc]init]; // previously declared
[self.enhancedNumpadToolbar setItems:#[doneBarButton]];
self.myNumberTextField.inputAccessoryView = self.enhancedNumpadToolbar; //txf previously declared
I got the same error (save mine was "type 4" rather than "type 8"), until I discovered that I was missing this line:
[self.enhancedNumpadToolbar sizeToFit];
I added it, and the sun started shining, the birds resumed chirping, and all was well with the world.
PS You would also get such an error for other mischief, such as forgetting to alloc/init.
This error had come when your keyboard input type is Number Pad.I got same error than I change my Textfield keyboard input type to Default fix my issue.
There is no "Numeric Keypad" for iPads out of the box. When you specify one iPads display the normal keypad with the numeric part displayed. You can switch over to alpha characters, etc. If you want to display a numbers only keyboard for iPad you must implement it yourself.
See here: Number keyboard in iPad?
iOS Simulator -> I/O -> Keyboard -> Connect Hardware Keyboard
I was facing similar issues but above flow chart is the fix for your issue.
For me turning on and off the setting on
iOS Simulator -> Hardware -> Keyboard -> Connect Hardware Keyboard
proved to fix the issue on simulators.

Xcode iOS 8 Keyboard types not supported

I have a UITextField Ctrl-dragged as an #Outlet in my .swift class.
Now in viewDidLoad i'm using this code
self.myTextField.keyboardType = UIKeyboardType.DecimalPad
When i launch my app on simulator and click on the UITextField i got this log
Can't find keyplane that supports type 8 for keyboard
iPhone-Portrait-DecimalPad;
using 2617181025_Portrait_iPhone-Simple-Pad_Default
I have no crash or something but the keyboard is not displayed. I also tried to set it from Storyboard but it's the same.
I also noticed that whenever i click on any UITextField the keyboard is never displayed (but no log is shown for the default keyboard)
I'm using Xcode-Beta 3 anyone faced this issue?
I too had this problem after updating to the latest Xcode Beta. The settings on the simulator are refreshed, so the laptop (external) keyboard was being detected. If you simply press:
iOS Simulator -> Hardware -> Keyboard -> Connect Hardware Keyboard
then the software keyboard will be displayed once again.
Go to iOS Simulator-> Hardware-> Keyboard -> Uncheck the Connect Hardware Keyboard Option.
This will fix the issue.
This message comes when the keyboard type is set to numberPad or DecimalPad. But the code works just fine. Looks like its a bug with the new Xcode.
If you're getting this bug with Xcode Beta, it's a beta bug and can be ignored (as far as I've been told). If you can build and run on a release build of Xcode without this error, then it is not your app that has the problem.
Not 100% on this, but see if this fixes the problem:
iOS Simulator -> Hardware -> Keyboard -> Toggle Software Keyboard.
Then, everything works
I have fixed this issue by unchecking 'Connect Hardware Keyboard'. Please refer to the image below to fix this issue
Xcode: 6.4 iOS:8
I got this error as well, but for a very different reason.
//UIKeyboardTypeNumberPad needs a "Done" button
UIBarButtonItem *doneBarButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:#selector(doneBarButtonTapped:)];
enhancedNumpadToolbar = [[UIToolbar alloc]init]; // previously declared
[self.enhancedNumpadToolbar setItems:#[doneBarButton]];
self.myNumberTextField.inputAccessoryView = self.enhancedNumpadToolbar; //txf previously declared
I got the same error (save mine was "type 4" rather than "type 8"), until I discovered that I was missing this line:
[self.enhancedNumpadToolbar sizeToFit];
I added it, and the sun started shining, the birds resumed chirping, and all was well with the world.
PS You would also get such an error for other mischief, such as forgetting to alloc/init.
This error had come when your keyboard input type is Number Pad.I got same error than I change my Textfield keyboard input type to Default fix my issue.
There is no "Numeric Keypad" for iPads out of the box. When you specify one iPads display the normal keypad with the numeric part displayed. You can switch over to alpha characters, etc. If you want to display a numbers only keyboard for iPad you must implement it yourself.
See here: Number keyboard in iPad?
iOS Simulator -> I/O -> Keyboard -> Connect Hardware Keyboard
I was facing similar issues but above flow chart is the fix for your issue.
For me turning on and off the setting on
iOS Simulator -> Hardware -> Keyboard -> Connect Hardware Keyboard
proved to fix the issue on simulators.

Resources