react-native-config
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -8,2 +8,2 @@ 'use strict'; | ||
export default NativeModules.ReactNativeConfig || {}; | ||
export default NativeModules.ReactNativeConfigModule || {}; |
{ | ||
"name": "react-native-config", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Expose config variables to React Native apps", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -47,2 +47,42 @@ # Config variables for React Native apps | ||
- Manual Link (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-config` and add `ReactNativeConfig.xcodeproj` | ||
3. Expand the `ReactNativeConfig.xcodeproj` ➜ `Products` folder | ||
4. In the project navigator, select your project. Add `libReactNativeConfig.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` | ||
5. And go the Build Settings tab. Make sure All is toggled on (instead of Basic) | ||
6. Look for Header Search Paths and add `$(SRCROOT)/../node_modules/react-native-config/ios/**` as `non-recursive` | ||
- Manual Link (Android) | ||
**android/settings.gradle** | ||
```diff | ||
+ include ':react-native-config' | ||
+ project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android') | ||
``` | ||
**android/app/build.gradle** | ||
```diff | ||
dependencies { | ||
implementation "com.facebook.react:react-native:+" // From node_modules | ||
+ implementation project(':react-native-config') | ||
} | ||
``` | ||
**MainApplication.java** | ||
```diff | ||
+ import com.lugg.ReactNativeConfig.ReactNativeConfigPackage; | ||
@Override | ||
protected List<ReactPackage> getPackages() { | ||
return Arrays.asList( | ||
new MainReactPackage() | ||
+ new ReactNativeConfigPackage() | ||
); | ||
} | ||
``` | ||
### Extra step for Android | ||
@@ -151,2 +191,14 @@ | ||
#### App Extensions | ||
Add dependency to `react-native-config`. | ||
``` | ||
target 'ShareExtension' do | ||
platform :ios, '9.0' | ||
pod 'react-native-config', :path => '../node_modules/react-native-config' | ||
end | ||
``` | ||
### Different environments | ||
@@ -153,0 +205,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77696
26
293