-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[3.2] [iOS] Fix compilation warnings and deprecated API #42459
Conversation
platform/iphone/app_delegate.mm
Outdated
@@ -301,6 +304,7 @@ - (void)setControllerInputHandler:(GCController *)controller { | |||
OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_R2, jx); | |||
}; | |||
}; | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this code be removed instead of commented out?
And what about the following #ifdef ADD_MICRO_GAMEPAD
which references being disabled by default due to not having API 9? I guess it's an outdated comment, but does this code work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's currently commented out at 4.0
, so I've decided to keep it. Will delete it after rebase.
As for ADD_MICRO_GAMEPAD
Godot is already built for SDK 10
, so it should be safe to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that nothing defines ADD_MICRO_GAMEPAD
currently, so this code might require testing to validate it before enabling it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've noticed that. While compilation seems to be working, I can't really test micro (?) gamepad as I don't have one.
@@ -189,11 +192,9 @@ - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)tran | |||
int sdk_version = 6; | |||
|
|||
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need ancient code for iOS 7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need it, but it's still exists in 4.0
. And I planned to remove it later PRs to keep this PR as simple as possible. I'll remove it required. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to build it using iOS 7 target? If it's not (with is definitely the case for 4.0) there's no reason to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godot uses -miphoneos-version-min=10.0
so it's not. I'll change the code then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if you want to keep this PR a simple backport of master
changes, and then make two new PRs for further deprecation fixes for master
and 3.2
, that's fine with me. The comments made here can be used as actionable feedback for this follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that should work better. But I'll rebase and remove some commented parts, as they wouldn't affect anything anyway.
236752d
to
d977b6f
Compare
iOS getting |
There are also conflicts with But I don't remember seeing those in the past either in build logs. For |
Managed to get this error after rebasing again. Still not sure what caused it. |
I'm getting it without this PR too, so it's not related. Using following command (same as CI) All definitions in SDK have |
Also got:
Moving system headers at The other strange thing is that this issue hadn't occurred in master branch |
d977b6f
to
f7ab360
Compare
// System headers are at top | ||
// to workaround `ambiguous expansion` warning/error | ||
#import <UIKit/UIKit.h> | ||
#include <dlfcn.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporarily moved to top to check if it helps.
Seems like it can also be solved by Found this: https://sqlite.org/forum/forumpost/6d0e24a98e, not sure if it's related, but looks like it. |
@akien-mga linux build failure seems to be unrelated to this PR:
|
Change deprecated method calls to new ones. Guard iOS version dependant functionality behind availability checks.
f7ab360
to
3386fac
Compare
Thanks! |
Fixes #29800 for
3.2
Deprecation and errors in
4.0
has already been addressed with Vulkan implementation.Most of the code changes duplicate the same changes made in
4.0
. There is no major deletions of previous/deprecated functionality, which I plan to do in followup PRs to make3.2
file/code structure more like4.0
to make it easier for future iOS PRs to be cherry-picked.I've also reenabled
werror
for iOS GitHub workflow.Increased
deployment target
in iOS template to 10.0, since 3.2 Godot is built for 10.0 version anyway.#41173 (which fixes #41058 for3.2
) could conflict with this PR, but shouldn't be anything major.