Page 1 of 1

Need some help with iOS native fields.

Posted: Thu Jun 08, 2023 10:18 pm
by Virgil
I am having trouble saving the data from native iOS fields to the matching standard fields.
I have a stack with a card that has 4 native iOS fields.
One of them is a multiline native iOS field.
Each field is created and deleted based on the code from the LiveCode iOS native field sample.
The sample code works when there is only one native field but not multiple and definitely not when there is a multiline field in that group.

If anybody has a working sample I would sure like to see it.

-Virgil

Re: Need some help with iOS native fields.

Posted: Thu Jun 08, 2023 11:03 pm
by dunbarx
Hi.
The sample code works when there is only one native field but not multiple and definitely not when there is a multiline field in that group.
I do not do mobile, but that statement seems very odd to me. With those multiple or multiline fields, does the app run in the IDE?

Craig

Re: Need some help with iOS native fields.

Posted: Fri Jun 09, 2023 12:33 am
by Virgil
It runs in the iPhone simulator and on the actual phone.

Re: Need some help with iOS native fields.

Posted: Fri Jun 09, 2023 1:23 am
by Virgil
The iOS fields are not active unless the environment is mobile. So you need to be in simulated on on an actual iOS device.

Re: Need some help with iOS native fields.

Posted: Fri Jun 09, 2023 8:46 am
by Klaus
Hi Virgil,

welcome to the forum!

Could you please post the script(s) that you use?
Thanks!

Best

Klaus

Re: Need some help with iOS native fields.

Posted: Fri Jun 09, 2023 1:21 pm
by Virgil
Hi Klaus,

Please find a demo stack and sql. file attached that use the iOS fields.
I ripped this from the last version of my application before I gave up and removed the iOS fields.
I made it generic and cleaned it up a bit.
Thanks in advance for looking at it.

-Virgil

Re: Need some help with iOS native fields.

Posted: Mon Jun 19, 2023 12:58 am
by Virgil
I believe I have solved the issues concerning the native fields.
I am attaching the demonstration stack I created.
I'm sure there is a cleaner, more efficient way to script this but it is working in the simulator.
I have not been able to load it to any devices yet.

There are some scripts and techniques that new users may find useful.
The stack demonstrates the following items:

• Create, update and delete data from a SqLite database.
• Populate a scrolling list field from a SqLite database.
• Navigate to a detail card from the list field and populate it with data from the SqLite db.
• Highlight and scroll into view the last selected item when returning to the list from the detail card.

Give it a try and let me know what you think.

-Virgil