Skip to content
TCustomIniFile decendants for Delphi wrapping the Android, iOS and OS X Preferences APIs
Branch: master
Clone or download
chrisrolliston chrisrolliston
chrisrolliston and chrisrolliston Source
Per Google Code version, though with minor demo tweaks
Latest commit de3ba6f Jun 11, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Demos Source Jun 11, 2015
.gitignore Initial commit (no source) Jun 10, 2015
CCR.PrefsIniFile.Android.pas Source Jun 11, 2015
CCR.PrefsIniFile.Apple.pas Source Jun 11, 2015
CCR.PrefsIniFile.pas Source Jun 11, 2015
Readme.md Initial commit (no source) Jun 10, 2015

Readme.md

CCR.PrefsIniFile

Implements TCustomIniFile descendants (TAndroidPreferencesIniFile and TApplePreferencesIniFile) that delegate to the native app preferences API on Android, iOS and OS X. A factory function is also provided to allow easily creating a TCustomIniFile instance without worrying about the platform (Android/iOS/OS X/Windows).

Usage

uses
  System.IniFiles, CCR.PrefsIniFile;

procedure ReadTest;
var
  Settings: TCustomIniFile;
  Flag: Boolean;
begin
  Settings := CreateUserPreferencesIniFile;
  try
    Flag := Settings.ReadBool('General', 'NeverShowSaveConfirmationPrompt', False);
    if Flag then //...
  finally
    Settings.Free;
  end;
end;

procedure WriteTest;
var
  Settings: TCustomIniFile;
begin
  Settings := CreateUserPreferencesIniFile;
  try
    Settings.WriteBool('General', 'NeverShowSaveConfirmationPrompt', True);
  finally
    Settings.Free;
  end;
end;
You can’t perform that action at this time.