Ver código fonte

[系统][升级]:更新RN版本,升级基础设施

tags/jenkins-front-end-screenad-130-v85^0
hupeng 6 anos atrás
pai
commit
b0c6d51993
17 arquivos alterados com 116 adições e 86 exclusões
  1. +1
    -2
      .flowconfig
  2. +0
    -1
      __tests__/App-test.js
  3. +7
    -3
      android/app/build.gradle
  4. +1
    -7
      android/build.gradle
  5. BIN
      android/gradle/wrapper/gradle-5.4.1-all.zip
  6. BIN
      android/gradle/wrapper/gradle-wrapper.jar
  7. +1
    -1
      android/gradle/wrapper/gradle-wrapper.properties
  8. +17
    -1
      android/gradlew
  9. +17
    -1
      android/gradlew.bat
  10. +3
    -3
      android/settings.gradle
  11. +2
    -2
      babel.config.js
  12. +0
    -1
      index.js
  13. +22
    -40
      ios/screenAd.xcodeproj/project.pbxproj
  14. +2
    -1
      ios/screenAd/AppDelegate.h
  15. +15
    -13
      ios/screenAd/AppDelegate.m
  16. +17
    -0
      metro.config.js
  17. +11
    -10
      package.json

+ 1
- 2
.flowconfig Ver arquivo

@@ -24,7 +24,6 @@
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=true
@@ -67,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.86.0
^0.92.0

__tests__/App.js → __tests__/App-test.js Ver arquivo

@@ -1,6 +1,5 @@
/**
* @format
* @lint-ignore-every XPLATJSCOPYRIGHT1
*/

import 'react-native';

+ 7
- 3
android/app/build.gradle Ver arquivo

@@ -96,7 +96,11 @@ def enableProguardInReleaseBuilds = false

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

def getVersionCode = { ->
return project.hasProperty('versionCode') ? Integer.parseInt(project.versionCode) : 1
@@ -125,7 +129,7 @@ android {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a"
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
@@ -166,7 +170,7 @@ android {
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =


+ 1
- 7
android/build.gradle Ver arquivo

@@ -13,7 +13,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath("com.android.tools.build:gradle:3.4.0")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -31,9 +31,3 @@ allprojects {
}
}
}


task wrapper(type: Wrapper) {
gradleVersion = '4.7'
distributionUrl = distributionUrl.replace("bin", "all")
}

BIN
android/gradle/wrapper/gradle-4.7-all.zip → android/gradle/wrapper/gradle-5.4.1-all.zip Ver arquivo


BIN
android/gradle/wrapper/gradle-wrapper.jar Ver arquivo


+ 1
- 1
android/gradle/wrapper/gradle-wrapper.properties Ver arquivo

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=gradle-4.7-all.zip
distributionUrl=gradle-5.4.1-all.zip

+ 17
- 1
android/gradlew Ver arquivo

@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"


+ 17
- 1
android/gradlew.bat Ver arquivo

@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome


+ 3
- 3
android/settings.gradle Ver arquivo

@@ -1,9 +1,9 @@
rootProject.name = 'screenAd'
include ':react-native-camera'
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '..\\node_modules\\react-native-camera\\android')
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android')
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '..\\node_modules\\react-native-device-info\\android')
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '..\\node_modules\\react-native-code-push\\android\\app')
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')

include ':app'

+ 2
- 2
babel.config.js Ver arquivo

@@ -1,3 +1,3 @@
module.exports = {
presets: ["module:metro-react-native-babel-preset"]
}
presets: ['module:metro-react-native-babel-preset'],
};

+ 0
- 1
index.js Ver arquivo

@@ -1,6 +1,5 @@
/**
* @format
* @lint-ignore-every XPLATJSCOPYRIGHT1
*/

import {AppRegistry} from 'react-native';


+ 22
- 40
ios/screenAd.xcodeproj/project.pbxproj Ver arquivo

