Skip to content

Commit c48423c

Browse files
committed
update readme
1 parent 09bcf2d commit c48423c

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,75 @@
44

55
`yarn add react-native-pager-view`
66

7+
## Linking
8+
9+
### >= 0.60
10+
11+
Autolinking will just do the job.
12+
13+
### < 0.60
14+
15+
#### Mostly automatic
16+
17+
`react-native link react-native-pager-view`
18+
19+
#### Manual linking
20+
21+
<details>
22+
<summary>Manually link the library on iOS</summary>
23+
</br>
24+
25+
Follow the [instructions in the React Native documentation](https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking) to manually link the framework or link using [Cocoapods](https://cocoapods.org) by adding this to your `Podfile`:
26+
27+
```ruby
28+
pod 'react-native-pager-view', :path => '../node_modules/react-native-pager-view'
29+
```
30+
31+
</details>
32+
33+
<details>
34+
<summary>Manually link the library on Android</summary>
35+
</br>
36+
Make the following changes:
37+
38+
#### `android/settings.gradle`
39+
40+
```groovy
41+
include ':react-native-pager-view'
42+
project(':react-native-pager-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pager-view')
43+
```
44+
45+
#### `android/app/build.gradle`
46+
47+
```groovy
48+
dependencies {
49+
...
50+
implementation project(':react-native-pager-view')
51+
}
52+
```
53+
54+
#### `android/app/src/main/.../MainApplication.java`
55+
56+
On top, where imports are:
57+
58+
```java
59+
import com.reactnativecommunity.viewpager.RNCViewPagerPackage;
60+
```
61+
62+
Add the `RNCViewPagerPackage` class to your list of exported packages.
63+
64+
```java
65+
@Override
66+
protected List<ReactPackage> getPackages() {
67+
return Arrays.<ReactPackage>asList(
68+
new MainReactPackage(),
69+
new RNCViewPagerPackage()
70+
);
71+
}
72+
```
73+
74+
</details>
75+
776
## Usage
877

978
```js

0 commit comments

Comments
 (0)