134

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?

r4id4
  • 5,877
  • 8
  • 46
  • 76

11 Answers11

214

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.

Tony Abboud
  • 2,420
  • 1
  • 14
  • 12
34

Go to iOS Simulator-> Hardware-> Keyboard -> Uncheck the Connect Hardware Keyboard Option. This will fix the issue.

Siddharth
  • 9,349
  • 16
  • 86
  • 148
Programming Learner
  • 4,351
  • 3
  • 22
  • 34
20

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.

Gary13
  • 201
  • 2
  • 3
18

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

bradheintz
  • 3,151
  • 19
  • 24
Erik Bean
  • 647
  • 1
  • 4
  • 19
  • 1
    Hey your solutions is not working, **BUT** i tried to uncheck the `iOS Simulator -> Hardware -> Keyboard -> Connect Hardware Keyboard` , now the keyboard is shown even thought i am not able to type from my mac keyboard and the warning is still present in the logs – r4id4 Jul 22 '14 at 14:17
  • Sorry I've taken so long to reply, I've been trying to debug my own app. Whats happening is your textfields are telling your keyboard the text is a negative size. You need to either change the text size to a .xxx or resize your textfield bigger. – Erik Bean Jul 22 '14 at 16:57
  • But I simply crtl-dragged the `UITextField` from the panel to my storyboard, nothing else. Is it a bug of `Xcode-Beta 3`? – r4id4 Jul 22 '14 at 17:44
  • Try replacing the text box with a new one. I had this same problem which is how I found yours. It was caused by my text box being smaller then default. It IS possible though. Check the developer forums! – Erik Bean Jul 22 '14 at 18:02
  • I have same issue.. it works if you set the Keyboard Type to default. Not the decimal or Number pad.. very strange – Bidstrup Jul 30 '14 at 23:39
  • It seams this is mostly a beta bug, as if you run this on a non beta version it doesn't have the issue. It can easily be ignored as long as it does not affect usability. – Erik Bean Sep 02 '14 at 02:10
15

I have fixed this issue by unchecking 'Connect Hardware Keyboard'. Please refer to the image below to fix this issueenter image description here

AmitaiB
  • 1,656
  • 1
  • 19
  • 19
btmanikandan
  • 1,923
  • 2
  • 25
  • 45
4

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.

AmitaiB
  • 1,656
  • 1
  • 19
  • 19
  • 3
    I'm having this problem, and even with sizeToFit I get the same warning. – Nuno Gonçalves Sep 28 '15 at 13:50
  • I'd need to see your code to see if I have any insight, since this error can be caused by any number of things going wrong. [Sorta like entropy, or Tolstoy's _bon mot_ about dysfunctional home life: “All happy families are alike; each unhappy family is unhappy in its own way.”] Can you post it? – AmitaiB Dec 08 '15 at 20:15
0

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.

Anas
  • 335
  • 5
  • 7
0

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?

KeithTheBiped
  • 832
  • 10
  • 21
0

iOS Simulator -> I/O -> Keyboard -> Connect Hardware Keyboard

I was facing similar issues but above flow chart is the fix for your issue.

Dharman
  • 30,962
  • 25
  • 85
  • 135
0

Just press ⌘ K to toggle the keypad on simulator.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 02 '23 at 11:26
-2

For me turning on and off the setting on

iOS Simulator -> Hardware -> Keyboard -> Connect Hardware Keyboard

proved to fix the issue on simulators.

Alfonso Nava
  • 137
  • 6