ShowMessage on iOS???
Posted on 2014-02-16
This code works on the Android, but not in the iOSSimulator.
On the Android I get the pop-up and I click OK and the app exits. Which is what i want if the database is the wrong version.
But on iOS all I get is a blank screen, no error, nothing.
The database has a Version table with one record with one integer field containing the version number.
procedure TChirpDB.FDChirpDBAfterConnect(Sender: TObject);
VersionDS.Active := True;
if (VersionDS.Fields.AsInteger = 1) then
ShowMessage('Wrong Database Version, please reinstall.');
VersionDS.Active := False;
The SQL in the TFDQuery is:
select id from Version
The database is SQLite.
I tried changing the comparison to <> so it would not error and the application came up with no problem so I think the problem is in the If Then clause.