Jump to content
Eric Bonilha

ShowModal hang/crashes on iOS 15 with iPhone 12 / 13

Recommended Posts

Hello all

 

I got a strange problem with our app.. We use ShowModal (That is supposedly supported by iOS, but even for Android, internally it will use Show because its not supported) to display a form and this has always worked.. Many customers now reported our app will crash on iPhone 12 and 13 with iOS 15.. 


After debugging I found that ShowModal will hang / crash the app, but ONLY on iPhone 12 and iPhone 13 with IOS 15.. If I try on iPhone 11 or 7 for example using iOS 15 (same version, I tried on 15.0.2 and 15.1) it works fine.. Only crashes on iPhone 12 and 13

Did any of you encounter such issue as well?

I solved by not using ShowModal, but only Show,

Share this post


Link to post
11 hours ago, Eric Bonilha said:

Did any of you encounter such issue as well?

Fortunately, my wife recently acquired an iPhone 13 that has iOS 15.0.2 on it, and I am seeing the same issue as you: the app hangs. It does not hang on my iPhone X with iOS 15.1.

 

As to why it is just an issue on iPhone 13 (and 12, I guess), I'm looking into it

Share this post


Link to post

Thanks Dave. I don't have an iPhone 12 or 13 to test, I was relying on my customers phones (doing testflights) to try to fix the issue

 

It will be interesting to understand why ShowModal only doesn't work on iPhone 12 and 13, while previous like 11 will work just fine with the same OS version

Share this post


Link to post
9 hours ago, Eric Bonilha said:

It will be interesting to understand why ShowModal only doesn't work on iPhone 12 and 13, while previous like 11 will work just fine with the same OS version

I wasn't able to ascertain what the cause is - I can only suggest filing a report on QP for it.

Share this post


Link to post

Hi! i have same problem.

only with a new Iphone 13. 

 

ps: error is present both if compiled with delphi 10.4 and 11.

Edited by DiegoR

Share this post


Link to post

This issue has raised its ugly head again, this time on iPad 9th and 10th Gen devices (iOS 17.x). I've filed a new QP report which includes this workaround:

 

1. Copy FMX.Platform.iOS.pas from the source\fmx folder in your Delphi install, to the same folder as your project.
2. Modify the TCocoaTouchWindowManager.CanShowModal method thus:

function TCocoaTouchWindowManager.CanShowModal: Boolean;
begin
  // Patched - was returning True
  Result := False;
end;

This ensures that the form is actually shown non-modally, but will call the modal result function when the form is closed.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×