Skip to content

Commit 1a6ae2e

Browse files
fix: ios build errors
1 parent cedaa6a commit 1a6ae2e

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/Packages/Passport/Runtime/Scripts/Private/UI/iOSPassportWebView.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
using UnityEngine.UI;
44
using Immutable.Passport.Core.Logging;
55

6-
#if UNITY_IOS && !UNITY_EDITOR
6+
#if UNITY_IOS || UNITY_EDITOR_OSX
77
using Immutable.Browser.Gree;
88
#endif
99

1010
namespace Immutable.Passport
1111
{
12-
#if UNITY_IOS && !UNITY_EDITOR
12+
#if UNITY_IOS || UNITY_EDITOR_OSX
1313
/// <summary>
1414
/// iOS implementation of IPassportWebView using Gree WebView (WKWebView)
1515
/// Wraps Gree WebViewObject in a clean, platform-agnostic interface
@@ -246,8 +246,7 @@ private void CreateWebViewObject()
246246
webViewGameObject = new GameObject("PassportUI_iOS_WebView");
247247
UnityEngine.Object.DontDestroyOnLoad(webViewGameObject);
248248

249-
// Add WebViewObject component
250-
webViewObject = webViewGameObject.AddComponent<WebViewObject>();
249+
webViewObject = new WebViewObject();
251250

252251
PassportLogger.Info($"{TAG} Gree WebViewObject created successfully");
253252
}
@@ -266,8 +265,6 @@ private void ConfigureWebView()
266265
);
267266

268267
// Configure WebView settings
269-
webViewObject.SetMargins(0, 0, 0, 0); // Full screen
270-
webViewObject.SetVisibility(false); // Start hidden
271268

272269
// Clear cache if requested
273270
if (config.ClearCacheOnInit)

src/Packages/Passport/Runtime/Scripts/Public/Passport.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ private async UniTask Initialise(
237237
#elif (UNITY_ANDROID && !UNITY_EDITOR_WIN) || (UNITY_IPHONE && !UNITY_EDITOR_WIN) || UNITY_STANDALONE_OSX || UNITY_WEBGL
238238
// Initialise default browser client for Android, iOS, and macOS
239239
_webBrowserClient = new GreeBrowserClient();
240+
await UniTask.CompletedTask;
240241
#else
241242
throw new PassportException("Platform not supported");
242243
#endif

src/Packages/Passport/Runtime/Scripts/Public/PassportUI.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public class PassportUI : MonoBehaviour
8383
private RawImage rawImage;
8484
// Login completion source removed - OAuth handled by external browser
8585
private bool isInitialized = false;
86-
private bool pointerEnterTriggered = false;
8786
private GameObject bridgeWebViewGameObject;
8887

8988
// Input management
@@ -459,8 +458,6 @@ public void HideLoginUI(bool logMessage = true)
459458
bridgeWebViewGameObject = null; // Clear reference
460459
}
461460

462-
// Reset pointer enter flag for next login
463-
pointerEnterTriggered = false;
464461
}
465462

466463
/// <summary>

0 commit comments

Comments
 (0)