Notice

The forum is in read only mode.

  • Page:
  • 1

TOPIC: How to save user settings in Android/iOS Apps?

How to save user settings in Android/iOS Apps? 7 years 3 months ago #1831

Hi Everybody,
I need take the right steps in the right direction to do this with Appmethod 1.16 or XE8.

How do I supposed to implement save user settings in an Android/iOS applications? That means I need keep coding one project for both platforms.

I was looking this example, but it says only for Android:
francois-piette.blogspot.be/2014/01/tini...oid-and-windows.html

but, what is the right class/component in order to do it well done?

Thanks in Advance!

How to save user settings in Android/iOS Apps? 7 years 3 months ago #1836

on android its easy
you just use tinifile
and use
e.g
myifile:=TIniFile.Create(GetHomePath+'myini.ini');

on iOS
I use the units
Apple.IniFiles, Apple.Utils
(google search for these authored files by a well known pascal developer/supporter)
and then declare as
e.g
myifile:=TuserIniFile.Create;

i.e no name
and when using, there is only 1 field
e.g

mystr:=urlinifile.readstring('mydata1','');

instead of

mystr:=urlinifile.readstring('mysettings','mydata1','');

and use the idef blocks so same code can be used
i,e
{$IFDEF iOS}
//code
{$ENDIF}
or
{$IFDEF Android}
//code
{$ENDIF}
The following user(s) said Thank You: Francisco
  • Page:
  • 1
Moderators: April Anne