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

feat: add webview and custom chrome/firefox/etc for android and webkit for ios tabs for signing-in #473

Merged
merged 23 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 0 additions & 115 deletions godot/addons/GodotAndroidPluginMagicLink/MagicLinkPluginInterface.gd

This file was deleted.

Binary file not shown.
Binary file not shown.
49 changes: 0 additions & 49 deletions godot/addons/GodotAndroidPluginMagicLink/export_plugin.gd

This file was deleted.

6 changes: 0 additions & 6 deletions godot/addons/GodotAndroidPluginMagicLink/plugin.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion godot/addons/dcl_build_plugin/build.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DclBuildPlugin extends EditorExportPlugin:
var is_android_export: bool = false

const include_only_xr: PackedStringArray = ["res://addons/godot-xr-tools/", "res://addons/godotopenxrvendors/"]
const include_only_android: PackedStringArray = ["res://addons/GodotAndroidPluginMagicLink/"]
const include_only_android: PackedStringArray = []

func _export_begin(features, is_debug, path, flags):
prints("Start export, using XR is ", is_xr_export)
Expand Down
Binary file not shown.
Binary file not shown.
37 changes: 37 additions & 0 deletions godot/addons/webview-godot-android/export_plugin.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@tool
extends EditorPlugin

# A class member to hold the editor export plugin during its lifecycle.
var export_plugin : AndroidExportPlugin

func _enter_tree():
# Initialization of the plugin goes here.
export_plugin = AndroidExportPlugin.new()
add_export_plugin(export_plugin)


func _exit_tree():
# Clean-up of the plugin goes here.
remove_export_plugin(export_plugin)
export_plugin = null


class AndroidExportPlugin extends EditorExportPlugin:
var _plugin_name = "webview-godot-android"

func _supports_platform(platform):
if platform is EditorExportPlatformAndroid:
return true
return false

func _get_android_libraries(platform, debug):
if debug:
return PackedStringArray([_plugin_name + "/bin/debug/" + _plugin_name + "-debug.aar"])
else:
return PackedStringArray([_plugin_name + "/bin/release/" + _plugin_name + "-release.aar"])

func _get_android_dependencies(platform, debug):
return PackedStringArray(["androidx.browser:browser:1.5.0"])

func _get_name():
return _plugin_name
7 changes: 7 additions & 0 deletions godot/addons/webview-godot-android/plugin.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[plugin]

name="WebViewGodotAndroid"
description="Open WebView on Godot for Android"
author="kuruk-mm"
version="0.0"
script="export_plugin.gd"
7 changes: 4 additions & 3 deletions godot/export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ pico_xr_features/face_tracking=0
name="iOS"
platform="iOS"
runnable=true
advanced_options=false
advanced_options=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
Expand Down Expand Up @@ -632,16 +632,17 @@ application/bundle_identifier="org.decentraland.godotexplorer"
application/signature=""
application/short_version="1.0"
application/version="1.0"
application/min_ios_version="12.0"
application/min_ios_version="16.0"
application/additional_plist_content=""
application/icon_interpolation=4
application/export_project_only=false
application/delete_old_export_files_unconditionally=false
application/generate_simulator_library_if_missing=true
plugins/WebKit=true
capabilities/access_wifi=false
capabilities/push_notifications=false
capabilities/performance_gaming_tier=false
capabilities/performance_a12=false
capabilities/performance_a12=true
user_data/accessible_from_files_app=false
user_data/accessible_from_itunes_sharing=false
privacy/camera_usage_description=""
Expand Down
44 changes: 44 additions & 0 deletions godot/ios/plugins/webkit/webkit.debug.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>webkit-device.release_debug.a</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>webkit-device.release_debug.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>webkit-simulator.release_debug.a</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>webkit-simulator.release_debug.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions godot/ios/plugins/webkit/webkit.gdip
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[config]
name="WebKit"
binary="webkit.xcframework"

initialization="register_webkit_types"
deinitialization="unregister_webkit_types"

[dependencies]
linked=[]
embedded=[]
system=["SafariServices", "AuthenticationServices"]

capabilities=[]

files=[]

[plist]
44 changes: 44 additions & 0 deletions godot/ios/plugins/webkit/webkit.release.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>webkit-device.release.a</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>webkit-device.release.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>webkit-simulator.release.a</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>webkit-simulator.release.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion godot/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ window/size/viewport_height=720

[editor_plugins]

enabled=PackedStringArray("res://addons/GodotAndroidPluginMagicLink/plugin.cfg", "res://addons/dcl_build_plugin/plugin.cfg", "res://addons/godot-xr-tools/plugin.cfg", "res://addons/resource_tracker/plugin.cfg")
enabled=PackedStringArray("res://addons/dcl_build_plugin/plugin.cfg", "res://addons/godot-xr-tools/plugin.cfg", "res://addons/resource_tracker/plugin.cfg", "res://addons/webview-godot-android/plugin.cfg")

[filesystem]

Expand Down
Loading
Loading