Force on screen keyboard to show when bluetooth keyboard connected
Asked Answered
P

2

12

I have to have a bluetooth scanner connected to an app I am developing. The scanner acts as a keyboard input but there are no keys, only a button to scan with. The problem I am running into is there are a few UITextFields that a user needs to interact with on the screen.

When the user taps the textfield to enter in data, no keyboard pops up because the iOS thinks there is a full keyboard attached via bluetooth.

How can I force the screen keyboard to show up when the UITextField "becomes first responder" ?

Thanks in advance!

Pastose answered 3/9, 2011 at 0:39 Comment(1)
Hi, I'm following your question as i'm facing with same issue. Did you find a way to solve this ? Can you know if the keyboard is visible or not ?From
V
8

The problem is that the Bluetooth scanner is pretending to be a Bluetooth keyboard, so iOS thinks that it doesn't need to show the onscreen one.

Unfortunately there's no easy answer for this. Some scanners have a button you can press that will force the onscreen keyboard to come up. Some allow you to pair in "iPhone mode" (or something similar) so that it doesn't act as a Bluetooth keyboard.

This answer to a related question (https://mcmap.net/q/211593/-show-iphone-soft-keyboard-even-though-a-hardware-keyboard-is-connected) has what seems like a hack based on a UITextField's inputAccessoryView, but I haven't personally verified it so I can't say much about it. Good luck!

Version answered 11/1, 2012 at 16:42 Comment(0)
B
-1

Have you tried [myTextField becomeFirstResponder];?

Becquerel answered 3/9, 2011 at 1:46 Comment(3)
Yes sir! The textfield does become active, and the "firstResponder" but the keyboard still does not show.Pastose
maybe post some code you use to create the bluetooth scanner?Becquerel
I didnt create any code. Its the default bluetooth connection. I use this device serialio.com/products/scanner/mobile/Scanfob_2002.php I bought it and connected it via the default bluetooth connection for iOS. It acts as a keyboard input. So I connected it with Settings > General > Bluetooth > add device...Pastose

© 2022 - 2024 — McMap. All rights reserved.