From 09b78a46343088a2790dab067bd4fd8384957311 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 13 Jun 2022 22:12:43 -0500 Subject: [PATCH] Add custom protocol deep links --- README.md | 7 +++++++ android/app/src/main/AndroidManifest.xml | 9 +++++++++ ios/app/Info.plist | 13 +++++++++++++ src/routes/index.tsx | 2 ++ 4 files changed, 31 insertions(+) diff --git a/README.md b/README.md index 1ac5ff41..d7e93620 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,10 @@ Uses: - Create mock api - Tests - Should just try to catch errors on basic load + +## Various notes + +- ["SSO" flows on mobile](https://developer.okta.com/blog/2022/01/13/mobile-sso) + - Suggests we might want to use `ASWebAuthenticationSession` on iOS + - [react-native-inappbrowser-reborn](https://www.npmjs.com/package/react-native-inappbrowser-reborn) with `openAuth: true` might be worth exploring + - We might even [get rejected by the app store](https://community.auth0.com/t/react-native-ios-app-rejected-on-appstore-for-using-react-native-auth0/36793) if we don't \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 38d83125..483dff14 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -30,6 +30,15 @@ + + + + + + + + + diff --git a/ios/app/Info.plist b/ios/app/Info.plist index fca6902c..a527f1fc 100644 --- a/ios/app/Info.plist +++ b/ios/app/Info.plist @@ -20,6 +20,19 @@ 1.0 CFBundleSignature ???? + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + xyz.blueskyweb.pubsq + CFBundleURLSchemes + + pubsqapp + + + CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 2accd6fb..32398e9a 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -25,6 +25,8 @@ const linking: LinkingOptions = { prefixes: [ 'http://localhost:3000', // local dev 'https://pubsq.pfrazee.com', // test server (universal links only) + 'pubsqapp://', // custom protocol (ios) + 'pubsq://app', // custom protocol (android) ], config: { screens: {