Skip to content

Commit

Permalink
add react-native-system-setting configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgovea committed Jun 2, 2019
1 parent 9ecbac6 commit 9e18d07
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,8 @@
"react-native-sound@0.10.12",
"react-native-sentry@0.41.1",
"react-native-admob@2.0.0-beta.5",
"realm@2.27.0"
"realm@2.27.0",
"react-native-system-setting@1.7.2"
],
"targetJsDependencies": ["react@16.8.3"]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.walmartlabs.ern.container.plugins;

import android.app.Application;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.facebook.react.ReactInstanceManagerBuilder;
import com.facebook.react.ReactPackage;
import com.ninty.system.setting.SystemSettingPackage;

public class SystemSettingPlugin implements ReactPlugin {

public ReactPackage hook(
@NonNull
Application application,
@Nullable
ReactPluginConfig config
) {
return new SystemSettingPackage();
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"android": {
"root": "",
"moduleName": "android"
},
"ios": {
"copy": [
{
"source": "ios/**",
"dest": "{{{projectName}}}/Libraries/RCTSystemSetting"
}
],
"pbxproj": {
"addProject": [
{
"path": "RCTSystemSetting/RCTSystemSetting.xcodeproj",
"group": "Libraries",
"staticLibs": [
{
"name": "libRCTSystemSetting.a",
"target": "RCTSystemSetting"
}
]
}
],
"addHeaderSearchPath": [
"\"$(SRCROOT)/{{{projectName}}}/Libraries/RCTSystemSetting/**\""
]
},
"replaceInFile": [
{
"path": "{{{projectName}}}/Libraries/RCTSystemSetting/RCTSystemSetting.xcodeproj/project.pbxproj",
"string": "GCC_PREPROCESSOR_DEFINITIONS = \\(",
"replaceWith": "GCC_PREPROCESSOR_DEFINITIONS = (\"BLUETOOTH\","
},
{
"path": "{{{projectName}}}/Libraries/RCTSystemSetting/RCTSystemSetting.xcodeproj/project.pbxproj",
"string": "GCC_PREPROCESSOR_DEFINITIONS = \"\"",
"replaceWith": "GCC_PREPROCESSOR_DEFINITIONS = \"BLUETOOTH\""
}
]
}
}

0 comments on commit 9e18d07

Please sign in to comment.