From e4866c5560fdae2bcbd3ce8a6c0db6ae063fa820 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Mon, 11 Jan 2016 15:10:42 -0800 Subject: [PATCH 1/4] Update ReactExample Xcode project Added libReact as a target dependency since that seemed to workaround a very weird build issue that would come and go. --- .../xcschemes/GCDWebServers.xcscheme | 2 +- .../xcschemes/RealmJS static.xcscheme | 2 +- .../xcshareddata/xcschemes/RealmJS.xcscheme | 2 +- .../xcshareddata/xcschemes/RealmReact.xcscheme | 2 +- .../ReactExample.xcodeproj/project.pbxproj | 17 +++++++++++++++-- .../xcschemes/ReactExample.xcscheme | 2 +- .../xcschemes/ReactTestApp.xcscheme | 2 +- 7 files changed, 21 insertions(+), 8 deletions(-) diff --git a/RealmJS.xcodeproj/xcshareddata/xcschemes/GCDWebServers.xcscheme b/RealmJS.xcodeproj/xcshareddata/xcschemes/GCDWebServers.xcscheme index 4ab0063f..f8bff39a 100644 --- a/RealmJS.xcodeproj/xcshareddata/xcschemes/GCDWebServers.xcscheme +++ b/RealmJS.xcodeproj/xcshareddata/xcschemes/GCDWebServers.xcscheme @@ -1,6 +1,6 @@ Date: Fri, 15 Jan 2016 01:21:03 -0800 Subject: [PATCH 2/4] Update ReactExample iOS project to latest template It now will bundle the JS so it can be run on device. --- examples/ReactExample/iOS/main.jsbundle | 8 - .../ReactExample.xcodeproj/project.pbxproj | 255 +++++++++--------- .../xcschemes/ReactExample.xcscheme | 0 .../{iOS => ios/ReactExample}/AppDelegate.h | 0 .../{iOS => ios/ReactExample}/AppDelegate.m | 0 .../ReactExample}/Base.lproj/LaunchScreen.xib | 4 +- .../AppIcon.appiconset/Contents.json | 0 .../{iOS => ios/ReactExample}/Info.plist | 0 .../{iOS => ios/ReactExample}/main.m | 0 .../{ => ios}/ReactExampleTests/Info.plist | 2 +- .../ReactExampleTests/ReactExampleTests.m | 0 scripts/test.sh | 2 +- 12 files changed, 135 insertions(+), 136 deletions(-) delete mode 100644 examples/ReactExample/iOS/main.jsbundle rename examples/ReactExample/{ => ios}/ReactExample.xcodeproj/project.pbxproj (86%) rename examples/ReactExample/{ => ios}/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme (100%) rename examples/ReactExample/{iOS => ios/ReactExample}/AppDelegate.h (100%) rename examples/ReactExample/{iOS => ios/ReactExample}/AppDelegate.m (100%) rename examples/ReactExample/{iOS => ios/ReactExample}/Base.lproj/LaunchScreen.xib (94%) rename examples/ReactExample/{iOS => ios/ReactExample}/Images.xcassets/AppIcon.appiconset/Contents.json (100%) rename examples/ReactExample/{iOS => ios/ReactExample}/Info.plist (100%) rename examples/ReactExample/{iOS => ios/ReactExample}/main.m (100%) rename examples/ReactExample/{ => ios}/ReactExampleTests/Info.plist (89%) rename examples/ReactExample/{ => ios}/ReactExampleTests/ReactExampleTests.m (100%) diff --git a/examples/ReactExample/iOS/main.jsbundle b/examples/ReactExample/iOS/main.jsbundle deleted file mode 100644 index b702b30c..00000000 --- a/examples/ReactExample/iOS/main.jsbundle +++ /dev/null @@ -1,8 +0,0 @@ -// Offline JS -// To re-generate the offline bundle, run this from the root of your project: -// -// $ react-native bundle --minify -// -// See http://facebook.github.io/react-native/docs/runningondevice.html for more details. - -throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); diff --git a/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj b/examples/ReactExample/ios/ReactExample.xcodeproj/project.pbxproj similarity index 86% rename from examples/ReactExample/ReactExample.xcodeproj/project.pbxproj rename to examples/ReactExample/ios/ReactExample.xcodeproj/project.pbxproj index a7900d8f..05d27062 100644 --- a/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj +++ b/examples/ReactExample/ios/ReactExample.xcodeproj/project.pbxproj @@ -7,13 +7,11 @@ objects = { /* Begin PBXBuildFile section */ - 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; }; 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; - 0270BCD21B7D095C00010E03 /* RealmReact.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0270BCB31B7D04D700010E03 /* RealmReact.framework */; }; 027798491BBB2F1000C96559 /* ReactExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 027798481BBB2F1000C96559 /* ReactExampleTests.m */; }; 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; @@ -24,7 +22,8 @@ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; - F636F6E11BCDB71A0023F35C /* RealmReact.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0270BCB31B7D04D700010E03 /* RealmReact.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + F6C4656F1C48DBE900E79896 /* RealmReact.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6C465551C48D4C300E79896 /* RealmReact.framework */; }; + F6C465701C48DBF700E79896 /* RealmReact.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F6C465551C48D4C300E79896 /* RealmReact.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,41 +62,6 @@ remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; remoteInfo = RCTVibration; }; - 02002CEC1C20FB4200265A80 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = F63FF2F01C16405C00B3B8E0; - remoteInfo = GCDWebServers; - }; - 02002CEE1C20FB4200265A80 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = F63FF2B11C1241E500B3B8E0; - remoteInfo = "RealmJS static"; - }; - 0270BCAE1B7D04D700010E03 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 02B58CB11AE99CEC009B348C; - remoteInfo = RealmJS; - }; - 0270BCB01B7D04D700010E03 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 02B58CBC1AE99CEC009B348C; - remoteInfo = RealmJSTests; - }; - 0270BCB21B7D04D700010E03 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 02B29A161B7CF7C9008A7E6B; - remoteInfo = RealmReact; - }; 0277984B1BBB2F1000C96559 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; @@ -140,6 +104,41 @@ remoteGlobalIDString = 58B5119B1A9E6C1200147676; remoteInfo = RCTText; }; + F6C4654C1C48D4C300E79896 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F63FF2F01C16405C00B3B8E0; + remoteInfo = GCDWebServers; + }; + F6C4654E1C48D4C300E79896 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F63FF2B11C1241E500B3B8E0; + remoteInfo = "RealmJS static"; + }; + F6C465501C48D4C300E79896 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02B58CB11AE99CEC009B348C; + remoteInfo = RealmJS; + }; + F6C465521C48D4C300E79896 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02B58CBC1AE99CEC009B348C; + remoteInfo = RealmJSTests; + }; + F6C465541C48D4C300E79896 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02B29A161B7CF7C9008A7E6B; + remoteInfo = RealmReact; + }; F6FCFC691C44472800AAE541 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; @@ -156,7 +155,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - F636F6E11BCDB71A0023F35C /* RealmReact.framework in Embed Frameworks */, + F6C465701C48DBF700E79896 /* RealmReact.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -164,28 +163,27 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/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 = ""; }; - 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RealmJS.xcodeproj; path = ../../RealmJS.xcodeproj; 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 = ""; }; + 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RealmJS.xcodeproj; path = ../../../RealmJS.xcodeproj; sourceTree = ""; }; 027798461BBB2F1000C96559 /* ReactExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 027798481BBB2F1000C96559 /* ReactExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactExampleTests.m; sourceTree = ""; }; 0277984A1BBB2F1000C96559 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; 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 /* ReactExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = iOS/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = iOS/AppDelegate.m; sourceTree = ""; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iOS/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/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 = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -200,7 +198,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0270BCD21B7D095C00010E03 /* RealmReact.framework in Frameworks */, + F6C4656F1C48DBE900E79896 /* RealmReact.framework in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, @@ -257,18 +255,6 @@ name = Products; sourceTree = ""; }; - 0270BC9F1B7D04D700010E03 /* Products */ = { - isa = PBXGroup; - children = ( - 02002CED1C20FB4200265A80 /* libGCDWebServers.a */, - 02002CEF1C20FB4200265A80 /* libRealmJS.a */, - 0270BCAF1B7D04D700010E03 /* RealmJS.framework */, - 0270BCB11B7D04D700010E03 /* RealmJSTests.xctest */, - 0270BCB31B7D04D700010E03 /* RealmReact.framework */, - ); - name = Products; - sourceTree = ""; - }; 027798471BBB2F1000C96559 /* ReactExampleTests */ = { isa = PBXGroup; children = ( @@ -297,7 +283,6 @@ 13B07FAE1A68108700A75B9A /* ReactExample */ = { isa = PBXGroup; children = ( - 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB51A68108700A75B9A /* Images.xcassets */, @@ -305,7 +290,7 @@ 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 13B07FB71A68108700A75B9A /* main.m */, ); - name = ReactExample; + path = ReactExample; sourceTree = ""; }; 146834001AC3E56700842450 /* Products */ = { @@ -371,6 +356,18 @@ name = Products; sourceTree = ""; }; + F6C465451C48D4C300E79896 /* Products */ = { + isa = PBXGroup; + children = ( + F6C4654D1C48D4C300E79896 /* libGCDWebServers.a */, + F6C4654F1C48D4C300E79896 /* libRealmJS.a */, + F6C465511C48D4C300E79896 /* RealmJS.framework */, + F6C465531C48D4C300E79896 /* RealmJSTests.xctest */, + F6C465551C48D4C300E79896 /* RealmReact.framework */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -396,10 +393,11 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactExample" */; buildPhases = ( - 02A3C7C11BC4597900B1A7BE /* ShellScript */, + 02A3C7C11BC4597900B1A7BE /* Install Realm Node Module */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, + F6C465131C48706400E79896 /* Bundle React Native code and images */, 02BB0BF31B9A06DC004D6DD2 /* Embed Frameworks */, ); buildRules = ( @@ -480,7 +478,7 @@ ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; }, { - ProductGroup = 0270BC9F1B7D04D700010E03 /* Products */; + ProductGroup = F6C465451C48D4C300E79896 /* Products */; ProjectRef = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; }, ); @@ -528,41 +526,6 @@ remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 02002CED1C20FB4200265A80 /* libGCDWebServers.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libGCDWebServers.a; - remoteRef = 02002CEC1C20FB4200265A80 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 02002CEF1C20FB4200265A80 /* libRealmJS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRealmJS.a; - remoteRef = 02002CEE1C20FB4200265A80 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 0270BCAF1B7D04D700010E03 /* RealmJS.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = RealmJS.framework; - remoteRef = 0270BCAE1B7D04D700010E03 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 0270BCB11B7D04D700010E03 /* RealmJSTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RealmJSTests.xctest; - remoteRef = 0270BCB01B7D04D700010E03 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 0270BCB31B7D04D700010E03 /* RealmReact.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = RealmReact.framework; - remoteRef = 0270BCB21B7D04D700010E03 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -598,6 +561,41 @@ remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + F6C4654D1C48D4C300E79896 /* libGCDWebServers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libGCDWebServers.a; + remoteRef = F6C4654C1C48D4C300E79896 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F6C4654F1C48D4C300E79896 /* libRealmJS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRealmJS.a; + remoteRef = F6C4654E1C48D4C300E79896 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F6C465511C48D4C300E79896 /* RealmJS.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = RealmJS.framework; + remoteRef = F6C465501C48D4C300E79896 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F6C465531C48D4C300E79896 /* RealmJSTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = RealmJSTests.xctest; + remoteRef = F6C465521C48D4C300E79896 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F6C465551C48D4C300E79896 /* RealmReact.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = RealmReact.framework; + remoteRef = F6C465541C48D4C300E79896 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -612,7 +610,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, ); @@ -621,18 +618,33 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 02A3C7C11BC4597900B1A7BE /* ShellScript */ = { + 02A3C7C11BC4597900B1A7BE /* Install Realm Node Module */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Install Realm Node Module"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "rm -rf ./node_modules/realm\n[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nnpm install realm"; + shellScript = "rm -rf ../node_modules/realm\n[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\"\nnpm install realm"; + }; + F6C465131C48706400E79896 /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "../node_modules/react-native/packager/react-native-xcode.sh"; }; /* End PBXShellScriptBuildPhase section */ @@ -676,7 +688,6 @@ 13B07FB21A68108700A75B9A /* Base */, ); name = LaunchScreen.xib; - path = iOS; sourceTree = ""; }; /* End PBXVariantGroup section */ @@ -690,13 +701,11 @@ ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = ReactExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-undefined", dynamic_lookup, ); - PRODUCT_BUNDLE_IDENTIFIER = io.realm.ReactExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactExample.app/ReactExample"; }; @@ -710,13 +719,11 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = ReactExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-undefined", dynamic_lookup, ); - PRODUCT_BUNDLE_IDENTIFIER = io.realm.ReactExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactExample.app/ReactExample"; }; @@ -729,12 +736,11 @@ 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/React/**", ); - INFOPLIST_FILE = iOS/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/ReactExample/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = ReactExample; }; name = Debug; @@ -746,12 +752,11 @@ 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/React/**", ); - INFOPLIST_FILE = iOS/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/ReactExample/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = ReactExample; }; name = Release; @@ -794,11 +799,12 @@ 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/React/**", ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; SDKROOT = iphoneos; }; name = Debug; @@ -834,10 +840,11 @@ 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/React/**", ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; diff --git a/examples/ReactExample/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme b/examples/ReactExample/ios/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme similarity index 100% rename from examples/ReactExample/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme rename to examples/ReactExample/ios/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme diff --git a/examples/ReactExample/iOS/AppDelegate.h b/examples/ReactExample/ios/ReactExample/AppDelegate.h similarity index 100% rename from examples/ReactExample/iOS/AppDelegate.h rename to examples/ReactExample/ios/ReactExample/AppDelegate.h diff --git a/examples/ReactExample/iOS/AppDelegate.m b/examples/ReactExample/ios/ReactExample/AppDelegate.m similarity index 100% rename from examples/ReactExample/iOS/AppDelegate.m rename to examples/ReactExample/ios/ReactExample/AppDelegate.m diff --git a/examples/ReactExample/iOS/Base.lproj/LaunchScreen.xib b/examples/ReactExample/ios/ReactExample/Base.lproj/LaunchScreen.xib similarity index 94% rename from examples/ReactExample/iOS/Base.lproj/LaunchScreen.xib rename to examples/ReactExample/ios/ReactExample/Base.lproj/LaunchScreen.xib index 301a982d..fa327072 100644 --- a/examples/ReactExample/iOS/Base.lproj/LaunchScreen.xib +++ b/examples/ReactExample/ios/ReactExample/Base.lproj/LaunchScreen.xib @@ -1,8 +1,8 @@ - + - + diff --git a/examples/ReactExample/iOS/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/ReactExample/ios/ReactExample/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/ReactExample/iOS/Images.xcassets/AppIcon.appiconset/Contents.json rename to examples/ReactExample/ios/ReactExample/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/ReactExample/iOS/Info.plist b/examples/ReactExample/ios/ReactExample/Info.plist similarity index 100% rename from examples/ReactExample/iOS/Info.plist rename to examples/ReactExample/ios/ReactExample/Info.plist diff --git a/examples/ReactExample/iOS/main.m b/examples/ReactExample/ios/ReactExample/main.m similarity index 100% rename from examples/ReactExample/iOS/main.m rename to examples/ReactExample/ios/ReactExample/main.m diff --git a/examples/ReactExample/ReactExampleTests/Info.plist b/examples/ReactExample/ios/ReactExampleTests/Info.plist similarity index 89% rename from examples/ReactExample/ReactExampleTests/Info.plist rename to examples/ReactExample/ios/ReactExampleTests/Info.plist index 886825cc..ba72822e 100644 --- a/examples/ReactExample/ReactExampleTests/Info.plist +++ b/examples/ReactExample/ios/ReactExampleTests/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/ReactExample/ReactExampleTests/ReactExampleTests.m b/examples/ReactExample/ios/ReactExampleTests/ReactExampleTests.m similarity index 100% rename from examples/ReactExample/ReactExampleTests/ReactExampleTests.m rename to examples/ReactExample/ios/ReactExampleTests/ReactExampleTests.m diff --git a/scripts/test.sh b/scripts/test.sh index 12b86771..d30a4658 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -66,6 +66,7 @@ elif [ "$TARGET" = "react-example" ]; then npm update react-native start_packager + cd ios xcodebuild -scheme ReactExample -configuration "$CONFIGURATION" -sdk iphonesimulator build $DESTINATION popd else @@ -73,4 +74,3 @@ else fi kill_packager - From c488fecbc2e0b6e9a69d77e4226909422511fb37 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Fri, 15 Jan 2016 02:01:45 -0800 Subject: [PATCH 3/4] Update ReactExample to use right JS build For the simulator it will use the packager, but on device it will use the bundled JS build. --- .../ios/ReactExample/AppDelegate.m | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/examples/ReactExample/ios/ReactExample/AppDelegate.m b/examples/ReactExample/ios/ReactExample/AppDelegate.m index adaf8f33..49d8054a 100644 --- a/examples/ReactExample/ios/ReactExample/AppDelegate.m +++ b/examples/ReactExample/ios/ReactExample/AppDelegate.m @@ -12,9 +12,8 @@ { NSURL *jsCodeLocation; +#if TARGET_OS_SIMULATOR /** - * Loading JavaScript code - uncomment the one you want. - * * OPTION 1 * Load from development server. Start the server from the repository root: * @@ -26,19 +25,21 @@ * on the same Wi-Fi network. */ - jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"]; +#if DEBUG + jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; +#else + jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=false"]; +#endif +#else /** * OPTION 2 - * Load from pre-bundled file on disk. To re-generate the static bundle - * from the root of your project directory, run - * - * $ react-native bundle --minify - * - * see http://facebook.github.io/react-native/docs/runningondevice.html + * Load from pre-bundled file on disk. The static bundle is automatically + * generated by "Bundle React Native code and images" build step. */ - // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; + jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"ReactExample" From 92df9bff8c33f5058bdc5dfaf6870423a0ec3856 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Mon, 18 Jan 2016 23:01:14 -0800 Subject: [PATCH 4/4] Update to React Native 0.18.0 official release --- examples/ReactExample/package.json | 2 +- tests/react-test-app/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ReactExample/package.json b/examples/ReactExample/package.json index 311f4d11..956170e8 100644 --- a/examples/ReactExample/package.json +++ b/examples/ReactExample/package.json @@ -6,7 +6,7 @@ "start": "react-native start" }, "dependencies": { - "react-native": "0.16.0", + "react-native": "0.18.0", "realm": "file:../.." } } diff --git a/tests/react-test-app/package.json b/tests/react-test-app/package.json index 4846eb3a..bff9b713 100644 --- a/tests/react-test-app/package.json +++ b/tests/react-test-app/package.json @@ -6,7 +6,7 @@ "start": "react-native start" }, "dependencies": { - "react-native": "0.18.0-rc", + "react-native": "0.18.0", "realm": "file:../..", "realm-tests": "file:../lib" }