From 0d870f06c13af5184e8a16ea3f4b7d9101bb8cea Mon Sep 17 00:00:00 2001 From: Chaitanya Bhagvan Date: Mon, 14 Nov 2016 20:53:12 +0530 Subject: [PATCH 1/2] Updated to react 15.3.2 and rn 0.37.0 --- examples/ListView/index.ios.js | 4 +- .../ios/ListView.xcodeproj/project.pbxproj | 10 +- examples/ListView/package.json | 4 +- .../ios/NestedViews.xcodeproj/project.pbxproj | 159 +++++++++++++++--- .../xcschemes/NestedViews.xcscheme | 13 +- .../NestedViews/ios/NestedViews/Info.plist | 17 +- .../ios/NestedViewsTests/Info.plist | 2 +- examples/NestedViews/package.json | 4 +- 8 files changed, 170 insertions(+), 43 deletions(-) diff --git a/examples/ListView/index.ios.js b/examples/ListView/index.ios.js index fca2325..e7a1076 100644 --- a/examples/ListView/index.ios.js +++ b/examples/ListView/index.ios.js @@ -1,8 +1,6 @@ import React from 'react' -import { AppRegistry, StatusBarIOS, processColor } from 'react-native'; +import { AppRegistry, processColor } from 'react-native'; import Talks from './Talks'; -StatusBarIOS.setStyle('light-content'); - AppRegistry.registerComponent('ListViewExample', () => Talks); diff --git a/examples/ListView/ios/ListView.xcodeproj/project.pbxproj b/examples/ListView/ios/ListView.xcodeproj/project.pbxproj index 7e3c50b..978c3ce 100644 --- a/examples/ListView/ios/ListView.xcodeproj/project.pbxproj +++ b/examples/ListView/ios/ListView.xcodeproj/project.pbxproj @@ -517,7 +517,10 @@ ); INFOPLIST_FILE = ListView/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = "-ObjC"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); PRODUCT_NAME = ListView; }; name = Debug; @@ -533,7 +536,10 @@ ); INFOPLIST_FILE = ListView/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = "-ObjC"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); PRODUCT_NAME = ListView; }; name = Release; diff --git a/examples/ListView/package.json b/examples/ListView/package.json index 035688e..f3193ec 100644 --- a/examples/ListView/package.json +++ b/examples/ListView/package.json @@ -6,8 +6,8 @@ "start": "react-native start" }, "dependencies": { - "react": "15.1.0", - "react-native": "0.27.2", + "react": "15.3.2", + "react-native": "0.37.0", "react-native-parallax-scroll-view": "../../" } } diff --git a/examples/NestedViews/ios/NestedViews.xcodeproj/project.pbxproj b/examples/NestedViews/ios/NestedViews.xcodeproj/project.pbxproj index 03d985b..7b59f6f 100644 --- a/examples/NestedViews/ios/NestedViews.xcodeproj/project.pbxproj +++ b/examples/NestedViews/ios/NestedViews.xcodeproj/project.pbxproj @@ -102,20 +102,69 @@ remoteGlobalIDString = 58B5119B1A9E6C1200147676; remoteInfo = RCTText; }; + F34654CD1DDA0C6800C940C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; + remoteInfo = "RCTImage-tvOS"; + }; + F34654D11DDA0C6800C940C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28471D9B043800D4039D; + remoteInfo = "RCTLinking-tvOS"; + }; + F34654D51DDA0C6800C940C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28541D9B044C00D4039D; + remoteInfo = "RCTNetwork-tvOS"; + }; + F34654D91DDA0C6800C940C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28611D9B046600D4039D; + remoteInfo = "RCTSettings-tvOS"; + }; + F34654DD1DDA0C6800C940C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A287B1D9B048500D4039D; + remoteInfo = "RCTText-tvOS"; + }; + F34654E21DDA0C6800C940C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28881D9B049200D4039D; + remoteInfo = "RCTWebSocket-tvOS"; + }; + F34654E61DDA0C6800C940C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28131D9B038B00D4039D; + remoteInfo = "React-tvOS"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = main.jsbundle; sourceTree = ""; }; - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = ""; }; - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = ""; }; - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj; sourceTree = ""; }; - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj; sourceTree = ""; }; - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = ../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj; sourceTree = ""; }; + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 00E356EE1AD99517003FC87E /* NestedViewsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NestedViewsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* NestedViewsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NestedViewsTests.m; sourceTree = ""; }; - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj; sourceTree = ""; }; - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = ""; }; + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* NestedViews.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NestedViews.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = NestedViews/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = NestedViews/AppDelegate.m; sourceTree = ""; }; @@ -123,9 +172,9 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = NestedViews/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = NestedViews/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = NestedViews/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.xcodeproj; sourceTree = ""; }; - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../node_modules/react-native/Libraries/Text/RCTText.xcodeproj; sourceTree = ""; }; + 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -176,6 +225,7 @@ isa = PBXGroup; children = ( 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, + F34654CE1DDA0C6800C940C6 /* libRCTImage-tvOS.a */, ); name = Products; sourceTree = ""; @@ -184,6 +234,7 @@ isa = PBXGroup; children = ( 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, + F34654D61DDA0C6800C940C6 /* libRCTNetwork-tvOS.a */, ); name = Products; sourceTree = ""; @@ -217,6 +268,7 @@ isa = PBXGroup; children = ( 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, + F34654DA1DDA0C6800C940C6 /* libRCTSettings-tvOS.a */, ); name = Products; sourceTree = ""; @@ -225,6 +277,7 @@ isa = PBXGroup; children = ( 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, + F34654E31DDA0C6800C940C6 /* libRCTWebSocket-tvOS.a */, ); name = Products; sourceTree = ""; @@ -247,6 +300,7 @@ isa = PBXGroup; children = ( 146834041AC3E56700842450 /* libReact.a */, + F34654E71DDA0C6800C940C6 /* libReact-tvOS.a */, ); name = Products; sourceTree = ""; @@ -255,6 +309,7 @@ isa = PBXGroup; children = ( 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, + F34654D21DDA0C6800C940C6 /* libRCTLinking-tvOS.a */, ); name = Products; sourceTree = ""; @@ -280,6 +335,7 @@ isa = PBXGroup; children = ( 832341B51AAA6A8300B99B32 /* libRCTText.a */, + F34654DE1DDA0C6800C940C6 /* libRCTText-tvOS.a */, ); name = Products; sourceTree = ""; @@ -350,7 +406,7 @@ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = Facebook; TargetAttributes = { 00E356ED1AD99517003FC87E = { @@ -491,6 +547,55 @@ remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + F34654CE1DDA0C6800C940C6 /* libRCTImage-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTImage-tvOS.a"; + remoteRef = F34654CD1DDA0C6800C940C6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F34654D21DDA0C6800C940C6 /* libRCTLinking-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTLinking-tvOS.a"; + remoteRef = F34654D11DDA0C6800C940C6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F34654D61DDA0C6800C940C6 /* libRCTNetwork-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTNetwork-tvOS.a"; + remoteRef = F34654D51DDA0C6800C940C6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F34654DA1DDA0C6800C940C6 /* libRCTSettings-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTSettings-tvOS.a"; + remoteRef = F34654D91DDA0C6800C940C6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F34654DE1DDA0C6800C940C6 /* libRCTText-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTText-tvOS.a"; + remoteRef = F34654DD1DDA0C6800C940C6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F34654E31DDA0C6800C940C6 /* libRCTWebSocket-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTWebSocket-tvOS.a"; + remoteRef = F34654E21DDA0C6800C940C6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F34654E71DDA0C6800C940C6 /* libReact-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libReact-tvOS.a"; + remoteRef = F34654E61DDA0C6800C940C6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -526,7 +631,6 @@ runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "../node_modules/react-native/packager/react-native-xcode.sh"; - showEnvVarsInLog = 1; }; /* End PBXShellScriptBuildPhase section */ @@ -586,6 +690,7 @@ INFOPLIST_FILE = NestedViewsTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NestedViews.app/NestedViews"; }; @@ -603,6 +708,7 @@ INFOPLIST_FILE = NestedViewsTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NestedViews.app/NestedViews"; }; @@ -618,9 +724,13 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - INFOPLIST_FILE = "NestedViews/Info.plist"; + INFOPLIST_FILE = NestedViews/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = "-ObjC"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = NestedViews; }; name = Debug; @@ -634,9 +744,13 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - INFOPLIST_FILE = "NestedViews/Info.plist"; + INFOPLIST_FILE = NestedViews/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = "-ObjC"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = NestedViews; }; name = Release; @@ -654,15 +768,19 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -680,7 +798,7 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -700,8 +818,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -709,6 +829,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -720,7 +841,7 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; diff --git a/examples/NestedViews/ios/NestedViews.xcodeproj/xcshareddata/xcschemes/NestedViews.xcscheme b/examples/NestedViews/ios/NestedViews.xcodeproj/xcshareddata/xcschemes/NestedViews.xcscheme index 3089278..70072e1 100644 --- a/examples/NestedViews/ios/NestedViews.xcodeproj/xcshareddata/xcschemes/NestedViews.xcscheme +++ b/examples/NestedViews/ios/NestedViews.xcodeproj/xcshareddata/xcschemes/NestedViews.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -62,15 +62,18 @@ ReferencedContainer = "container:NestedViews.xcodeproj"> + + @@ -86,10 +89,10 @@ diff --git a/examples/NestedViews/ios/NestedViews/Info.plist b/examples/NestedViews/ios/NestedViews/Info.plist index 91963b2..682480a 100644 --- a/examples/NestedViews/ios/NestedViews/Info.plist +++ b/examples/NestedViews/ios/NestedViews/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,6 +22,13 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationWhenInUseUsageDescription + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -36,13 +43,5 @@ UIViewControllerBasedStatusBarAppearance - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSAllowsArbitraryLoads - - diff --git a/examples/NestedViews/ios/NestedViewsTests/Info.plist b/examples/NestedViews/ios/NestedViewsTests/Info.plist index 886825c..ba72822 100644 --- a/examples/NestedViews/ios/NestedViewsTests/Info.plist +++ b/examples/NestedViews/ios/NestedViewsTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/examples/NestedViews/package.json b/examples/NestedViews/package.json index 4ffab27..6c00262 100644 --- a/examples/NestedViews/package.json +++ b/examples/NestedViews/package.json @@ -6,8 +6,8 @@ "start": "react-native start" }, "dependencies": { - "react": "15.1.0", - "react-native": "0.27.2", + "react": "15.3.2", + "react-native": "0.37.0", "react-native-parallax-scroll-view": "../../" } } From 0e2e8d17f97d7e96dd93a54aa2df288324c6ed0e Mon Sep 17 00:00:00 2001 From: Chaitanya Bhagvan Date: Mon, 14 Nov 2016 20:54:47 +0530 Subject: [PATCH 2/2] Calculating parallaxHeaderHeight on firstLayout of foreground view. So no need to pass parallaxHeaderHeight --- src/index.js | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/index.js b/src/index.js index 594c906..956c972 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,6 @@ const IPropTypes = { fadeOutBackground: bool, contentBackgroundColor: string, onChangeHeaderVisibility: func, - parallaxHeaderHeight: number.isRequired, renderBackground: func, renderFixedHeader: func, renderForeground: func, @@ -46,6 +45,7 @@ const IPropTypes = { }; class ParallaxScrollView extends Component { + constructor(props) { super(props); if (props.renderStickyHeader && !props.stickyHeaderHeight) { @@ -57,7 +57,8 @@ class ParallaxScrollView extends Component { this.state = { scrollY: new Animated.Value(0), viewHeight: window.height, - viewWidth: window.width + viewWidth: window.width, + parallaxHeaderHeight: window.height }; this._footerComponent = { setNativeProps() {} }; // Initial stub this._footerHeight = 0; @@ -71,7 +72,6 @@ class ParallaxScrollView extends Component { contentBackgroundColor, fadeOutForeground, fadeOutBackground, - parallaxHeaderHeight, renderBackground, renderFixedHeader, renderForeground, @@ -84,11 +84,11 @@ class ParallaxScrollView extends Component { ...scrollViewProps } = this.props; - const background = this._renderBackground({ fadeOutBackground, backgroundScrollSpeed, backgroundColor, parallaxHeaderHeight, stickyHeaderHeight, renderBackground }); - const foreground = this._renderForeground({ fadeOutForeground, parallaxHeaderHeight, stickyHeaderHeight, renderForeground: renderForeground || renderParallaxHeader }); + const background = this._renderBackground({ fadeOutBackground, backgroundScrollSpeed, backgroundColor, parallaxHeaderHeight: this.state.parallaxHeaderHeight, stickyHeaderHeight, renderBackground }); + const foreground = this._renderForeground({ fadeOutForeground, parallaxHeaderHeight: this.state.parallaxHeaderHeight, stickyHeaderHeight, renderForeground: renderForeground || renderParallaxHeader }); const bodyComponent = this._wrapChildren(children, { contentBackgroundColor, stickyHeaderHeight, contentContainerStyle }); const footerSpacer = this._renderFooterSpacer({ contentBackgroundColor }); - const maybeStickyHeader = this._maybeRenderStickyHeader({ parallaxHeaderHeight, stickyHeaderHeight, backgroundColor, renderFixedHeader, renderStickyHeader }); + const maybeStickyHeader = this._maybeRenderStickyHeader({ parallaxHeaderHeight: this.state.parallaxHeaderHeight, stickyHeaderHeight, backgroundColor, renderFixedHeader, renderStickyHeader }); const scrollElement = renderScrollComponent(scrollViewProps); return ( @@ -137,13 +137,12 @@ class ParallaxScrollView extends Component { _onScroll(e) { const { - parallaxHeaderHeight, stickyHeaderHeight, onChangeHeaderVisibility, onScroll: prevOnScroll = () => {} } = this.props; - const p = pivotPoint(parallaxHeaderHeight, stickyHeaderHeight); + const p = pivotPoint(this.state.parallaxHeaderHeight, stickyHeaderHeight); this._maybeUpdateScrollPosition(e); @@ -159,10 +158,10 @@ class ParallaxScrollView extends Component { // This optimizes the state update of current scrollY since we don't need to // perform any updates when user has scrolled past the pivot point. _maybeUpdateScrollPosition(e) { - const { parallaxHeaderHeight, stickyHeaderHeight } = this.props; + const { stickyHeaderHeight } = this.props; const { scrollY } = this.state; const { nativeEvent: { contentOffset: { y: offsetY } } } = e; - const p = pivotPoint(parallaxHeaderHeight, stickyHeaderHeight); + const p = pivotPoint(this.state.parallaxHeaderHeight, stickyHeaderHeight); if (offsetY <= p || scrollY._value <= p) { scrollY.setValue(offsetY); @@ -220,12 +219,16 @@ class ParallaxScrollView extends Component { _renderForeground({ fadeOutForeground, parallaxHeaderHeight, stickyHeaderHeight, renderForeground }) { const { scrollY } = this.state; + const _this = this; const p = pivotPoint(parallaxHeaderHeight, stickyHeaderHeight); return ( - + { + const { x, y, width, height } = e.nativeEvent.layout; + _this.setState({parallaxHeaderHeight: height}); + }}> - - { renderForeground() } - + { renderForeground() } );