GT2/GT2-iOS/node_modules/react-native-branch/docs/updating-1.0.0.md

26 lines
1.1 KiB
Markdown
Raw Normal View History

2018-02-12 17:26:06 +00:00
# Updating to 1.0.0
Version 1.0.0 of react-native-branch requires version 0.40.0 or later
of react-native. You will need to make some changes to the native iOS
project in order to build:
## Imports
Change `#import "RNBranch.h"` to `#import <react-native-branch/RNBranch.h>`
in AppDelegate.m. The native React library also requires similar changes for
headers, for example:
```Objective-C
#import <React/RCTRootView.h>
#import <react-native-branch/RNBranch.h>
```
## Library name
Change the name of the library in Linked Frameworks and Libraries to
`libreact-native-branch.a` instead of `libRNBranch.a`:
![libreact-native-branch.a](https://raw.githubusercontent.com/BranchMetrics/react-native-branch-deep-linking/master/docs/assets/libreact-native-branch.png)
Alternately, you can remove the `RNBranch` project reference from the Libraries group in Xcode (be sure to select Remove Reference or you'll have to reinstall the react-native-branch NPM module) and the dependency on `libRNBranch.a` in Linked Frameworks and Libraries. Then close the project or workspace and run `react-native link` to add `RNBranch` back with the correct library name.