react native config on ios

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-01-14 13:46:22 +01:00
parent daf7791d86
commit f28f479256
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
2 changed files with 48 additions and 0 deletions

View File

@ -37,6 +37,8 @@
3AAD2AD324A3A60E0075D594 /* Inter-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */; };
3AAD2AD424A3A60E0075D594 /* Inter-SemiBoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */; };
3ABC7AF8245FF85900612C45 /* InterStatus-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9C76AF5A418D4D65A4CAD1D9 /* InterStatus-Regular.otf */; };
55156A9A25B0740200CA30BE /* libReactNativeConfig.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 55156A9725B073E900CA30BE /* libReactNativeConfig.a */; };
55156A9B25B0740C00CA30BE /* libReactNativeConfig.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 55156A9725B073E900CA30BE /* libReactNativeConfig.a */; };
57C854A7993C47A3B1AECD32 /* Inter-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */; };
68E19BBDF749E72ED1F9DEF5 /* libPods-Status-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 132CE3B093884B0FB239A0AB /* libPods-Status-StatusIm.a */; };
6C137817D5298C82BC79177C /* libPods-Status-StatusImPR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D4CB5416994C913628B8754 /* libPods-Status-StatusImPR.a */; };
@ -69,6 +71,13 @@
remoteGlobalIDString = 206C9F3A1D474E910063E3E6;
remoteInfo = RCTStatus;
};
55156A9625B073E900CA30BE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 55156A9125B073E900CA30BE /* ReactNativeConfig.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EB2648DF1C7BE17A00B8F155;
remoteInfo = ReactNativeConfig;
};
9EC013781E06FB1900155B5C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9EC0135C1E06FB1900155B5C /* RCTWKWebView.xcodeproj */;
@ -123,6 +132,7 @@
439B6B4B407A4E2AACAFE5BE /* RCTStatus.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTStatus.xcodeproj; path = "../modules/react-native-status/ios/RCTStatus/RCTStatus.xcodeproj"; sourceTree = "<group>"; };
4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
55156A9125B073E900CA30BE /* ReactNativeConfig.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeConfig.xcodeproj; path = "../node_modules/react-native-config/ios/ReactNativeConfig.xcodeproj"; sourceTree = "<group>"; };
5D4CB5416994C913628B8754 /* libPods-Status-StatusImPR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusImPR.a"; sourceTree = BUILT_PRODUCTS_DIR; };
69291A6222A63434694EA2A6 /* Pods-Status-StatusImPR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.release.xcconfig"; path = "Pods/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.release.xcconfig"; sourceTree = "<group>"; };
693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-SemiBold.otf"; path = "../resources/fonts/Inter-SemiBold.otf"; sourceTree = "<group>"; };
@ -160,6 +170,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
55156A9A25B0740200CA30BE /* libReactNativeConfig.a in Frameworks */,
B24FC7FF1DE7195F00D694FF /* MessageUI.framework in Frameworks */,
B24FC7FD1DE7195700D694FF /* Social.framework in Frameworks */,
CE4E31B31D8695250033ED64 /* Statusgo.framework in Frameworks */,
@ -174,6 +185,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
55156A9B25B0740C00CA30BE /* libReactNativeConfig.a in Frameworks */,
3A8F8EAA24A4D31600BF206D /* GameKit.framework in Frameworks */,
3AAD2AC024A3A60E0075D594 /* MessageUI.framework in Frameworks */,
3AAD2AC124A3A60E0075D594 /* Social.framework in Frameworks */,
@ -254,6 +266,14 @@
path = StatusImPR;
sourceTree = "<group>";
};
55156A9225B073E900CA30BE /* Products */ = {
isa = PBXGroup;
children = (
55156A9725B073E900CA30BE /* libReactNativeConfig.a */,
);
name = Products;
sourceTree = "<group>";
};
5C1C8762251D6EF495FB2384 /* Pods */ = {
isa = PBXGroup;
children = (
@ -270,6 +290,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
55156A9125B073E900CA30BE /* ReactNativeConfig.xcodeproj */,
9EC0135C1E06FB1900155B5C /* RCTWKWebView.xcodeproj */,
439B6B4B407A4E2AACAFE5BE /* RCTStatus.xcodeproj */,
);
@ -455,6 +476,10 @@
ProductGroup = 9EC0135D1E06FB1900155B5C /* Products */;
ProjectRef = 9EC0135C1E06FB1900155B5C /* RCTWKWebView.xcodeproj */;
},
{
ProductGroup = 55156A9225B073E900CA30BE /* Products */;
ProjectRef = 55156A9125B073E900CA30BE /* ReactNativeConfig.xcodeproj */;
},
);
projectRoot = "";
targets = (
@ -473,6 +498,13 @@
remoteRef = 201067C31D4789F700FA83B6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
55156A9725B073E900CA30BE /* libReactNativeConfig.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libReactNativeConfig.a;
remoteRef = 55156A9625B073E900CA30BE /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9EC013791E06FB1900155B5C /* libRCTWKWebView.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;

View File

@ -10,6 +10,7 @@
#import "AppDelegate.h"
#import <asl.h>
#import "ReactNativeConfig.h"
#import "React/RCTLog.h"
#import "RCTBundleURLProvider.h"
#import "RNSplashScreen.h"
@ -54,6 +55,21 @@ static void InitializeFlipper(UIApplication *application) {
signal(SIGPIPE, SIG_IGN);
NSURL *jsCodeLocation;
/* Set logging level from React Native */
NSString *logLevel = [ReactNativeConfig envFor:@"LOG_LEVEL"];
if([logLevel isEqualToString:@"error"]){
RCTSetLogThreshold(RCTLogLevelError);
}
else if([logLevel isEqualToString:@"warn"]){
RCTSetLogThreshold(RCTLogLevelWarning);
}
else if([logLevel isEqualToString:@"info"]){
RCTSetLogThreshold(RCTLogLevelInfo);
}
else if([logLevel isEqualToString:@"debug"]){
RCTSetLogThreshold(RCTLogLevelTrace);
}
NSDictionary *appDefaults = [NSDictionary
dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:@"BLANK_PREVIEW"];
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];