- In the XCode's "Project navigator", right click on your project's Libraries folder ➜
Add Files to <...>
- Go to
node_modules
➜ rn-workers
➜ ios
➜ select RNWorkers.xcodeproj
- Add
RNWorkers.a
to Build Phases -> Link Binary With Libraries
- Pray and try to compile
- Add the following lines to
android/settings.gradle
:
include ':rn-workers'
project(':rn-workers').projectDir = new File(rootProject.projectDir, '../node_modules/rn-workers/android')
- Add the compile line to the dependencies in
android/app/build.gradle
:
dependencies {
compile project(':rn-workers')
}
- Add the import and link the package in
MainApplication.java
:
public class MainApplication extends Application implements ReactApplication {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNWorkersPackage() // <-- add this line
);
}
}