Getting the Default IOS keyboard to appear on the Corona SDK

I am currently struggling to get the default Corona iOS Keyboard to appear on screen for the SDK. I’ve been able to get a textbox to appear and be able to type in it through the computer. But my goal is to get the keyboard to appear so when the user downloads the app onto their phone, they can type on the phone keyboard. Any help?

Welcome to the forums @josthomas.

If you’re running in the Corona Simulator and not on a physical device or the Xcode simulator, you will never get an iOS keyboard. You have to build and run on a device to see the keyboard which should appear automatically when you tap inside the box.

Rob

Thank you for your help! Is there a way to test it to make sure that it will work?

Hi @josthomas,

Which platform do you want to test on? Apple iOS? Or Android?

Brent

I am trying to test it on Android. So i don’t need an iOS keyboard but the default Android keyboard.

You’re testing on a physical Android device and not seeing the keyboard?

i.e. You if you try this and only this in a sample main.lua file, build it, install it on your device, run it, and still do see the keyboard pop up?

local myField = native.newTextField( 150, 150, 180, 30 ) native.setKeyboardFocus( myField )

Hi @josthomas,

For actual testing on Android, you’ll need to follow the typical steps for device testing, and use the “Debug Build” approach. Then, install it on your device. This is all pretty typical for testing on devices regardless of the toolset, but once it’s done the first time, you should be pretty well set for future testing.

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

Hope this helps,

Brent

Thank you!

Welcome to the forums @josthomas.

If you’re running in the Corona Simulator and not on a physical device or the Xcode simulator, you will never get an iOS keyboard. You have to build and run on a device to see the keyboard which should appear automatically when you tap inside the box.

Rob

Thank you for your help! Is there a way to test it to make sure that it will work?

Hi @josthomas,

Which platform do you want to test on? Apple iOS? Or Android?

Brent

I am trying to test it on Android. So i don’t need an iOS keyboard but the default Android keyboard.

You’re testing on a physical Android device and not seeing the keyboard?

i.e. You if you try this and only this in a sample main.lua file, build it, install it on your device, run it, and still do see the keyboard pop up?

local myField = native.newTextField( 150, 150, 180, 30 ) native.setKeyboardFocus( myField )

Hi @josthomas,

For actual testing on Android, you’ll need to follow the typical steps for device testing, and use the “Debug Build” approach. Then, install it on your device. This is all pretty typical for testing on devices regardless of the toolset, but once it’s done the first time, you should be pretty well set for future testing.

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

Hope this helps,

Brent

Thank you!