Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iOS export option for device family #49137

Merged
merged 1 commit into from
May 31, 2021

Conversation

RandomShaper
Copy link
Member

If you want your iOS game to be marked explicitly as targeting iOS, iPad or both (without having to tweak the generated Xcode project), this is your PR!

As an extra benefit, if you are only interested in iPhone or iPad alone, Apple app submission won't require you to provide icons for the other family.

@RandomShaper RandomShaper added platform:ios cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:export labels May 27, 2021
@RandomShaper RandomShaper added this to the 4.0 milestone May 27, 2021
@RandomShaper RandomShaper requested review from a team as code owners May 27, 2021 09:52
@Calinou
Copy link
Member

Calinou commented May 27, 2021

Speaking of which, do we currently have an OS-independent way to know whether the current device is a smartphone or tablet (from the user standpoint)? I remember seeing this being requested in the past so that people can expose slightly different UIs depending on the device.

@naithar
Copy link
Contributor

naithar commented May 27, 2021

Speaking of which, do we currently have an OS-independent way to know whether the current device is a smartphone or tablet (from the user standpoint)? I remember seeing this being requested in the past so that people can expose slightly different UIs depending on the device.

UIDevice.currentDevice.userInterfaceIdiom - https://developer.apple.com/documentation/uikit/uidevice/1620037-userinterfaceidiom?language=objc can be used to determine this. It should be pretty easy to expose this API from iOS singleton.

@Calinou
Copy link
Member

Calinou commented May 27, 2021

It should be pretty easy to expose this API from iOS singleton.

I was wondering about exposing this in an OS-independent way (e.g. in the OS singleton), so that people don't have to adapt their code twice for Android and iOS (or write their own method abstraction over the base OS-specific methods).

Either way, it might be better to open a proposal about this.

@RandomShaper
Copy link
Member Author

I'd say that the right way to adapt UI to different devices should be based on physical size (screen pixel size and DPI). At least, IIRC, that's the approach in Android (you design for screens, not for devices, so to speak) and I think there's a good reason for that.

That said, I think that having a way to check if the device reports itself as tablet or phone where that's supported can also be helpful so the application can make some extra assumptions.

@akien-mga akien-mga merged commit f7bcada into godotengine:master May 31, 2021
@akien-mga
Copy link
Member

Thanks!

@RandomShaper RandomShaper deleted the ios_targeted_family branch May 31, 2021 09:03
@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga added enhancement and removed cherrypick:3.x Considered for cherry-picking into a future 3.x release labels May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants