Dave Nottage 557 Posted September 24, 2023 (edited) 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 September 24, 2023 by Dave Nottage 2 3 Share this post Link to post
avesuvorov 1 Posted September 25, 2023 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! 1 Share this post Link to post
Chris Pim 34 Posted September 25, 2023 (edited) 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 September 25, 2023 by Chris Pim Share this post Link to post
Chris Pim 34 Posted September 25, 2023 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! 3 Share this post Link to post
zdzichs 1 Posted September 25, 2023 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! 1 Share this post Link to post
tdalke 0 Posted September 27, 2023 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
Dave Nottage 557 Posted September 27, 2023 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
tdalke 0 Posted September 27, 2023 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
FNDX 0 Posted October 8, 2023 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
Gordon Kenyon 0 Posted February 5 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
Dave Nottage 557 Posted February 5 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. 1 Share this post Link to post
PetrifiedDelhpi 0 Posted August 31 Delphi on iOS could be called Deprecated. Had to buy an iPhone X, to enable debugging. (Apple doesn't support degrading to older versions of iOS, signing is removed within days.) Share this post Link to post
havrlisan 24 Posted August 31 (edited) 2 hours ago, PetrifiedDelhpi said: Delphi on iOS could be called Deprecated. Had to buy an iPhone X, to enable debugging. (Apple doesn't support degrading to older versions of iOS, signing is removed within days.) They're just lagging behind because Apple made some major changes to debugging apps through Xcode (see this discussion on Apple forums). Hopefully, they'll announce a fix for it in their upcoming webinar for the 12.2 update. Edited August 31 by havrlisan Share this post Link to post
PetrifiedDelhpi 0 Posted August 31 8 hours ago, havrlisan said: They're just lagging behind because Apple made some major changes to debugging apps through Xcode (see this discussion on Apple forums). Hopefully, they'll announce a fix for it in their upcoming webinar for the 12.2 update. Lagging behind? iOS 17 was released a year ago, and still no debugging support. My employer tries to move out from Delphi, but there is some 500 000 lines of Delphi code. Share this post Link to post