newTextField working on simulator but not on iOS7

Hey guys - while we try to have public releases be as bullet proof as possible, it’s very tough to do when dealing with a platform of this complexity. There was also some interaction here with a new OS, which we have no control over. So it is inevitable that a few things like this will sometimes appear in a public release.

The good news is that we try to be very responsive and that is what our daily builds are for. So this is now fixed in daily builds. And yes, daily builds are only available to subscribers, but we are a business and have to keep the lights on somehow. As Rob said, we are working hard on the next public release and it will be here in the next couple of months.

David

David,

Thanks for the quick response. I definitely understand where you all are coming from about making money (day job is a small battery business manager). I guess from my view is that the text field issue is more of an unexpected issue than a new feature. Like I said earlier I am trying to figure out my options when my pro runs out (as a hobbyist 600 is probably too much for me) and I guess it bothers me that if I was using the public build to make my app and I ran into this issue, I would have to wait around two months to get a fix to my users. Again I used to work for a large software corporation and understand not release a new build or version for every issue, but what I saw with the text field in IOS 7 was not a small issue. 

Again thanks for the quick response, I am a big fan of the platform and just trying to figure out my future plans.

Travis

Travis you do make a good point.  I had to use daily build when ios 6 came out to fix a issue and I was a little leary about using it but had no choice.  If you poke around you will find that the text input issues for ios 7 were discovered before it was released to the public.  I took the app out of the app store when the ios 7 issues showed up and it was a really new app so it didnt effect that many people but if it was one of my other apps I would have got alot of flack in that week.  Id like to see more time spent on getting ahead the bugs from new ios versions than the boatloads of new features.  Just my input.  Still a great platform.

Cheers

Rick

For what its worth to anyone finding this by a search I just discovered that in my case native.textBox works where textfield doesnt and its easy enough to make a textbox act like a textfield 

What version of Corona are you building with?

I’m building with last one 1210.

Just to clarify, the app version I have now on the app store built like months ago, was working before iOS7 with latest iOS6 version but does not work now either (same way as the latest version I am building with latest build). I can see the textfield, and the keyboard appears but when i tap the keyboard no characters seem to be grabbed at all.

I’ll try with the interface sample code from latest build to see what happens, but will have to wait until tomorrow morning when I get to the office (midnight now here).

That’s a good idea.  I have an app published pre-iOS 7 with text fields and they still work after the device got updated to iOS 7.  

[quote name=“JonPM” post=“206217” timestamp=“1379975554”]That’s a good idea.  I have an app published pre-iOS 7 with text fields and they still work after the device got updated to iOS 7.  [/quote] We’ll that’s good news! I am relieved now I just need to find out what I am doing wrong

Hey, I have similar issue. Using 2013.1202, I get input on simulator on OSX but not on the iPad 2 running iOS7. Just blinking cursor, no detection of input in my fieldHandler. Tried this with console and got this:

Sep 24 12:17:45 Jyrkis-iPad kbd[169] \<Warning\>: -[PFUbiquitySwitchboardEntryMetadata setUseLocalStorage:](754): CoreData: Ubiquity: &nbsp;mobile~74D149EF-A5D4-532E-B4AB-AD3650B3B44D:UserDictionary &nbsp;&nbsp;&nbsp;&nbsp;Using local storage: 1 Sep 24 12:17:46 Jyrkis-iPad kbd[169] \<Warning\>: -[PFUbiquitySetupAssistant canReadFromUbiquityRootLocation:](1350): CoreData: Ubiquity: &nbsp;Error attempting to read ubiquity root url: file:///private/var/mobile/Library/Mobile%20Documents/com~apple~TextInput/Dictionaries/. &nbsp;&nbsp;&nbsp;&nbsp;Error: Error Domain=NSCocoaErrorDomain Code=134323 "The operation couldn’t be completed. (Cocoa error 134323.)" UserInfo=0x17561ef0 {NSAffectedObjectsErrorKey=\<PFUbiquityLocation: 0x17574f90\>: /var/mobile/Library/Mobile Documents/com~apple~TextInput} &nbsp;&nbsp;&nbsp;&nbsp;userInfo: { &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;NSAffectedObjectsErrorKey = "\<PFUbiquityLocation: 0x17574f90\>: /var/mobile/Library/Mobile Documents/com~apple~TextInput"; &nbsp;&nbsp;&nbsp;&nbsp;} Sep 24 12:17:46 Jyrkis-iPad kbd[169] \<Warning\>: -[PFUbiquitySetupAssistant finishSetupWithRetry:](811): CoreData: Ubiquity: &nbsp;\<PFUbiquitySetupAssistant: 0x1762b9e0\>: Retrying after delay: 60 &nbsp;

