Skip to content

Commit

Permalink
Update pod install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kadi Kraman committed Jun 28, 2019
1 parent 3f36c2f commit 1c32f12
Showing 1 changed file with 20 additions and 37 deletions.
57 changes: 20 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,41 +183,8 @@ const result = await revoke(config, {

```sh
npm install react-native-app-auth --save
react-native link react-native-app-auth
```

**Then follow the [Setup](#setup) steps to configure the native iOS and Android projects.**

If you are not using `react-native link`, perform the [Manual installation](#manual-installation)
steps instead.

### Manual installation

#### iOS

1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
2. Go to `node_modules``react-native-app-auth` and add `RNAppAuth.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNAppAuth.a` to your project's
`Build Phases``Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`

* Add `import com.rnappauth.RNAppAuthPackage;` to the imports at the top of the file
* Add `new RNAppAuthPackage()` to the list returned by the `getPackages()` method

2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-app-auth'
project(':react-native-app-auth').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-app-auth/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-app-auth')
```

## Setup

### iOS Setup
Expand All @@ -238,12 +205,28 @@ AppAuth supports three options for dependency management.

1. **CocoaPods**

With [CocoaPods](https://guides.cocoapods.org/using/getting-started.html), add the following line to
your `Podfile`:
**RN<0.60**:

```sh
react-native link react-native-app-auth
```

With [CocoaPods](https://guides.cocoapods.org/using/getting-started.html), add the following line to
your `Podfile`:

```sh
pod 'AppAuth', '>= 0.94'
```

Then run `pod install`.

pod 'AppAuth', '1.0'
**RN>=0.60**:
With React Native 0.60 and later, linking of pods is done automatically

Then run `pod install`.
```sh
cd ios
pod install
```

2. **Carthage**

Expand Down

0 comments on commit 1c32f12

Please sign in to comment.