Jump to content

Recommended Posts

47 minutes ago, tdalke said:

Has this issue been resolved? (Delphi app crashing on iOS 17)

No official fix as yet, however I have come up with the following workaround - Note: this has had no testing beyond a blank app:

 

1. Copy FMX.Platform.iOS from source\fmx into your project folder.

 

2. In the TApplicationDelegate.applicationDidFinishLaunchingWithOptions method towards the end, make the following change (i.e. add the one line of code indicated😞

    // Creating window
    WindowManager := PlatformCocoaTouch.WindowManager;
    WindowManager.Window := TFMXWindow.Create(MainScreen.bounds);
    WindowManager.RootViewController := TFMXViewController.Create;
    // *** iOS17 SDK crash issue - Add the following line: ***
    WindowManager.RootViewController.Super.init;
    WindowManager.NativeWindow.makeKeyAndVisible;

Note also that this measure is needed only if you are building against the iOS 17 SDK - it is not required when building against earlier SDKs.

Edited by Dave Nottage
  • Like 2
  • Thanks 3

Share this post


Link to post
12 hours ago, Dave Nottage said:

No official fix as yet, however I have come up with the following workaround - Note: this has had no testing beyond a blank app:



I tested (iOS17 SDK) it on an blank app and tested it on the main working app - everything works.
Thank you very much!

  • Like 1

Share this post


Link to post

Delphi 11.x doesn't support building to an iOS 17 device from the IDE but apps built against iOS 17, which are deployed to the device via TestFlight seem to run ok from my testing.

 

iOS 17 development is problematic with Delphi 11.x (full or CE) so you may need to wait for the next version to get full support, but your users shouldn't be having problems from what I've seen so far if you build against iOS 16.4 SDK and run on iOS 17

 

UPDATE: Scratch this - TestFlight builds also crash when built with iOS 17. I'm not sure why it appeared to work but I may have been testing an iOS 16 SDK build accidentally.

You need Dave Nottage's fix regardless, but I'm doing a lot more thorough testing to make sure it doesn't have unexpected consequences!

Edited by Chris Pim

Share this post


Link to post
12 hours ago, Dave Nottage said:

No official fix as yet, however I have come up with the following workaround - Note: this has had no testing beyond a blank app:

 

1. Copy FMX.Platform.iOS from source\fmx into your project folder.

 

2. In the TApplicationDelegate.applicationDidFinishLaunchingWithOptions method towards the end, make the following change (i.e. add the one line of code indicated😞


    // Creating window
    WindowManager := PlatformCocoaTouch.WindowManager;
    WindowManager.Window := TFMXWindow.Create(MainScreen.bounds);
    WindowManager.RootViewController := TFMXViewController.Create;
    // *** iOS17 SDK crash issue - Add the following line: ***
    WindowManager.RootViewController.Super.init;
    WindowManager.NativeWindow.makeKeyAndVisible;

Note also that this measure is needed only if you are building against the iOS 17 SDK - it is not required when building against earlier SDKs.

I've tested this fix on a more complex app too and it also stops the crashing issue on iOS 17, so thank you as always Dave!

  • Like 3

Share this post


Link to post
On 9/24/2023 at 9:37 PM, Dave Nottage said:

No official fix as yet, however I have come up with the following workaround - Note: this has had no testing beyond a blank app:

 

1. Copy FMX.Platform.iOS from source\fmx into your project folder.

 

2. In the TApplicationDelegate.applicationDidFinishLaunchingWithOptions method towards the end, make the following change (i.e. add the one line of code indicated😞


    // Creating window
    WindowManager := PlatformCocoaTouch.WindowManager;
    WindowManager.Window := TFMXWindow.Create(MainScreen.bounds);
    WindowManager.RootViewController := TFMXViewController.Create;
    // *** iOS17 SDK crash issue - Add the following line: ***
    WindowManager.RootViewController.Super.init;
    WindowManager.NativeWindow.makeKeyAndVisible;

Note also that this measure is needed only if you are building against the iOS 17 SDK - it is not required when building against earlier SDKs.

Works like a charm, thank you! I tested this solution for two apps: one with listview and SQlite and second with custom listview and (many) standard pickers, all working ok!

  • Like 1

Share this post


Link to post

I found a fix! Verified that I can deploy to device running iOS 17 and successfully run the app.

 

source: https://quality.embarcadero.com/browse/RSB-6860?jql=text ~ "ios 17"

 

Copy FMX.Platform.iOS from source\fmx into your project folder.

 

In the TApplicationDelegate.applicationDidFinishLaunchingWithOptions method towards the end, make the following change (i.e. add the one line of code indicated)

 

    // Creating window
    WindowManager := PlatformCocoaTouch.WindowManager;
    WindowManager.Window := TFMXWindow.Create(MainScreen.bounds);
    WindowManager.RootViewController := TFMXViewController.Create;
    
    // *** Start of iOS17 SDK crash issue - Add the following line: ***
    WindowManager.RootViewController.Super.init;
    // *** End of iOS17 SDK crash issue ***
    
    WindowManager.NativeWindow.makeKeyAndVisible;

 

Note also that this measure is needed only if you are building against the iOS 17 SDK - it is not required when building against earlier SDKs.

Share this post


Link to post
14 minutes ago, tdalke said:

I found a fix!

Interestingly enough, that's exactly the fix that was reported here 😉

Share this post


Link to post

Exactly!!  I recognize your name now!

 

Also looking at the Kastri library.  Trying to figure out how to get the safe area insets now.

Share this post


Link to post

I was having trouble with iOS 17 crashing, but I'm glad I was able to resolve it.
In addition to crashes, there are other problems with iOS17.
I use SQLite for the database, display it using StringGrid, and sort it using query.
There is no problem with iOS16, but in iOS17, if you sort by query, it will not be displayed in the StringGrid.
If there is a way to resolve this, please let me know.

Share this post


Link to post
On 9/22/2023 at 6:53 AM, Dave Nottage said:

Never mind - it seems debugging from Delphi is not possible for iOS 17 devices at the moment. I confirm that apps built against iOS 17 SDK crash on start. For now, you'll need to use an older SDK (e.g. iOS 16.4 SDK), if you had imported that earlier.

Hi Dave , do you know what timeframe  we are looking at before debugging for iOS 17 will be available? 

Share this post


Link to post
18 minutes ago, Gordon Kenyon said:

do you know what timeframe  we are looking at before debugging for iOS 17 will be available? 

I don't know, sorry.

  • Thanks 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

×