Some of the 'optimizations' you can disable/enable. Each device has its own menu and naming. But not all of them. And even if you make all configurations good, at some point it is possible an update of the OS to reset your configurations silently.
I don't know how it is in iOS, but in android, long running apps are not something that is 100% doable.
After I struggle for months with my app, I have my preferences for iOS right now. It might be difficult as well, but at least the manufacturer is only one. ;)
I don't think there's anything to be excited about with the future of iOS, just more of the same for as long as regulators can be kept at bay. Maybe even sillier if the rumours are true the folding iPhone is blocked from running iPad apps lol.
Hopefully Ternus will be less uptight about ancient iOS restrictions, I want my iPhone to be every bit as useful as a MacBook Neo if I connect a monitor/mouse/keyboard.
I would say its pure preference at this point. Both operating systems have converged towards each other in the last few years, where nowadays it really just comes down to your taste, the ecosystem you are in (or want to be in - ), and whether you value having potentially a bit more freedom (with some devices that make it easier to flash custom ROMs/Kernels).
What should be mentioned though: Android is not anymore as tinker-friendly as it was 5 years ago, a lot of OEMs make it hard to even unlock your bootloader's, Google made it almost impossible to run anything custom (due to Play Integrity) without you losing access to half of your apps - so in practice, I feel like Android has not even anymore that specific anymore.
If you have special preferences, there might be a specific OS/Phone that can accomodate you better but that is something you'll need to know.
Better for voice search/assistant? Probably Android.
Better for voice dictation? Android.
Better keyboard? Android.
Better integration with other same-os devices? iOS.
Better UX? Likely whichever you’re used to.
Better for what?
Better prices? Android, especially with purchase parity
Most stable? iOS
Most flexibility and freedom? Android
Better camera or speed? This always enters the debate, but it's specific to the device, not OS
https://www.macrumors.com/2024/04/05/app-store-guidelines-em...
If you're earnest with the question, I suggest trying both to see which you like.