Skip to content

Commit 9bf64cb

Browse files
piotr pietruszewskipi0trpietruszewski
authored andcommitted
docs: added manual linking section
1 parent b2d8972 commit 9bf64cb

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010

1111
- [Installation](#installation)
1212
- [Android](#android)
13+
- [Automatic linking (React Native <=0.59)](#android-automatic-linking-with-react-native-v059-and-below)
14+
- [Manual linking (React Native <=0.59)](#android-manual-linking-with-react-native-v059-and-below)
1315
- [Setup](#android-setup)
1416
- [Permissions](#android-permissions)
1517
- [Push Notifications](#android-push-notifications)
1618
- [Push notification deep links support](#android-push-notification-deep-links-support)
1719
- [iOS](#ios)
20+
- [Manual linking (React Native <=0.59)](#ios-manual-linking-with-react-native-v059-and-below)
1821
- [Setup](#ios-setup)
1922
- [Permissions](#ios-permissions)
2023
- [Push Notifications](#ios-push-notifications)
@@ -40,6 +43,26 @@ yarn add @intercom/intercom-react-native
4043

4144
If you're using React Native v0.60 or above, the library will be linked automatically without any steps being taken.
4245

46+
#### Android: Automatic linking with React Native v0.59 and below
47+
48+
```
49+
$ react-native link intercom-react-native
50+
```
51+
52+
#### Android: Manual linking with React Native v0.59 and below
53+
54+
- Add below code to `android/settings.gradle`
55+
56+
```Gradle
57+
include ':intercomreactnative'
58+
project(':intercomreactnative').projectDir = new File(rootProject.projectDir, '../../android')
59+
```
60+
61+
- Then edit `android/app/build.gradle`, inside `dependencies` at very bottom add
62+
63+
```Gradle
64+
implementation project(':intercomreactnative')
65+
```
4366

4467
#### Android: Setup
4568

@@ -255,6 +278,10 @@ cd ..
255278

256279
If you're using React Native v0.60 or above, the library will be linked automatically without any steps being taken.
257280

281+
#### iOS: Manual linking with React Native v0.59 and below
282+
283+
See [How to manually link IOS Intercom SDK](docs/IOS-MANUAL-LINKING.md)
284+
258285
#### iOS: Setup
259286

260287
- Open `ios/AppDelegate.m` then add below code:

docs/IOS-MANUAL-LINKING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Intercom IOS Manual linking
2+
3+
## More info about [Manual Linking](https://reactnative.dev/docs/linking-libraries-ios)
4+
5+
- In project root make `react-native link` command
6+
- In Xcode open `YourApp.xcworkspace`, if there is no file with extension `xcworkspace` open `YourApp.xcodeproj`
7+
- In file browser open `./node_modules/intercom-react-native/ios`
8+
- From file browser drag `Intercom.xcframework` and drop in Xcode window under YourProject name
9+
10+
![Xcode linking](xcode-linking.png)
11+
12+
___
13+
14+
- In popup mark `Copy items if needed`
15+
16+
![Xcode popup](xcode-popup.png)
17+
18+
___
19+
20+
- 🎉 Done 🎉 Intercom SDK is linked

docs/xcode-linking.png

2.7 MB
Loading

docs/xcode-popup.png

2.05 MB
Loading

0 commit comments

Comments
 (0)