godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.82k stars 21.14k forks source link

Cannot compile iOS export templates on macOS #82073

Open MBCX opened 1 year ago

MBCX commented 1 year ago

Godot version

v4.2.dev.custom_build [fe5b1c8d4]

System information

Godot 4.2.dev (fe5b1c8d4) - macOS 11.0.1 - Vulkan (Compatibility) - Apple Software Renderer - Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz (4 Threads)

Issue description

When compiling, the display_server_ios.mm is trying to use a feature that only iOS 16.0 and up have available. iOS error I am compiling using Xcode 12.5, which has the iPhoneOS 14.5 SDK installed by default. So, this shouldn't even be an issue?

Steps to reproduce

  1. Go to the root of the engine's source code
  2. type scons platform=ios target=template_debug/release
  3. Wait until it tries to compile display_server_ios.mm

Minimal reproduction project

N/A

bruvzg commented 1 year ago

This is expected, it is possible to use template on older iOS versions, but building always require SDK for the latest targeted OS (macOS 11.0, iOS 16.0).

MBCX commented 1 year ago

If I upgrade or build on macOS 12 (or 13, or the upcoming 14), then the templates would no longer be compatible for anything but 13 and up? Or will it still work for older versions?

By the way, I "fixed" it by just removing the conditional all together and just leaving the deprecated [UIViewController attemptRotationToDeviceOrientation]. But I don't like this solution since it is deprecated.

bruvzg commented 1 year ago

The build is still targeting iOS 11, and it is supported by Xcode 14.3.1 (Xcode 15 only support iOS 12), but in practice it's unlikely Godot 4.x will reliably run (at least with Vulkan renderer) on anything older than A9 (iPhone 6S / SE 1.gen, iPad 5. gen) and these devices support iOS 15.

samgreen commented 1 year ago

iOS 12 + 13 constituted 95% of all iOS devices in 2019. I don't believe there is a significant demographic running below this but I'd love to be corrected.

Source: https://mixpanel.com/trends/#report/ios_13