- Home /
InputField not bringing up the keyboard on IOS
Im making a typing game for iOS but while the InputField works on a normal computer keyboard, it doesn't bring up the touch keyboard when I test it on my phone. Meaning, I can't type anything. What am I missing that would allow me to bring the touch keyboard on my phone when tapped on or just to keep it up as a default in the view. I've looked everywhere else with no success so any help will be appreciated. Thanks in advance.
I found out that if you create a new scene in the same project and add an InputField in it, this one will work. I think the problem stems from updating a project from 5.6 to 2017 and having iOS 11 on it somehow.
Ok I was able to reproduce the bug and issued a bug report: https://fogbugz.unity3d.com/default.asp?953062_0ciho7218hdsi0un
Hi,
I got the same problem that you. Not about the "default orientation disables keyboard activation", but about the "InputField not bringing up the keyboard".
Do you have some updated news about it ?
Try the beta 2017.3.0b4. With this, it's partially working for me again
Answer by Battlepad · Sep 20, 2017 at 11:55 AM
I got the same problem. But it's only not working on devices with the new iOS 11.
Answer by shochet · Sep 25, 2017 at 04:20 PM
We are getting iOS 11 customer complaints about this too. Did you find a solution? I'm working on a reproducible test case to submit as a bug today. I'm not sure if updating Unity, Xcode, or NGUI will help - or is this an iOS bug?
Unity 5.6.3f1, Xcode 8.3.3, NGUI 3.9.4
Unity 5.6.3p4 patch release seems to have fixed our problem. We were allowing portrait rotation in build settings for our onboarding flow then later disabling it in code for gameplay, which probably triggered this bug: https://issuetracker.unity3d.com/issues/ios-cannot-open-url-when-launching-fblogin-through-unity-facebook-sdk-in-portrait-only-autorotate-state
I was able to reproduce the bug and issued a bug report: https://fogbugz.unity3d.com/default.asp?953062_0ciho7218hdsi0un They seem to be working on it
Answer by UnityDev291 · Dec 16, 2017 at 06:06 PM
The following temporary hack works for me (tested with iOS 11.1.2 & 11.2.1) with Unity 5.5.5p1 (haven't tested on other Unity versions).
It appears that Keyboard.mm: UnityKeyboard_IsActive() is returning true first time around when no keyboard is active.
Open the resulting Xcode project.
Open the Keyboard.mm class under: Classes -> UI
Look for the function UnityKeyboard_IsActive() and change as follows:
BOOL isKeyboardActive = NO; // add new flag for first time ignore active state
extern "C" int UnityKeyboard_IsActive()
{
// --------------------------------
// Add the following to return false for first time test
//
if( !isKeyboardActive )
{
isKeyboardActive = YES;
return 0;
}
// --------------------------------**
return (_keyboard && _keyboard.active) ? 1 : 0;
}
See also [link text][1]
[1]: https://forum.unity.com/threads/ios-11-keyboard-not-appearing.497766/#post-3324860