From 70f4c2ff6622a62c7913823bbb5eb0686f7af46c Mon Sep 17 00:00:00 2001 From: Nigel Breslaw Date: Wed, 7 Feb 2024 13:19:51 +0100 Subject: [PATCH] Respect iOS light/darkmode (#317) --- native_gg/App.tsx | 6 +----- native_gg/app.json | 17 ++++++++++++++++- native_gg/ios/nativegg/Info.plist | 2 +- native_gg/tsconfig.json | 3 ++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/native_gg/App.tsx b/native_gg/App.tsx index 8dd4c278f..d83ec2472 100644 --- a/native_gg/App.tsx +++ b/native_gg/App.tsx @@ -26,12 +26,8 @@ export default function App() { }, [url]); function openURL(url: string) { - const params = { - preferEphemeralSession: false, - }; - console.log("Opening URL in WebBrowser"); - WebBrowser.openAuthSessionAsync(url, null, params); + WebBrowser.openAuthSessionAsync(url, null); } return ( diff --git a/native_gg/app.json b/native_gg/app.json index 1c6d83456..78eef8b3a 100644 --- a/native_gg/app.json +++ b/native_gg/app.json @@ -7,6 +7,7 @@ "resizeMode": "contain", "backgroundColor": "#ffffff" }, + "userInterfaceStyle": "automatic", "assetBundlePatterns": [ "**/*" ], @@ -18,7 +19,21 @@ ] }, "android": { - "package": "com.example.withnewarch" + "package": "com.example.withnewarch", + "intentFilters": [ + { + "action": "VIEW", + "autoVerify": true, + "data": [ + { + "scheme": "https", + "host": "guardianghost.com", + "pathPrefix": "/auth" + } + ], + "category": ["BROWSABLE", "DEFAULT"] + } + ] }, "web": { "favicon": "./assets/favicon.png" diff --git a/native_gg/ios/nativegg/Info.plist b/native_gg/ios/nativegg/Info.plist index e766d33b6..31647f4be 100644 --- a/native_gg/ios/nativegg/Info.plist +++ b/native_gg/ios/nativegg/Info.plist @@ -70,7 +70,7 @@ UIInterfaceOrientationPortraitUpsideDown UIUserInterfaceStyle - Light + Automatic UIViewControllerBasedStatusBarAppearance diff --git a/native_gg/tsconfig.json b/native_gg/tsconfig.json index b9567f605..69bd6f5a4 100644 --- a/native_gg/tsconfig.json +++ b/native_gg/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "expo/tsconfig.base", "compilerOptions": { - "strict": true + "strict": true, + "noErrorTruncation": true, } }