From b5efe105fb18eabe74ba69dd6185431c779932b1 Mon Sep 17 00:00:00 2001 From: BellringerQuinn Date: Mon, 18 Dec 2023 12:06:20 -0500 Subject: [PATCH] Fix errors on Windows --- Assets/Editor/SetUrlScheme.cs | 6 +++++- Assets/SequenceExamples/Scripts/UI/LoginPanel.cs | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Assets/Editor/SetUrlScheme.cs b/Assets/Editor/SetUrlScheme.cs index 6ddedb10..31aa5703 100644 --- a/Assets/Editor/SetUrlScheme.cs +++ b/Assets/Editor/SetUrlScheme.cs @@ -4,8 +4,10 @@ using Sequence.Authentication.ScriptableObjects; using UnityEditor; using UnityEditor.Callbacks; -using UnityEditor.iOS.Xcode; using UnityEngine; +#if UNITY_IOS || UNITY_STANDALONE_OSX +using UnityEditor.iOS.Xcode; +#endif namespace Editor { @@ -41,6 +43,7 @@ public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProj private static void SetPlistUrlScheme() { +#if UNITY_IOS || UNITY_STANDALONE_OSX PlistDocument plist = new PlistDocument(); plist.ReadFromFile(_plistPath); @@ -69,6 +72,7 @@ private static void SetPlistUrlScheme() } plist.WriteToFile(_plistPath); +#endif } } } \ No newline at end of file diff --git a/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs b/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs index 0c851d41..f29ab0ee 100644 --- a/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs +++ b/Assets/SequenceExamples/Scripts/UI/LoginPanel.cs @@ -9,7 +9,7 @@ namespace Sequence.Demo { public class LoginPanel : UIPanel { - public string UrlScheme = "sdk-powered-by-sequence"; + public static string UrlScheme = "sdk-powered-by-sequence"; private TransitionPanel _transitionPanel; private LoginPage _loginPage; @@ -76,7 +76,7 @@ private void OnMFAEmailSentHandler(string email) private static void PassDeepLinkViaLocalServer() { var args = System.Environment.GetCommandLineArgs(); - if (args.Length > 1 && args[1].StartsWith(OpenIdAuthenticator.UrlScheme)) + if (args.Length > 1 && args[1].StartsWith(UrlScheme)) { var socketConnection = new TcpClient("localhost", OpenIdAuthenticator.WINDOWS_IPC_PORT); var bytes = System.Text.Encoding.ASCII.GetBytes("@@@@" + args[1] + "$$$$");