0

Is it possible to identify when an multi-platform application is loaded on it's very first time for the user with Delphi Firemonkey?

Machado
  • 14,105
  • 13
  • 56
  • 97
  • 1
    Save a value in a file somewhere, and upon startup, if that file/value doesn't exist, you know it's never started before. – Jerry Dodge Oct 09 '15 at 16:32
  • That would definately do the job. Aren't there any 'official' paths as iOS does? – Machado Oct 09 '15 at 16:36
  • 1
    Define first. First for this user? First on the device? First for this version? – David Heffernan Oct 09 '15 at 16:40
  • @Holmes: what does iOS do? – Remy Lebeau Oct 09 '15 at 16:45
  • 1
    You will get the *official* paths from [`System.IOUtils.TPath`](http://docwiki.embarcadero.com/Libraries/en/System.IOUtils.TPath_Methods) – Sir Rufo Oct 09 '15 at 17:30
  • I guess your application probably has some configuration settings that are saved on the target device right? If that is true you can simply know that the application has not been run yet when these information's haven't been saved yet. Now where are you saving this settings depends from platform to platform. On Windows such approach is most commonly used with applications that allow each windows user to have its own settings. – SilverWarior Oct 09 '15 at 17:43
  • @RemyLebeau http://stackoverflow.com/a/3300358/1549700 – Machado Oct 09 '15 at 18:18
  • @DavidHeffernan first time for the user. – Machado Oct 09 '15 at 18:57
  • So then you know what you need to do right? – David Heffernan Oct 09 '15 at 19:01
  • 3
    @Holmes: AFAIK, FireMonkey has no equivalent for that Objective-C code. You would have to use Delphi's Objective-C Bridge framework to call the relevant iOS APIs directly. Otherwise, put a custom file somewhere in the app's private data storage on the device. – Remy Lebeau Oct 09 '15 at 19:17

0 Answers0