From 4a88406d7564b2fff02de063bf75448a58ed910d Mon Sep 17 00:00:00 2001 From: Andy Prock Date: Mon, 16 Jan 2017 11:57:01 -0800 Subject: [PATCH 1/2] Header changes required for 0.40 on ios https://github.com/facebook/react-native/releases/tag/v0.40.0 --- examples/OsInfo/.flowconfig | 34 +- examples/OsInfo/.gitattributes | 1 + examples/OsInfo/.gitignore | 18 +- examples/OsInfo/android/app/build.gradle | 4 +- .../main/java/com/osinfo/MainApplication.java | 9 +- examples/OsInfo/android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 3 +- examples/OsInfo/android/settings.gradle | 4 +- .../ios/OsInfo.xcodeproj/project.pbxproj | 312 +++++++++++------- .../xcshareddata/xcschemes/OsInfo.xcscheme | 27 +- examples/OsInfo/ios/OsInfo/AppDelegate.m | 4 +- examples/OsInfo/ios/OsInfoTests/OsInfoTests.m | 4 +- examples/OsInfo/package.json | 47 ++- ios/RNOS.h | 6 +- ios/RNOS.xcodeproj/project.pbxproj | 17 - 15 files changed, 287 insertions(+), 205 deletions(-) create mode 100644 examples/OsInfo/.gitattributes diff --git a/examples/OsInfo/.flowconfig b/examples/OsInfo/.flowconfig index 3b261e2..876e701 100644 --- a/examples/OsInfo/.flowconfig +++ b/examples/OsInfo/.flowconfig @@ -1,28 +1,18 @@ [ignore] - -# We fork some components by platform. +; We fork some components by platform .*/*[.]android.js -# Ignore templates with `@flow` in header -.*/local-cli/generator.* - -# Ignore malformed json -.*/node_modules/y18n/test/.*\.json - -# Ignore the website subdir -/website/.* - -# Ignore BUCK generated dirs +; Ignore "BUCK" generated dirs /\.buckd/ -# Ignore unexpected extra @providesModule -.*/node_modules/commoner/test/source/widget/share.js +; Ignore unexpected extra "@providesModule" +.*/node_modules/.*/node_modules/fbjs/.* -# Ignore duplicate module providers -# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root +; Ignore duplicate module providers +; For RN Apps installed via npm, "Libraries" folder is inside +; "node_modules/react-native" but in the source repo it is in the root .*/Libraries/react-native/React.js .*/Libraries/react-native/ReactNative.js -.*/node_modules/jest-runtime/build/__tests__/.* [include] @@ -34,25 +24,21 @@ flow/ [options] module.system=haste -esproposal.class_static_fields=enable -esproposal.class_instance_fields=enable - experimental.strict_type_args=true munge_underscores=true -module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy unsafe.enable_getters_and_setters=true [version] -^0.33.0 +^0.36.0 diff --git a/examples/OsInfo/.gitattributes b/examples/OsInfo/.gitattributes new file mode 100644 index 0000000..d42ff18 --- /dev/null +++ b/examples/OsInfo/.gitattributes @@ -0,0 +1 @@ +*.pbxproj -text diff --git a/examples/OsInfo/.gitignore b/examples/OsInfo/.gitignore index eb1535e..fc13f16 100644 --- a/examples/OsInfo/.gitignore +++ b/examples/OsInfo/.gitignore @@ -22,12 +22,13 @@ DerivedData *.xcuserstate project.xcworkspace -# Android/IJ +# Android/IntelliJ # -*.iml +build/ .idea .gradle local.properties +*.iml # node.js # @@ -38,4 +39,15 @@ npm-debug.log buck-out/ \.buckd/ android/app/libs -android/keystores/debug.keystore +*.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots diff --git a/examples/OsInfo/android/app/build.gradle b/examples/OsInfo/android/app/build.gradle index 1cd5d02..8b42eec 100644 --- a/examples/OsInfo/android/app/build.gradle +++ b/examples/OsInfo/android/app/build.gradle @@ -135,6 +135,6 @@ dependencies { // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { - from configurations.compile - into 'libs' + from configurations.compile + into 'libs' } diff --git a/examples/OsInfo/android/app/src/main/java/com/osinfo/MainApplication.java b/examples/OsInfo/android/app/src/main/java/com/osinfo/MainApplication.java index eb5ca04..a498418 100644 --- a/examples/OsInfo/android/app/src/main/java/com/osinfo/MainApplication.java +++ b/examples/OsInfo/android/app/src/main/java/com/osinfo/MainApplication.java @@ -9,6 +9,7 @@ import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; +import com.facebook.soloader.SoLoader; import java.util.Arrays; import java.util.List; @@ -32,6 +33,12 @@ protected List getPackages() { @Override public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; + return mReactNativeHost; + } + + @Override + public void onCreate() { + super.onCreate(); + SoLoader.init(this, /* native exopackage */ false); } } diff --git a/examples/OsInfo/android/build.gradle b/examples/OsInfo/android/build.gradle index f3bd7d3..fcba4c5 100644 --- a/examples/OsInfo/android/build.gradle +++ b/examples/OsInfo/android/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' + classpath 'com.android.tools.build:gradle:1.3.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/examples/OsInfo/android/gradle/wrapper/gradle-wrapper.properties b/examples/OsInfo/android/gradle/wrapper/gradle-wrapper.properties index 3fad1bb..b9fbfab 100644 --- a/examples/OsInfo/android/gradle/wrapper/gradle-wrapper.properties +++ b/examples/OsInfo/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Nov 04 12:47:05 PDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip diff --git a/examples/OsInfo/android/settings.gradle b/examples/OsInfo/android/settings.gradle index be47d6f..d5f86f4 100644 --- a/examples/OsInfo/android/settings.gradle +++ b/examples/OsInfo/android/settings.gradle @@ -1,5 +1,5 @@ rootProject.name = 'OsInfo' - -include ':app' include ':react-native-os' project(':react-native-os').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-os/android') + +include ':app' diff --git a/examples/OsInfo/ios/OsInfo.xcodeproj/project.pbxproj b/examples/OsInfo/ios/OsInfo.xcodeproj/project.pbxproj index ef59b0d..270988e 100644 --- a/examples/OsInfo/ios/OsInfo.xcodeproj/project.pbxproj +++ b/examples/OsInfo/ios/OsInfo.xcodeproj/project.pbxproj @@ -5,7 +5,6 @@ }; objectVersion = 46; objects = { - /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; @@ -22,8 +21,9 @@ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; - 9F92C4E5DBD14F148020D5EC /* libRNOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 82491C83B6834D7598C82BD0 /* libRNOS.a */; }; + 5F49DCF166F241FCA37E52C7 /* libRNOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B661CB5F1E944A77897ECC45 /* libRNOS.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -90,76 +90,125 @@ remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; remoteInfo = React; }; - 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTLinking; - }; - 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; - 9677DC961DCD3D0F00804F62 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0E0A945FE56B4718BC8E81C1 /* RNOS.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RNOS; - }; - 96DBCB6F1DCCF59E000FCE30 /* PBXContainerItemProxy */ = { + 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; remoteInfo = "RCTImage-tvOS"; }; - 96DBCB731DCCF59E000FCE30 /* PBXContainerItemProxy */ = { + 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28471D9B043800D4039D; remoteInfo = "RCTLinking-tvOS"; }; - 96DBCB771DCCF59E000FCE30 /* PBXContainerItemProxy */ = { + 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28541D9B044C00D4039D; remoteInfo = "RCTNetwork-tvOS"; }; - 96DBCB7B1DCCF59E000FCE30 /* PBXContainerItemProxy */ = { + 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28611D9B046600D4039D; remoteInfo = "RCTSettings-tvOS"; }; - 96DBCB7F1DCCF59E000FCE30 /* PBXContainerItemProxy */ = { + 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A287B1D9B048500D4039D; remoteInfo = "RCTText-tvOS"; }; - 96DBCB841DCCF59E000FCE30 /* PBXContainerItemProxy */ = { + 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28881D9B049200D4039D; remoteInfo = "RCTWebSocket-tvOS"; }; - 96DBCB881DCCF59E000FCE30 /* PBXContainerItemProxy */ = { + 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28131D9B038B00D4039D; remoteInfo = "React-tvOS"; }; + 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C059A1DE3340900C268FA; + remoteInfo = yoga; + }; + 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C06751DE3340C00C268FA; + remoteInfo = "yoga-tvOS"; + }; + 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; + remoteInfo = cxxreact; + }; + 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; + remoteInfo = "cxxreact-tvOS"; + }; + 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; + remoteInfo = jschelpers; + }; + 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; + remoteInfo = "jschelpers-tvOS"; + }; + 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTAnimation; + }; + 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28201D9B03D100D4039D; + remoteInfo = "RCTAnimation-tvOS"; + }; + 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTLinking; + }; + 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5119B1A9E6C1200147676; + remoteInfo = RCTText; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -172,7 +221,6 @@ 00E356EE1AD99517003FC87E /* OsInfoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OsInfoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* OsInfoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OsInfoTests.m; sourceTree = ""; }; - 0E0A945FE56B4718BC8E81C1 /* RNOS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNOS.xcodeproj; path = "../node_modules/react-native-os/ios/RNOS.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 /* OsInfo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OsInfo.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -183,9 +231,11 @@ 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = OsInfo/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = OsInfo/main.m; sourceTree = ""; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; - 82491C83B6834D7598C82BD0 /* libRNOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNOS.a; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + BE3EA6176DE14BC89DDD0CFA /* RNOS.xcodeproj */ = {isa = PBXFileReference; name = "RNOS.xcodeproj"; path = "../node_modules/react-native-os/ios/RNOS.xcodeproj"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; }; + B661CB5F1E944A77897ECC45 /* libRNOS.a */ = {isa = PBXFileReference; name = "libRNOS.a"; path = "libRNOS.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -201,6 +251,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, @@ -211,7 +262,7 @@ 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, - 9F92C4E5DBD14F148020D5EC /* libRNOS.a in Frameworks */, + 5F49DCF166F241FCA37E52C7 /* libRNOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -238,7 +289,7 @@ isa = PBXGroup; children = ( 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, - 96DBCB701DCCF59E000FCE30 /* libRCTImage-tvOS.a */, + 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, ); name = Products; sourceTree = ""; @@ -247,7 +298,7 @@ isa = PBXGroup; children = ( 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, - 96DBCB781DCCF59E000FCE30 /* libRCTNetwork-tvOS.a */, + 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, ); name = Products; sourceTree = ""; @@ -281,7 +332,7 @@ isa = PBXGroup; children = ( 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, - 96DBCB7C1DCCF59E000FCE30 /* libRCTSettings-tvOS.a */, + 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, ); name = Products; sourceTree = ""; @@ -290,7 +341,7 @@ isa = PBXGroup; children = ( 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, - 96DBCB851DCCF59E000FCE30 /* libRCTWebSocket-tvOS.a */, + 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, ); name = Products; sourceTree = ""; @@ -313,7 +364,22 @@ isa = PBXGroup; children = ( 146834041AC3E56700842450 /* libReact.a */, - 96DBCB891DCCF59E000FCE30 /* libReact-tvOS.a */, + 3DAD3EA31DF850E9000B6D8A /* libReact.a */, + 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, + 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, + 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, + 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, + 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, + 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, + ); + name = Products; + sourceTree = ""; + }; + 5E91572E1DD0AC6500FF2AA8 /* Products */ = { + isa = PBXGroup; + children = ( + 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, + 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */, ); name = Products; sourceTree = ""; @@ -322,7 +388,7 @@ isa = PBXGroup; children = ( 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, - 96DBCB741DCCF59E000FCE30 /* libRCTLinking-tvOS.a */, + 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, ); name = Products; sourceTree = ""; @@ -330,6 +396,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( + 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, @@ -340,7 +407,7 @@ 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, - 0E0A945FE56B4718BC8E81C1 /* RNOS.xcodeproj */, + BE3EA6176DE14BC89DDD0CFA /* RNOS.xcodeproj */, ); name = Libraries; sourceTree = ""; @@ -349,7 +416,7 @@ isa = PBXGroup; children = ( 832341B51AAA6A8300B99B32 /* libRCTText.a */, - 96DBCB801DCCF59E000FCE30 /* libRCTText-tvOS.a */, + 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, ); name = Products; sourceTree = ""; @@ -375,14 +442,6 @@ name = Products; sourceTree = ""; }; - 9677DC821DCD3D0F00804F62 /* Products */ = { - isa = PBXGroup; - children = ( - 9677DC971DCD3D0F00804F62 /* libRNOS.a */, - ); - name = Products; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -453,6 +512,10 @@ ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; }, + { + ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; + ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + }, { ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; @@ -489,10 +552,6 @@ ProductGroup = 146834001AC3E56700842450 /* Products */; ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; }, - { - ProductGroup = 9677DC821DCD3D0F00804F62 /* Products */; - ProjectRef = 0E0A945FE56B4718BC8E81C1 /* RNOS.xcodeproj */; - }, ); projectRoot = ""; targets = ( @@ -559,74 +618,123 @@ remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { + 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libRCTLinking.a; - remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; + path = "libRCTImage-tvOS.a"; + remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { + 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libRCTText.a; - remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; + path = "libRCTLinking-tvOS.a"; + remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 9677DC971DCD3D0F00804F62 /* libRNOS.a */ = { + 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libRNOS.a; - remoteRef = 9677DC961DCD3D0F00804F62 /* PBXContainerItemProxy */; + path = "libRCTNetwork-tvOS.a"; + remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 96DBCB701DCCF59E000FCE30 /* libRCTImage-tvOS.a */ = { + 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libRCTImage-tvOS.a"; - remoteRef = 96DBCB6F1DCCF59E000FCE30 /* PBXContainerItemProxy */; + path = "libRCTSettings-tvOS.a"; + remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 96DBCB741DCCF59E000FCE30 /* libRCTLinking-tvOS.a */ = { + 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libRCTLinking-tvOS.a"; - remoteRef = 96DBCB731DCCF59E000FCE30 /* PBXContainerItemProxy */; + path = "libRCTText-tvOS.a"; + remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 96DBCB781DCCF59E000FCE30 /* libRCTNetwork-tvOS.a */ = { + 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libRCTNetwork-tvOS.a"; - remoteRef = 96DBCB771DCCF59E000FCE30 /* PBXContainerItemProxy */; + path = "libRCTWebSocket-tvOS.a"; + remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 96DBCB7C1DCCF59E000FCE30 /* libRCTSettings-tvOS.a */ = { + 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libRCTSettings-tvOS.a"; - remoteRef = 96DBCB7B1DCCF59E000FCE30 /* PBXContainerItemProxy */; + path = libReact.a; + remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 96DBCB801DCCF59E000FCE30 /* libRCTText-tvOS.a */ = { + 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libRCTText-tvOS.a"; - remoteRef = 96DBCB7F1DCCF59E000FCE30 /* PBXContainerItemProxy */; + path = libyoga.a; + remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 96DBCB851DCCF59E000FCE30 /* libRCTWebSocket-tvOS.a */ = { + 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libRCTWebSocket-tvOS.a"; - remoteRef = 96DBCB841DCCF59E000FCE30 /* PBXContainerItemProxy */; + path = libyoga.a; + remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTAnimation.a; + remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 96DBCB891DCCF59E000FCE30 /* libReact-tvOS.a */ = { + 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libReact-tvOS.a"; - remoteRef = 96DBCB881DCCF59E000FCE30 /* PBXContainerItemProxy */; + path = "libRCTAnimation-tvOS.a"; + remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTLinking.a; + remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTText.a; + remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ @@ -719,12 +827,12 @@ INFOPLIST_FILE = OsInfoTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OsInfo.app/OsInfo"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", ); - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OsInfo.app/OsInfo"; }; name = Debug; }; @@ -736,12 +844,12 @@ INFOPLIST_FILE = OsInfoTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OsInfo.app/OsInfo"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", ); - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OsInfo.app/OsInfo"; }; name = Release; }; @@ -751,13 +859,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - "$(SRCROOT)/../node_modules/react-native-os/**", - "$(SRCROOT)/../node_modules/react-native-os/ios", - ); INFOPLIST_FILE = OsInfo/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -775,13 +876,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - "$(SRCROOT)/../node_modules/react-native-os/**", - "$(SRCROOT)/../node_modules/react-native-os/ios", - ); INFOPLIST_FILE = OsInfo/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -828,14 +922,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - "$(SRCROOT)/../node_modules/react-native-os/**", - "$(SRCROOT)/../node_modules/react-native-os/**", - "$(SRCROOT)/../node_modules/react-native-os/ios", - ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -871,14 +957,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - "$(SRCROOT)/../node_modules/react-native-os/**", - "$(SRCROOT)/../node_modules/react-native-os/**", - "$(SRCROOT)/../node_modules/react-native-os/ios", - ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; diff --git a/examples/OsInfo/ios/OsInfo.xcodeproj/xcshareddata/xcschemes/OsInfo.xcscheme b/examples/OsInfo/ios/OsInfo.xcodeproj/xcshareddata/xcschemes/OsInfo.xcscheme index 433971d..dbf8252 100644 --- a/examples/OsInfo/ios/OsInfo.xcodeproj/xcshareddata/xcschemes/OsInfo.xcscheme +++ b/examples/OsInfo/ios/OsInfo.xcodeproj/xcshareddata/xcschemes/OsInfo.xcscheme @@ -3,9 +3,23 @@ LastUpgradeVersion = "0620" version = "1.3"> + + + + + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -62,15 +76,18 @@ ReferencedContainer = "container:OsInfo.xcodeproj"> + + @@ -86,10 +103,10 @@ diff --git a/examples/OsInfo/ios/OsInfo/AppDelegate.m b/examples/OsInfo/ios/OsInfo/AppDelegate.m index ca74433..abef3f3 100644 --- a/examples/OsInfo/ios/OsInfo/AppDelegate.m +++ b/examples/OsInfo/ios/OsInfo/AppDelegate.m @@ -9,8 +9,8 @@ #import "AppDelegate.h" -#import "RCTBundleURLProvider.h" -#import "RCTRootView.h" +#import +#import @implementation AppDelegate diff --git a/examples/OsInfo/ios/OsInfoTests/OsInfoTests.m b/examples/OsInfo/ios/OsInfoTests/OsInfoTests.m index 0fce046..ac35497 100644 --- a/examples/OsInfo/ios/OsInfoTests/OsInfoTests.m +++ b/examples/OsInfo/ios/OsInfoTests/OsInfoTests.m @@ -10,8 +10,8 @@ #import #import -#import "RCTLog.h" -#import "RCTRootView.h" +#import +#import #define TIMEOUT_SECONDS 600 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" diff --git a/examples/OsInfo/package.json b/examples/OsInfo/package.json index 24df93f..9b00f71 100644 --- a/examples/OsInfo/package.json +++ b/examples/OsInfo/package.json @@ -1,27 +1,26 @@ { - "name": "OsInfo", - "version": "0.0.1", - "private": true, - "scripts": { - "start": "node node_modules/react-native/local-cli/cli.js start", - "test": "jest" - }, - "browser": { + "name": "OsInfo", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "node node_modules/react-native/local-cli/cli.js start", + "test": "jest" + }, + "browser": { "os": "react-native-os" }, - "dependencies": { - "react": "15.3.2", - "react-native": "0.36.1", - "react-native-os": "../../" - }, - "jest": { - "preset": "jest-react-native" - }, - "devDependencies": { - "babel-jest": "16.0.0", - "babel-preset-react-native": "1.9.0", - "jest": "16.0.2", - "jest-react-native": "16.0.0", - "react-test-renderer": "15.3.2" - } -} + "dependencies": { + "react": "15.4.2", + "react-native": "0.40.0", + "react-native-os": "../../" + }, + "devDependencies": { + "babel-jest": "18.0.0", + "babel-preset-react-native": "1.9.1", + "jest": "18.1.0", + "react-test-renderer": "15.4.2" + }, + "jest": { + "preset": "react-native" + } +} \ No newline at end of file diff --git a/ios/RNOS.h b/ios/RNOS.h index 0454857..2a959b1 100644 --- a/ios/RNOS.h +++ b/ios/RNOS.h @@ -8,9 +8,9 @@ #import #import -#import "RCTBridgeModule.h" -#import "RCTBridge.h" -#import "RCTEventDispatcher.h" +#import +#import +#import @interface RNOS : NSObject diff --git a/ios/RNOS.xcodeproj/project.pbxproj b/ios/RNOS.xcodeproj/project.pbxproj index 6bfbc71..8c4a538 100644 --- a/ios/RNOS.xcodeproj/project.pbxproj +++ b/ios/RNOS.xcodeproj/project.pbxproj @@ -70,7 +70,6 @@ 58B511D71A9E6C8500147676 /* Sources */, 58B511D81A9E6C8500147676 /* Frameworks */, 58B511D91A9E6C8500147676 /* CopyFiles */, - 73D9379C1AFFA3E100450142 /* ShellScript */, ); buildRules = ( ); @@ -112,22 +111,6 @@ }; /* End PBXProject section */ -/* Begin PBXShellScriptBuildPhase section */ - 73D9379C1AFFA3E100450142 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "##########################################\n#\n# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n#\n# Version 2.7\n#\n# Latest Change:\n# - Supports iPhone 5 / iPod Touch 5 (uses Apple's workaround to lipo bug)\n#\n# Purpose:\n# Automatically create a Universal static library for iPhone + iPad + iPhone Simulator from within XCode\n#\n# Author: Adam Martin - http://twitter.com/redglassesapps\n# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER)\n#\n\nset -e\nset -o pipefail\n\n#################[ Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"false\"\n\nif [ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use the following variables when debugging this script; note that they may change on recursions\"\necho \"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROOT = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR = $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR = $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n# (incidental: searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | sed \"s/${PLATFORM_NAME}//\")\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\" ]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho \"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting: ${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[ end of part 1 ]##################\n\n#####################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif [ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation, so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\" -project \\\"${PROJECT_NAME}.xcodeproj\\\" -target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO\" BUILD_DIR=\\\"${BUILD_DIR}\\\" BUILD_ROOT=\\\"${BUILD_ROOT}\\\" SYMROOT=\\\"${SYMROOT}\\\"\n\nxcodebuild -configuration \"${CONFIGURATION}\" -project \"${PROJECT_NAME}.xcodeproj\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" SYMROOT=\"${SYMROOT}\"\n\nACTION=\"build\"\n\n#Merge all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple) built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho \"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from: ${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\n\n# ... remove the products of previous runs of this script\n# NB: this directory is ONLY created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkdir \"${CREATING_UNIVERSAL_DIR}\"\n\n#\necho \"lipo: for current configuration (${CONFIGURATION}) creating output file: ${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\"\nxcrun -sdk iphoneos lipo -create -output \"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n# Added: StackOverflow suggestion to also copy \"include\" files\n# (untested, but should work OK)\n#\necho \"Fetching headers from ${PUBLIC_HEADERS_FOLDER_PATH}\"\necho \" (if you embed your library project in another project, you will need to add\"\necho \" a \"User Search Headers\" build setting of: (NB INCLUDE THE DOUBLE QUOTES BELOW!)\"\necho ' \"$(TARGET_BUILD_DIR)/usr/local/include/\"'\nif [ -d \"${CURRENTCONFIG_DEVICE_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\"\n# * needs to be outside the double quotes?\ncp -r \"${CURRENTCONFIG_DEVICE_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\"* \"${CREATING_UNIVERSAL_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\"\nfi\nfi"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 58B511D71A9E6C8500147676 /* Sources */ = { isa = PBXSourcesBuildPhase; From 9cc32da37d022b917671a798e587092e27e0d17e Mon Sep 17 00:00:00 2001 From: Andy Prock Date: Mon, 16 Jan 2017 11:59:08 -0800 Subject: [PATCH 2/2] update docs for RN < 0.40 + ios --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index be55eb6..7aefa4e 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,14 @@ This module is used by [Peel](http://www.peel.com/) * Create a new react-native project. [Check react-native getting started](http://facebook.github.io/react-native/docs/getting-started.html#content) * In your project dir: + +``` +npm install react-native-os --save +``` + +__Note for iOS:__ If your react-native version < 0.40 install with this tag instead: ``` -npm install --save react-native-os +npm install react-native-os@1.0.3 --save ``` ## Link in the native dependency