From f1481006341673ab368901ca6da103c763573d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Chaves?= Date: Tue, 30 Apr 2024 15:48:34 +0200 Subject: [PATCH] fix: UI (#189) * chore: Create Push Notifications sandbox * fix: docs * fix: renaming * fix: Android ui * chore: improve Readme --- README.md | 1 - sandboxes/NotificationsSandbox/App.styles.ts | 3 +-- sandboxes/NotificationsSandbox/README.md | 26 +++++++++++++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 71e2922..d5b40aa 100644 --- a/README.md +++ b/README.md @@ -284,7 +284,6 @@ See the [example app](https://github.com/intercom/intercom-react-native/blob/mai Intercom for iOS requires a **minimum iOS version of 15.** - ```sh cd ios pod install diff --git a/sandboxes/NotificationsSandbox/App.styles.ts b/sandboxes/NotificationsSandbox/App.styles.ts index e00879c..6896900 100644 --- a/sandboxes/NotificationsSandbox/App.styles.ts +++ b/sandboxes/NotificationsSandbox/App.styles.ts @@ -7,8 +7,7 @@ export const styles = StyleSheet.create({ justifyContent: 'center', }, title: { - position: 'absolute', - top: '25%', + marginTop: 25, fontWeight: 'bold', fontSize: 20, }, diff --git a/sandboxes/NotificationsSandbox/README.md b/sandboxes/NotificationsSandbox/README.md index 729aa64..090eb9a 100644 --- a/sandboxes/NotificationsSandbox/README.md +++ b/sandboxes/NotificationsSandbox/README.md @@ -49,7 +49,6 @@ yarn run pod ``` - ## Step 4: Initialize Intercom ### Android @@ -88,6 +87,8 @@ return [super application:application didFinishLaunchingWithOptions:launchOption ### Android > Move your **google-services.json** file into the **android/app** directory +> You can find more details on how to configure firebase with Intercom [here](https://developers.intercom.com/installing-intercom/react-native/push-notifications). + # Running the the app @@ -153,16 +154,27 @@ xcrun simctl push booted my.bundle.id payload.json ``` -# Deep Links Testing +# (Local) Deep Links Testing By default, this sandbox is configured to handle the following links with React Navigation: ```shell -**app.fake** for iOS Universal Link and Android App Link - **app://** for deep link + +**app.fake** for iOS Universal Link and Android App Link (Only works when linked on a message from within the app.) +``` + +```shell +Configured Paths: + /settings ``` +>**Note:** Universal and App Links require setup in the server to work. + +[Apple - Supporting Associated Domains](https://developer.apple.com/documentation/xcode/supporting-associated-domains) + +[Android - Verify App Links](https://developer.android.com/training/app-links/verify-android-applinks) + [React Navigation Documentation - Setup Deep Links](https://reactnavigation.org/docs/deep-linking) [React Navigation Documentation - Configuring Links](https://reactnavigation.org/docs/configuring-links) @@ -177,6 +189,8 @@ npx uri-scheme open [your deep link] --[ios|android] Example: ```shell npx uri-scheme open "app://settings" --ios + +npx uri-scheme open "https://app.fake/settings" --ios ``` @@ -190,6 +204,8 @@ xcrun simctl openurl booted [your deep link] Example: ```shell xcrun simctl openurl booted "app://settings" + +xcrun simctl openurl booted "https://app.fake/settings" ``` @@ -203,4 +219,6 @@ adb shell am start -W -a android.intent.action.VIEW -d [your deep link] [your an Example: ```shell adb shell am start -W -a android.intent.action.VIEW -d "app://settings" com.example.app + +adb shell am start -W -a android.intent.action.VIEW -d "https://app.fake/settings" com.example.app ```