@@ -39,11 +39,11 @@
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
84325BCA939E4E4E8090435C /* libCodePush.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 928B0784CE244B05BADC60D9 /* libCodePush.a */; };
1D9B977EF02A4A4889A3DB8D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 66D0C7202A274329A44896AF /* libz.tbd */; };
87AC1C7FBD2D486A8496775D /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DEA1E60B1E4C4CF08017D6C7 /* libRNDeviceInfo.a */; };
603338A972BC497CB13A8E7E /* libRNDeviceInfo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 145DB45C59D944B7BC067032 /* libRNDeviceInfo-tvOS.a */; };
34AFC50E88444884839918E1 /* libRNCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7847EE6DABE74D92BBD93F0A /* libRNCamera.a */; };
206CC543489C4F7995B4032A /* libCodePush.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 891CFC0FAA7D49E980C84838 /* libCodePush.a */; };
C7220E8B42ED4C16A6C2AE14 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 03F6F5CC7188401F80052D6D /* libz.tbd */; };
FEBB7F68D5534228A6A832AD /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C488E5D3FD5417DAAAA5C79 /* libRNDeviceInfo.a */; };
59D20E8E9CD64A01B87A3AC0 /* libRNDeviceInfo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D705AD40EF415A95C31652 /* libRNDeviceInfo-tvOS.a */; };
D240C4819F1E4B80BB6D7BEE /* libRNCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F8C0E0ED2BA401B9075C9F3 /* libRNCamera.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
@@ -351,14 +351,14 @@
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
0CB64B19BE27429888B0F5FA /* CodePush.xcodeproj */ = {isa = PBXFileReference; name = "CodePush.xcodeproj"; path = "../node_modules/react-native-code-push/ios/CodePush.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
928B0784CE244B05BADC60D9 /* libCodePush.a */ = {isa = PBXFileReference; name = "libCodePush.a"; path = "libCodePush.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
66D0C7202A274329A44896AF /* libz.tbd */ = {isa = PBXFileReference; name = "libz.tbd"; path = "usr/lib/libz.tbd"; sourceTree = SDKROOT; fileEncoding = undefined; lastKnownFileType = sourcecode.text-based-dylib-definition; explicitFileType = undefined; includeInIndex = 0; };
D7C737D4F5674419B8D2A7F0 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; name = "RNDeviceInfo.xcodeproj"; path = "../node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
DEA1E60B1E4C4CF08017D6C7 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo.a"; path = "libRNDeviceInfo.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
145DB45C59D944B7BC067032 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo-tvOS.a"; path = "libRNDeviceInfo-tvOS.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
00A674D206BA447C9B2B9CBA /* RNCamera.xcodeproj */ = {isa = PBXFileReference; name = "RNCamera.xcodeproj"; path = "../node_modules/react-native-camera/ios/RNCamera.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
7847EE6DABE74D92BBD93F0A /* libRNCamera.a */ = {isa = PBXFileReference; name = "libRNCamera.a"; path = "libRNCamera.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
D256D2ADE9FF4E9782EBCA6D /* CodePush.xcodeproj */ = {isa = PBXFileReference; name = "CodePush.xcodeproj"; path = "../node_modules/react-native-code-push/ios/CodePush.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
891CFC0FAA7D49E980C84838 /* libCodePush.a */ = {isa = PBXFileReference; name = "libCodePush.a"; path = "libCodePush.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
03F6F5CC7188401F80052D6D /* libz.tbd */ = {isa = PBXFileReference; name = "libz.tbd"; path = "usr/lib/libz.tbd"; sourceTree = SDKROOT; fileEncoding = undefined; lastKnownFileType = sourcecode.text-based-dylib-definition; explicitFileType = undefined; includeInIndex = 0; };
C6058A0BC9054E0394045AC4 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; name = "RNDeviceInfo.xcodeproj"; path = "../node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
0C488E5D3FD5417DAAAA5C79 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo.a"; path = "libRNDeviceInfo.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
22D705AD40EF415A95C31652 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo-tvOS.a"; path = "libRNDeviceInfo-tvOS.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
0F57B32024664223A7D6E682 /* RNCamera.xcodeproj */ = {isa = PBXFileReference; name = "RNCamera.xcodeproj"; path = "../node_modules/react-native-camera/ios/RNCamera.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
4F8C0E0ED2BA401B9075C9F3 /* libRNCamera.a */ = {isa = PBXFileReference; name = "libRNCamera.a"; path = "libRNCamera.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -387,10 +387,10 @@
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
84325BCA939E4E4E8090435C /* libCodePush.a in Frameworks */,
1D9B977EF02A4A4889A3DB8D /* libz.tbd in Frameworks */,
87AC1C7FBD2D486A8496775D /* libRNDeviceInfo.a in Frameworks */,
34AFC50E88444884839918E1 /* libRNCamera.a in Frameworks */,
206CC543489C4F7995B4032A /* libCodePush.a in Frameworks */,
C7220E8B42ED4C16A6C2AE14 /* libz.tbd in Frameworks */,
FEBB7F68D5534228A6A832AD /* libRNDeviceInfo.a in Frameworks */,
D240C4819F1E4B80BB6D7BEE /* libRNCamera.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -407,7 +407,7 @@
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
603338A972BC497CB13A8E7E /* libRNDeviceInfo-tvOS.a in Frameworks */,
59D20E8E9CD64A01B87A3AC0 /* libRNDeviceInfo-tvOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -544,7 +544,7 @@
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
2D16E6891FA4F8E400B85C8A /* libReact.a */,
66D0C7202A274329A44896AF /* libz.tbd */,
03F6F5CC7188401F80052D6D /* libz.tbd */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -582,9 +582,9 @@
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
0CB64B19BE27429888B0F5FA /* CodePush.xcodeproj */,
D7C737D4F5674419B8D2A7F0 /* RNDeviceInfo.xcodeproj */,
00A674D206BA447C9B2B9CBA /* RNCamera.xcodeproj */,
D256D2ADE9FF4E9782EBCA6D /* CodePush.xcodeproj */,
C6058A0BC9054E0394045AC4 /* RNDeviceInfo.xcodeproj */,
0F57B32024664223A7D6E682 /* RNCamera.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
@@ -1213,9 +1213,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
@@ -1244,9 +1241,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
@@ -1332,9 +1326,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
@@ -1371,9 +1362,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
@@ -1409,9 +1397,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
@@ -1447,9 +1432,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",


+ 2
- 1
ios/screenAd/AppDelegate.h Ver arquivo

@@ -5,9 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>

@property (nonatomic, strong) UIWindow *window;



+ 15
- 13
ios/screenAd/AppDelegate.m Ver arquivo

@@ -8,6 +8,7 @@
#import "AppDelegate.h"
#import <CodePush/CodePush.h>

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

@@ -15,20 +16,12 @@

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"screenAd"
initialProperties:nil];

#ifdef DEBUG
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
jsCodeLocation = [CodePush bundleURL];
#endif

RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"screenAd"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [UIColor blackColor];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
@@ -38,4 +31,13 @@
return YES;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [CodePush bundleURL];
#endif
}

@end

+ 17
- 0
metro.config.js Ver arquivo

@@ -0,0 +1,17 @@
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/

module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};

+ 11
- 10
package.json Ver arquivo

@@ -7,20 +7,21 @@
"test": "jest"
},
"dependencies": {
"react": "16.8.6",
"react-native": "0.59.8",
"react-native-animatable": "^1.3.1",
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-animatable": "^1.3.2",
"react-native-camera": "^1.12.0",
"react-native-code-push": "^5.5.2",
"react-native-device-info": "^0.26.4",
"react-native-code-push": "^5.6.0",
"react-native-device-info": "^2.1.2",
"react-native-swiper": "^1.5.14"
},
"devDependencies": {
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.1.0",
"jest": "24.1.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
"@babel/core": "^7.4.5",
"@babel/runtime": "^7.4.5",
"babel-jest": "^24.8.0",
"jest": "^24.8.0",
"metro-react-native-babel-preset": "^0.54.1",
"react-test-renderer": "16.8.3"
},
"jest": {
"preset": "react-native"


Carregando…
Cancelar
Salvar