diff --git a/.babelrc b/.babelrc index 8df53fe..a9ce136 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { -"presets": ["react-native"] -} \ No newline at end of file + "presets": ["react-native"] +} diff --git a/.flowconfig b/.flowconfig index b38ea97..a76425e 100644 --- a/.flowconfig +++ b/.flowconfig @@ -22,6 +22,8 @@ node_modules/react-native/flow flow/ [options] +emoji=true + module.system=haste experimental.strict_type_args=true @@ -34,11 +36,12 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy +suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.37.0 +^0.42.0 diff --git a/.gitignore b/.gitignore index 8fce639..10be197 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,6 @@ yarn-error.log # BUCK buck-out/ \.buckd/ -android/app/libs *.keystore # fastlane diff --git a/android/app/BUCK b/android/app/BUCK index 5c987bd..d1bdf1d 100644 --- a/android/app/BUCK +++ b/android/app/BUCK @@ -1,5 +1,3 @@ -import re - # To learn about Buck see [Docs](https://buckbuild.com/). # To run your application with Buck: # - install Buck @@ -11,8 +9,9 @@ import re # lib_deps = [] + for jarfile in glob(['libs/*.jar']): - name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) + name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] lib_deps.append(':' + name) prebuilt_jar( name = name, @@ -20,7 +19,7 @@ for jarfile in glob(['libs/*.jar']): ) for aarfile in glob(['libs/*.aar']): - name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) + name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] lib_deps.append(':' + name) android_prebuilt_aar( name = name, @@ -28,39 +27,39 @@ for aarfile in glob(['libs/*.aar']): ) android_library( - name = 'all-libs', - exported_deps = lib_deps + name = "all-libs", + exported_deps = lib_deps, ) android_library( - name = 'app-code', - srcs = glob([ - 'src/main/java/**/*.java', - ]), - deps = [ - ':all-libs', - ':build_config', - ':res', - ], + name = "app-code", + srcs = glob([ + "src/main/java/**/*.java", + ]), + deps = [ + ":all-libs", + ":build_config", + ":res", + ], ) android_build_config( - name = 'build_config', - package = 'com.samplenavigation', + name = "build_config", + package = "com.samplenavigation", ) android_resource( - name = 'res', - res = 'src/main/res', - package = 'com.samplenavigation', + name = "res", + package = "com.samplenavigation", + res = "src/main/res", ) android_binary( - name = 'app', - package_type = 'debug', - manifest = 'src/main/AndroidManifest.xml', - keystore = '//android/keystores:debug', - deps = [ - ':app-code', - ], + name = "app", + keystore = "//android/keystores:debug", + manifest = "src/main/AndroidManifest.xml", + package_type = "debug", + deps = [ + ":app-code", + ], ) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5f8ccb4..8f77839 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -58,7 +58,7 @@ import com.android.build.OutputFile * inputExcludes: ["android/**", "ios/**"], * * // override which node gets called and with what additional arguments - * nodeExecutableAndArgs: ["node"] + * nodeExecutableAndArgs: ["node"], * * // supply additional arguments to the packager * extraPackagerArgs: [] diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 48361a9..6e8516c 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -50,6 +50,10 @@ -dontwarn com.facebook.react.** +# TextLayoutBuilder uses a non-public Android constructor within StaticLayout. +# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. +-dontwarn android.text.StaticLayout + # okhttp -keepattributes Signature diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b05684b..0c44a2c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -19,7 +19,8 @@ + android:configChanges="keyboard|keyboardHidden|orientation|screenSize" + android:windowSoftInputMode="adjustResize"> diff --git a/android/app/src/main/java/com/samplenavigation/MainApplication.java b/android/app/src/main/java/com/samplenavigation/MainApplication.java index 2dc548e..6f02082 100644 --- a/android/app/src/main/java/com/samplenavigation/MainApplication.java +++ b/android/app/src/main/java/com/samplenavigation/MainApplication.java @@ -1,7 +1,6 @@ package com.samplenavigation; import android.app.Application; -import android.util.Log; import com.facebook.react.ReactApplication; import com.oblador.vectoricons.VectorIconsPackage; diff --git a/android/build.gradle b/android/build.gradle index fcba4c5..eed9972 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + classpath 'com.android.tools.build:gradle:2.2.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index b9fbfab..dbdc05d 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/android/keystores/BUCK b/android/keystores/BUCK index 15da20e..88e4c31 100644 --- a/android/keystores/BUCK +++ b/android/keystores/BUCK @@ -1,8 +1,8 @@ keystore( - name = 'debug', - store = 'debug.keystore', - properties = 'debug.keystore.properties', - visibility = [ - 'PUBLIC', - ], + name = "debug", + properties = "debug.keystore.properties", + store = "debug.keystore", + visibility = [ + "PUBLIC", + ], ) diff --git a/app.json b/app.json new file mode 100644 index 0000000..2997f1d --- /dev/null +++ b/app.json @@ -0,0 +1,4 @@ +{ + "name": "SampleNavigation", + "displayName": "SampleNavigation" +} \ No newline at end of file diff --git a/app/tabOne/navigationConfiguration.js b/app/tabOne/navigationConfiguration.js index ed5cb18..4cf09bf 100644 --- a/app/tabOne/navigationConfiguration.js +++ b/app/tabOne/navigationConfiguration.js @@ -14,7 +14,7 @@ const routeConfiguration = { // going to disable the header for now const stackNavigatorConfiguration = { headerMode: 'none', - initialRoute: 'TabOneScreenOne' + initialRouteName: 'TabOneScreenOne' } export const NavigatorTabOne = StackNavigator(routeConfiguration,stackNavigatorConfiguration) diff --git a/app/tabOne/views/TabOneNavigation.js b/app/tabOne/views/TabOneNavigation.js index 79359c6..53de04d 100644 --- a/app/tabOne/views/TabOneNavigation.js +++ b/app/tabOne/views/TabOneNavigation.js @@ -22,10 +22,8 @@ const mapStateToProps = (state) => { class TabOneNavigation extends React.Component { static navigationOptions = { - tabBar:{ - label: 'Tab One', - icon: ({ tintColor }) => - } + tabBarLabel: 'Tab One', + tabBarIcon: ({ tintColor }) => } render(){ diff --git a/app/tabThree/views/TabThreeNavigation.js b/app/tabThree/views/TabThreeNavigation.js index 9cd0b45..4c14aad 100644 --- a/app/tabThree/views/TabThreeNavigation.js +++ b/app/tabThree/views/TabThreeNavigation.js @@ -16,10 +16,8 @@ const mapStateToProps = (state) => { } class TabThreeNavigation extends React.Component { static navigationOptions = { - tabBar:{ - label: 'Tab Three', - icon: ({ tintColor }) => - } + tabBarLabel: 'Tab Three', + tabBarIcon: ({ tintColor }) => } render(){ diff --git a/app/tabTwo/views/TabTwoNavigation.js b/app/tabTwo/views/TabTwoNavigation.js index e83be8c..f587f06 100644 --- a/app/tabTwo/views/TabTwoNavigation.js +++ b/app/tabTwo/views/TabTwoNavigation.js @@ -16,10 +16,8 @@ const mapStateToProps = (state) => { } class TabTwoNavigation extends React.Component { static navigationOptions = { - tabBar:{ - label: 'Tab Two', - icon: ({ tintColor }) => - } + tabBarLabel: 'Tab Two', + tabBarIcon: ({ tintColor }) => } render(){ diff --git a/ios/SampleNavigation/Info.plist b/ios/SampleNavigation/Info.plist index 89f9137..e0b98f4 100644 --- a/ios/SampleNavigation/Info.plist +++ b/ios/SampleNavigation/Info.plist @@ -1,66 +1,70 @@ - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - UIAppFonts - - Entypo.ttf - EvilIcons.ttf - FontAwesome.ttf - Foundation.ttf - Ionicons.ttf - MaterialCommunityIcons.ttf - MaterialIcons.ttf - Octicons.ttf - SimpleLineIcons.ttf - Zocial.ttf - - - \ No newline at end of file + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + SampleNavigation + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSLocationWhenInUseUsageDescription + + NSAppTransportSecurity + + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + UIAppFonts + + Entypo.ttf + EvilIcons.ttf + FontAwesome.ttf + Foundation.ttf + Ionicons.ttf + MaterialCommunityIcons.ttf + MaterialIcons.ttf + Octicons.ttf + SimpleLineIcons.ttf + Zocial.ttf + + + + diff --git a/ios/SampleNavigationTests/SampleNavigationTests.m b/ios/SampleNavigationTests/SampleNavigationTests.m index e109bfc..b389512 100644 --- a/ios/SampleNavigationTests/SampleNavigationTests.m +++ b/ios/SampleNavigationTests/SampleNavigationTests.m @@ -37,7 +37,7 @@ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test - (void)testRendersWelcomeScreen { - UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; + UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; BOOL foundElement = NO; diff --git a/package.json b/package.json index efcb995..1692dc2 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "test": "jest" }, "dependencies": { - "react": "15.4.2", - "react-native": "0.41.0", + "react": "^16.0.0-alpha.6", + "react-native": "^0.44.0", "react-native-vector-icons": "^4.0.0", - "react-navigation": "https://github.com/react-community/react-navigation/tarball/master", + "react-navigation": "^1.0.0-beta.9", "react-redux": "^5.0.2", "redux": "^3.6.0", "redux-logger": "^2.8.1"