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

[iOS] [3.2] iOS Plugins #41340

Merged
merged 5 commits into from
Jan 15, 2021

Conversation

naithar
Copy link
Contributor

@naithar naithar commented Aug 17, 2020

Same as #41230 but for 3.2 branch.

Implements godotengine/godot-proposals#1185 for 3.2 branch.
Godot iOS Plugin template
Since this plugin implementation directly uses Godot's source headers it's important to use correct compilation flags.

ARKit test

@naithar
Copy link
Contributor Author

naithar commented Aug 17, 2020

MacOS build seems to be using werror=yes, while it should use werror=no

@akien-mga
Copy link
Member

MacOS build seems to be using werror=yes, while it should use werror=no

No, all platforms build with werror=yes on CI to prevent adding warnings.

@naithar
Copy link
Contributor Author

naithar commented Aug 17, 2020

No, all platforms build with werror=yes on CI to prevent adding warnings.

Yeah, just rechecked workflow files - mistook ios configuration for macOS's =/

@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch from 282945a to fc1a889 Compare August 18, 2020 00:04
@naithar
Copy link
Contributor Author

naithar commented Aug 18, 2020

Fixed CI and made some changes to loading logic. Now ARKit is working correctly.
I guess same changes should be done for master too.

@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch from fc1a889 to b6b39d1 Compare August 19, 2020 14:23
@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch 2 times, most recently from 4c58d35 to 29c3d80 Compare October 2, 2020 12:00
@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch 2 times, most recently from 6a01868 to c278ce2 Compare October 7, 2020 20:26
@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch from c278ce2 to fbd04e1 Compare October 20, 2020 14:41
@naithar
Copy link
Contributor Author

naithar commented Oct 20, 2020

E: Failed to fetch https://storage.googleapis.com/bazel-apt/dists/stable/jdk1.8/binary-amd64/Packages.gz  File has unexpected size (5006 != 5219). Mirror sync in progress? [IP: 142.250.115.128 443]
96
   Hashes of expected file:
97
    - Filesize:5219 [weak]
98
    - SHA256:aafcd0c50256a44ebb7cfe022d1b0077867adf70c3da267c4093e22fd6c1102a
99
    - SHA1:f7a7b01739afef5d9c9030fa15c8e5353c689989 [weak]
100
    - MD5Sum:58a637d912b15164b953cdff585de01f [weak]
101
   Release file created at: Tue, 20 Oct 2020 13:53:20 +0000
102
E: Some index files failed to download. They have been ignored, or old ones used instead.
103
Error: Process completed with exit code 100.

GitHub CI fails with this. Is it something on my side or CI is just going crazy again?

@akien-mga
Copy link
Member

So the master version was just merged in #41230.

@naithar @bruvzg @BastiaanOlij How do you think we should proceed for the 3.2 branch? Should we merge this version as is now to test in 3.2.4 beta 2, or give the master version some more time to be fine-tuned before including the tested changes in the 3.2 branch?

@naithar
Copy link
Contributor Author

naithar commented Nov 10, 2020

I think making changes to master's AppDelegate first and also migrating plugins to separate repo (with an option to build them for 3.2 branch) could be a way to go. Then we can merge everything into 3.2.

@BastiaanOlij
Copy link
Contributor

@akien-mga I'm not in a position to test atm but if this all seems to work I would merge and work out any kinks. I'll try and find some time in the weekend to see if my ARKit demos work properly with these changes.

@naithar
Copy link
Contributor Author

naithar commented Nov 11, 2020

I'm testing https://github.com/naithar/godot/tree/feature/pluggable_app_delegates and https://github.com/naithar/godot/tree/feature/pluggable_app_delegates_3.2 right now. It's probably the only functionality change left for plugins.
Only migrating modules to plugins in separate repo will be left after this.

@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch from fbd04e1 to 7b08c79 Compare November 15, 2020 11:25
@naithar
Copy link
Contributor Author

naithar commented Nov 15, 2020

#43557 and #43556 should allow to cover almost any platform specific case for iOS. I've tested push notifications, but it should be fine with anything that depends on extending UIAppDelegate.

Moved previously builtin modules 'GameCenter', 'AppStore', 'iCloud' to separate modules to be represented as plugin.
Modified 'ARKit' and 'Camera' to not be builtin into engine and work as plugin.
Changed platform code so it's not affected by the move.
Modified Xcode project file to remove parameters that doesn't make any effect.
Added basic '.gdip' plugin config file.
@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch from dafc80a to 21d5aff Compare January 14, 2021 12:30
Added plugin configuration.
Export options now use plugins that could be enabled/disabled.
Plugin changes are observed at runtime.
Plugins can use 'binary_name.a' or 'binary_name.release.a' and 'binary_name.debug.a' for plugin library.
@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch from 21d5aff to c330baf Compare January 14, 2021 12:38
@akien-mga akien-mga requested a review from a team January 14, 2021 12:43
@akien-mga
Copy link
Member

@godotengine/ios Should we merge this and #43557 now for inclusion in 3.2.4 beta 6 in a few days?

What's the impact from those changes on current 3.2.x users (both game devs and plugin makers), especially in terms of compatibility?

@naithar
Copy link
Contributor Author

naithar commented Jan 14, 2021

This change should not affect compatibility. #42459 and #42582 are more serious in that respect. But everything seems to be easily fixable: poingstudios/godot-admob-android#41. So it's more of an addition to current way of creating iOS specific code.

The only issue users might be encountering is access to GameCenter, iCloud and other iOS modules that was previously built into iOS platform code. They are temporarily moved to modules folder and would require some additional packaging as plugins until separate repo is done.

@naithar naithar force-pushed the feature/pluggable-ios-modules-3.2 branch from c330baf to 6492394 Compare January 14, 2021 23:13
@akien-mga akien-mga merged commit 0f5d475 into godotengine:3.2 Jan 15, 2021
@akien-mga
Copy link
Member

Thanks!

@naithar
Copy link
Contributor Author

naithar commented Jan 16, 2021

@akien-mga since plugins have been merged and beta was released, should I start working on separating modules from plugins?
I've noticed that iOS export template still contains arkit and camera libraries, should I also address this somehow?
Can I create a godot-ios-plugins/godot-plugins-ios repo for all plugins or what is the better way to approach this?

Edit:
I also think I should follow up with .xcframework support for plugins, since that's the only way to provide static libraries for arm64 simulator

@naithar naithar deleted the feature/pluggable-ios-modules-3.2 branch February 9, 2021 08:33
@akien-mga akien-mga modified the milestones: 3.2, 3.3 Apr 20, 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.

4 participants