Skip to content

Commit ffeb951

Browse files
committed
add gradle wrapper
1 parent 551dabb commit ffeb951

File tree

14 files changed

+4396
-1497
lines changed

14 files changed

+4396
-1497
lines changed

examples/with-notifications/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ yarn install
2525
This should match the package name for the project in Firebase and Intercom configured apps.
2626

2727
**Current identifiers:**
28+
2829
- **Android Package**: `com.example.withnotifications`
2930
- **iOS Bundle ID**: `org.reactjs.native.example.withnotification`
3031

@@ -33,11 +34,12 @@ To customize for your own app, update the following files:
3334
**iOS**: Update bundle identifier in `ios/withnotification.xcodeproj`
3435

3536
**Android**: Update package name in:
37+
3638
- `android/app/src/main/AndroidManifest.xml`
3739
- `android/app/src/main/java/com/example/withnotifications/` directory name
3840
- `MainActivity.kt` and `MainApplication.kt` package declarations
3941

40-
>**Note**: This package does not attempt to properly rename build artifacts such as ios/build or Cocoa Pod installation targets. After renaming your project you should clean, build, and reinstall third party dependencies to get it running properly with the new name.
42+
> **Note**: This package does not attempt to properly rename build artifacts such as ios/build or Cocoa Pod installation targets. After renaming your project you should clean, build, and reinstall third party dependencies to get it running properly with the new name.
4143
4244
## Step 3: Run pod install
4345

@@ -52,7 +54,8 @@ cd ios && pod install && cd ..
5254
## Step 4: Initialize Intercom
5355

5456
### Android
55-
>**MainApplication.kt**
57+
58+
> **MainApplication.kt**
5659
5760
```kotlin
5861
override fun onCreate() {
@@ -64,7 +67,8 @@ override fun onCreate() {
6467
```
6568

6669
### iOS
67-
>**AppDelegate.mm**
70+
71+
> **AppDelegate.mm**
6872
6973
```objective-c
7074
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@@ -81,13 +85,14 @@ override fun onCreate() {
8185
## Step 5: Setup Push Notifications
8286

8387
### Android
88+
8489
> Move your **google-services.json** file into the **android/app** directory
8590
8691
> You can find more details on how to configure firebase with Intercom [here](https://developers.intercom.com/installing-intercom/react-native/push-notifications).
8792
8893
# Running the the app
8994

90-
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
95+
> **Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
9196
9297
```
9398
cd ios && pod install
@@ -117,7 +122,7 @@ pnpm run android
117122

118123
### For iOS
119124

120-
>**Note**: Remote push notifications do not work on iOS Simulator. Run the app on a physical device.
125+
> **Note**: Remote push notifications do not work on iOS Simulator. Run the app on a physical device.
121126
122127
```shell
123128
# using pnpm
@@ -126,13 +131,14 @@ pnpm run ios
126131

127132
# Local notifications testing
128133

129-
>**Note**: We can use this method to test if notifications are working locally (e.g. debugging issue with notification permissions).
134+
> **Note**: We can use this method to test if notifications are working locally (e.g. debugging issue with notification permissions).
130135
131136
## Option 1: Drag payload.apns to the running simulator.
132137

133138
Modify the bundle ID inside `payload.apns` to match yours (`org.reactjs.native.example.withnotification`).
134139

135140
## Option 2: Terminal
141+
136142
```shell
137143
xcrun simctl push booted org.reactjs.native.example.withnotification payload.json
138144
```
@@ -152,7 +158,7 @@ Configured Paths:
152158
/settings
153159
```
154160

155-
>**Note:** Universal and App Links require setup in the server to work.
161+
> **Note:** Universal and App Links require setup in the server to work.
156162
157163
[Apple - Supporting Associated Domains](https://developer.apple.com/documentation/xcode/supporting-associated-domains)
158164

@@ -163,41 +169,47 @@ Configured Paths:
163169
[React Navigation Documentation - Configuring Links](https://reactnavigation.org/docs/configuring-links)
164170

165171
## Option 1: uri-scheme
172+
166173
The uri-scheme package can be used to test deep links on both Android and iOS.
167174

168175
```shell
169176
npx uri-scheme open [your deep link] --[ios|android]
170177
```
171178

172179
Example:
180+
173181
```shell
174182
npx uri-scheme open "app://settings" --ios
175183

176184
npx uri-scheme open "https://app.fake/settings" --ios
177185
```
178186

179187
## Option 2: xcrun for iOS
188+
180189
The xcrun command can be used to test deep links with the iOS simulator:
181190

182191
```shell
183192
xcrun simctl openurl booted [your deep link]
184193
```
185194

186195
Example:
196+
187197
```shell
188198
xcrun simctl openurl booted "app://settings"
189199

190200
xcrun simctl openurl booted "https://app.fake/settings"
191201
```
192202

193203
## Option 3: adb for Android
204+
194205
The adb command can be used to test deep links with the Android emulator or a connected device:
195206

196207
```shell
197208
adb shell am start -W -a android.intent.action.VIEW -d [your deep link] [your android package name]
198209
```
199210

200211
Example:
212+
201213
```shell
202214
adb shell am start -W -a android.intent.action.VIEW -d "app://settings" com.example.withnotifications
203215

Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

examples/with-notifications/android/gradlew

Lines changed: 251 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)