Solved

ShowMessage on iOS???

Posted on 2014-02-16
3
520 Views
Last Modified: 2014-02-16
Hi,

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);
begin
  VersionDS.Active := True;
  if (VersionDS.Fields[0].AsInteger = 1) then
  begin
    ShowMessage('Wrong Database Version, please reinstall.');
    Halt;
  end;
  VersionDS.Active := False;
end;


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.

Gary
0
Comment
Question by:Gary4
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Conner Turner earned 500 total points
ID: 39863270
Hello,

Yes this is a known bug that the iosSimulator wont show message alerts, this should be fixed in the Delphi XE5 Update 2 release,

Im sorry i cannot help any further.

HTH,
Conner
0
 
LVL 1

Author Comment

by:Gary4
ID: 39863277
Oh,

OK, as long as it works correctly on the real device then that's ok.

I've held off with update 2 since I saw several posts that it broke mobile apps and I didn't see any posts that it was ever fixed.
0
 
LVL 3

Expert Comment

by:Conner Turner
ID: 39863281
Hi,

Yes, the update MAY break a few things, however once produced on a Device all should work seamlessly.

Glad i could be of assistance , and good luck with your App !,

Conner.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mydac connection data base issue 3 157
Reconfigure Delphi Install? 2 51
Base1 Encode/Decode 3 77
Dynamically Created Query 3 55
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question