Solved

ShowMessage on iOS???

Posted on 2014-02-16
3
541 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

729 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