I do have “userInput” event handler bound to the field, and the event.phase==“editing” part seems to cause troubles. Other fields are working though. Any ideas?

Hi,

Well I tried the sample code for Native Keyboard and works fine, so there must be something wrong in my code interferring there.

This is the full code of the textfield:

local serialNumField local function serialNumFieldDelayCreation( event ) serialNumField = native.newTextField( \_W\*0.5 - 90, searchCodeGroup.y+FindLotText.y+FindLotText.height+12, 180, 30 ) serialNumField.font = native.newFont( "HelveticaNeue-Light", 14 ) serialNumField.align = "center" serialNumField.hasBackground = false; local function fieldHandler3( textField ) print("entered fieldHandler3") return function( event ) if ( "began" == event.phase ) then print("began") elseif ( "ended" == event.phase ) then currentSerialNumberEntered=myfunctions.trim(serialNumField.text) elseif ( "editing" == event.phase ) then print( "editing newtext: "..serialNumField.text.." - "..event.target.text.." - "..textField().text ) serialNumField.text =string.upper(serialNumField.text) elseif ( "submitted" == event.phase ) then print( "submitted newtext: "..serialNumField.text.." - "..event.target.text.." - "..textField().text ) currentSerialNumberEntered=myfunctions.trim(serialNumField.text) -- Hide keyboard native.setKeyboardFocus( nil ) end end end serialNumField:addEventListener( "userInput", fieldHandler3( function() return serialNumField end ) ) end --Adding delay to not interfere with other layers, giving them time to hide timer.performWithDelay(500, serialNumFieldDelayCreation )

When I run the app in the simulator I see the prints while editing with al the three possible ways to gather the text entered filled in correctly.

So for instance if I write “Hello”, i see printed

“editing newtext: HELLo - HELLo - HELLo”

Last character not yet in upper case.

But When I run the app on the device I do not see anything appear on the textfield and in console in Xcode I get:

“editing newtext: - -”

I keep troubleshooting see what I can find :frowning:

LOL funny part,

Tested on the device using the speech to text from the keyboard and the result got inserted into the field and printed in the console during the editing phase, but the keyboard is not responding I cannot edit nor delete the text in the textfield

UPDATE: I just read Tom’s post in the iOS7 Beta Build that the native.textField editing issue was fixed. Just tried the 6.1 build on a iOS 7 device and this appears to be fixed - at least for my situation. Thanks Corona team!

I have a similar situation where I intercept keys for the textfield. I found the textfield to work fine on both ios7 and ios6 devices when built for ios7 but unfortunately we can’t build for distribution yet. Who knows how long we have to wait!

The previous ios6 build does not work on an ios7 device. Strange but true.

Hello,

I have an issue regarding text fields too after updating my device to iOS7. I’m glad your issue got fixed, but here’s what’s wrong with mine:

The text field intercepts my input as double. For instance, if I enter the number “4” in my text field, the print statement in the simulator terminal shows “4”, however the device console shows “44”. This happens randomly, as in sometimes it’s repeated, sometimes it’s not.

I know for a fact it’s not my code because pre-iOS7 this worked fine, plus the fact that the simulator log is showing the correct entered value, while the device log is showing a repeated value. I’m using the “number” keyboard input.

To further check, I ran the Native Keyboard sample code and added a print statement in the “editing” phase. To my surprise, instead of it getting repeated, it actually started delaying the output. For instance, while typing “Test”, nothing appeared until I entered the “s”.

So to sum up, the text fields are cranky. Can anyone else please confirm this or give a possible fix?

P.S: I’m running iOS7 on iPhone4 and using build 1210.

I’m working with engineering to look into this. 

Hi Rob, thanks for the interest.

I finally managed to fix my code. I copied my code into the keyboard interface sample code, and built it several times until I made it work.

I had to move the declaration of the fieldHandler function to the top of the lua file before the “function scene:createScene( event )” of the storyboard code, and now it detects the keyboard.

I believe serialNumField.text = string.upper(serialNumField.text) is causing this glitch. I’m having the same problem when I’m trying to limit the number of characters. I’m testing on an iPhone 5 with iOS7 using build 1170 still. (I installed build 1210 to try to fix this problem specifically, which it didn’t work on this one as well).

Any help on how to limit characters for iOS 7 would be grateful.

@RedPistonEB, you are going to have to use 1217 or later to work past all iOS 7 keyboard related issues.

Hey Rob, thanks for the update, the new build is working fine for me.

Good to hear!

Thanks for posting this, was hitting my head against the wall wondering why the keyboard input on device wouldn’t work. Going to try a daily build above 1217.