Skip to content

Commit

Permalink
Adds GIFs
Browse files Browse the repository at this point in the history
  • Loading branch information
vegaro authored Dec 14, 2018
1 parent b597ae4 commit dd8f11c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ Purchases.framework also needs to be added to your iOS project. The npm install
Alternatively you can install the framework via [CocoaPods](https://cocoapods.org/pods/Purchases).

##### Create a Framework Reference in your project
1. Drag `Purchases.framework` from the `RNPurchases`sub-project under the libraries section to the outer project and create a reference
1. Drag `Purchases.framework` from the `RNPurchases`sub-project under the libraries section to the outer project and create a reference.

![](https://media.giphy.com/media/83fBXlBYPF8oxMQvhN/giphy.gif)

##### Add iOS Framework to Embedded Binaries
1. In Xcode, in project manager, select your app target.
1. Select the general tab
1. Drag `Purchases.framework` from your project to the Embedded Binaries section
1. Add `$(PROJECT_DIR)/../node_modules/react-native-purchases/ios` to Framework Search paths in build settings

![](https://media.giphy.com/media/dCCyG7rmjIyByLS9ju/giphy.gif)

Add `$(PROJECT_DIR)/../node_modules/react-native-purchases/ios` to Framework Search paths in build settings

![](https://media.giphy.com/media/1pAbuARm4TLfZKdfx3/giphy.gif)

##### Add Strip Frameworks Phase
The App Store, in it's infinite wisdom, still rejects fat frameworks, so we need to strip our framework before it is deployed. To do this, add the following script phase to your build.
Expand All @@ -32,6 +39,8 @@ The App Store, in it's infinite wisdom, still rejects fat frameworks, so we need
3. Add a new `Run Script`, name it `Strip Frameworks`
4. Add the following command `"${PROJECT_DIR}/../node_modules/react-native-purchases/ios/strip-frameworks.sh"` (quotes included)

![](https://media.giphy.com/media/39zTmnsW1CIrJNk5AM/giphy.gif)

## Usage
```javascript
import Purchases from 'react-native-purchases';
Expand Down

0 comments on commit dd8f11c

Please sign in to comment.