diff --git a/README.md b/README.md new file mode 100644 index 00000000..60d51eac --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# RealmJS + +RealmJS contains Realm bindings for integrating with mobile apps built using javascript frameworks such as ReactNative and PhoneGap. + +## ReactNative Setup +- Create a new ReactNative project `react-native init ` and open the generated XCode project. +- Drag `RealmJS.xcodeproj` into the `Libraries` folder in your project. +- In the target for your application, add `libRealmReact.a` in the `Link Binary with Library` build phase. +- Use Realm in your app. + diff --git a/examples/RealmReact/ReactModule/RealmReactModule.h b/ReactNative/RealmReactModule.h similarity index 85% rename from examples/RealmReact/ReactModule/RealmReactModule.h rename to ReactNative/RealmReactModule.h index ce6ba926..909953ab 100644 --- a/examples/RealmReact/ReactModule/RealmReactModule.h +++ b/ReactNative/RealmReactModule.h @@ -9,7 +9,9 @@ #import -#import "../node_modules/react-native/React/Base/RCTBridgeModule.h" +#import "Base/RCTBridgeModule.h" + +@protocol RCTBridgeModule; @interface Realm : NSObject diff --git a/examples/RealmReact/ReactModule/RealmReactModule.m b/ReactNative/RealmReactModule.m similarity index 90% rename from examples/RealmReact/ReactModule/RealmReactModule.m rename to ReactNative/RealmReactModule.m index e1167f72..e313b79b 100644 --- a/examples/RealmReact/ReactModule/RealmReactModule.m +++ b/ReactNative/RealmReactModule.m @@ -9,8 +9,8 @@ #import #import "RealmReactModule.h" -#import "../node_modules/react-native/React/Base/RCTLog.h" -#import "../node_modules/react-native/React/Base/RCTBridge.h" +#import "Base/RCTLog.h" +#import "Base/RCTBridge.h" @import RealmJS; @import JavaScriptCore; diff --git a/RealmJS.xcodeproj/project.pbxproj b/RealmJS.xcodeproj/project.pbxproj index 7f462d4c..6796a8ae 100644 --- a/RealmJS.xcodeproj/project.pbxproj +++ b/RealmJS.xcodeproj/project.pbxproj @@ -39,8 +39,7 @@ 0270BC851B7D020100010E03 /* TestCase.js in Resources */ = {isa = PBXBuildFile; fileRef = 0270BC7E1B7D020100010E03 /* TestCase.js */; }; 0270BC861B7D020100010E03 /* TestObjects.js in Resources */ = {isa = PBXBuildFile; fileRef = 0270BC7F1B7D020100010E03 /* TestObjects.js */; }; 0270BC871B7D023200010E03 /* RealmJS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B58CB11AE99CEC009B348C /* RealmJS.framework */; }; - 02B29A191B7CF7C9008A7E6B /* RealmReact.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 02B29A181B7CF7C9008A7E6B /* RealmReact.h */; }; - 02B29A1B1B7CF7C9008A7E6B /* RealmReact.m in Sources */ = {isa = PBXBuildFile; fileRef = 02B29A1A1B7CF7C9008A7E6B /* RealmReact.m */; }; + 0270BCD11B7D067300010E03 /* RealmReactModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 0270BCD01B7D067300010E03 /* RealmReactModule.m */; }; 02B29A311B7CF86D008A7E6B /* RealmJS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B58CB11AE99CEC009B348C /* RealmJS.framework */; }; 02B58CCE1AE99D4D009B348C /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B58CCD1AE99D4D009B348C /* JavaScriptCore.framework */; }; 02D8D1F71B601984006DB49D /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B58CCD1AE99D4D009B348C /* JavaScriptCore.framework */; }; @@ -70,7 +69,6 @@ dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( - 02B29A191B7CF7C9008A7E6B /* RealmReact.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -111,9 +109,9 @@ 0270BC7D1B7D020100010E03 /* ResultsTests.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = ResultsTests.js; path = tests/ResultsTests.js; sourceTree = SOURCE_ROOT; }; 0270BC7E1B7D020100010E03 /* TestCase.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = TestCase.js; path = tests/TestCase.js; sourceTree = SOURCE_ROOT; }; 0270BC7F1B7D020100010E03 /* TestObjects.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = TestObjects.js; path = tests/TestObjects.js; sourceTree = SOURCE_ROOT; }; + 0270BCCF1B7D067300010E03 /* RealmReactModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RealmReactModule.h; path = ReactNative/RealmReactModule.h; sourceTree = ""; }; + 0270BCD01B7D067300010E03 /* RealmReactModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RealmReactModule.m; path = ReactNative/RealmReactModule.m; sourceTree = ""; }; 02B29A161B7CF7C9008A7E6B /* libRealmReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRealmReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 02B29A181B7CF7C9008A7E6B /* RealmReact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RealmReact.h; sourceTree = ""; }; - 02B29A1A1B7CF7C9008A7E6B /* RealmReact.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RealmReact.m; sourceTree = ""; }; 02B58CB11AE99CEC009B348C /* RealmJS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RealmJS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 02B58CBC1AE99CEC009B348C /* RealmJSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RealmJSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 02B58CCD1AE99D4D009B348C /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; @@ -181,13 +179,13 @@ name = RealmJS; sourceTree = ""; }; - 02B29A171B7CF7C9008A7E6B /* RealmReact */ = { + 0270BCCE1B7D066100010E03 /* ReactNativeModule */ = { isa = PBXGroup; children = ( - 02B29A181B7CF7C9008A7E6B /* RealmReact.h */, - 02B29A1A1B7CF7C9008A7E6B /* RealmReact.m */, + 0270BCCF1B7D067300010E03 /* RealmReactModule.h */, + 0270BCD01B7D067300010E03 /* RealmReactModule.m */, ); - path = RealmReact; + name = ReactNativeModule; sourceTree = ""; }; 02B58CA71AE99CEB009B348C = { @@ -196,7 +194,7 @@ 02B58CCF1AE99D8C009B348C /* Frameworks */, 0270BC3D1B7CFBFD00010E03 /* RealmJS */, 02B58CC01AE99CEC009B348C /* RealmJSTests */, - 02B29A171B7CF7C9008A7E6B /* RealmReact */, + 0270BCCE1B7D066100010E03 /* ReactNativeModule */, 02B58CB21AE99CEC009B348C /* Products */, ); sourceTree = ""; @@ -398,7 +396,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 02B29A1B1B7CF7C9008A7E6B /* RealmReact.m in Sources */, + 0270BCD11B7D067300010E03 /* RealmReactModule.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -452,6 +450,11 @@ "DEBUG=1", "$(inherited)", ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/examples/ReactExample/node_modules/react-native/React/", + ); IPHONEOS_DEPLOYMENT_TARGET = 8.4; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -462,6 +465,11 @@ 02B29A291B7CF7C9008A7E6B /* GCov_Build */ = { isa = XCBuildConfiguration; buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/examples/ReactExample/node_modules/react-native/React/", + ); IPHONEOS_DEPLOYMENT_TARGET = 8.4; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -472,6 +480,11 @@ 02B29A2A1B7CF7C9008A7E6B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/examples/ReactExample/node_modules/react-native/React/", + ); IPHONEOS_DEPLOYMENT_TARGET = 8.4; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/RealmReact/RealmReact.h b/RealmReact/RealmReact.h deleted file mode 100644 index e6a1ff75..00000000 --- a/RealmReact/RealmReact.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// RealmReact.h -// RealmReact -// -// Created by Ari Lazier on 8/13/15. -// Copyright (c) 2015 Realm. All rights reserved. -// - -#import - -@interface RealmReact : NSObject - -@end diff --git a/RealmReact/RealmReact.m b/RealmReact/RealmReact.m deleted file mode 100644 index a6c312b1..00000000 --- a/RealmReact/RealmReact.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// RealmReact.m -// RealmReact -// -// Created by Ari Lazier on 8/13/15. -// Copyright (c) 2015 Realm. All rights reserved. -// - -#import "RealmReact.h" - -@implementation RealmReact - -@end diff --git a/examples/RealmReact/.flowconfig b/examples/ReactExample/.flowconfig similarity index 56% rename from examples/RealmReact/.flowconfig rename to examples/ReactExample/.flowconfig index 1082fb19..b2a76e02 100644 --- a/examples/RealmReact/.flowconfig +++ b/examples/ReactExample/.flowconfig @@ -15,6 +15,12 @@ .*/node_modules/react-tools/src/core/ReactInstanceHandles.js .*/node_modules/react-tools/src/event/EventPropagators.js +# Ignore commoner tests +.*/node_modules/commoner/test/.* + +# See https://github.com/facebook/flow/issues/442 +.*/react-tools/node_modules/commoner/lib/reader.js + # Ignore jest .*/react-native/node_modules/jest-cli/.* @@ -25,3 +31,14 @@ node_modules/react-native/Libraries/react-native/react-native-interface.js [options] module.system=haste + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FixMe + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-3]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-3]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy + +[version] +0.13.1 diff --git a/examples/RealmReact/.gitignore b/examples/ReactExample/.gitignore similarity index 100% rename from examples/RealmReact/.gitignore rename to examples/ReactExample/.gitignore diff --git a/examples/ReactExample/.npmignore b/examples/ReactExample/.npmignore new file mode 100644 index 00000000..c39012e9 --- /dev/null +++ b/examples/ReactExample/.npmignore @@ -0,0 +1,27 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# node.js +# +node_modules/ +npm-debug.log diff --git a/examples/RealmReact/RealmReact.xcodeproj/project.pbxproj b/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj similarity index 86% rename from examples/RealmReact/RealmReact.xcodeproj/project.pbxproj rename to examples/ReactExample/ReactExample.xcodeproj/project.pbxproj index d563f2c2..91b1cca5 100644 --- a/examples/RealmReact/RealmReact.xcodeproj/project.pbxproj +++ b/examples/ReactExample/ReactExample.xcodeproj/project.pbxproj @@ -13,8 +13,8 @@ 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 */; }; - 00E356F31AD99517003FC87E /* RealmReactTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* RealmReactTests.m */; }; - 02F9EE1B1B6AD87D00C807E8 /* libRealm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 02F9EE191B6AD7AC00C807E8 /* libRealm.a */; }; + 00E356F31AD99517003FC87E /* ReactExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactExampleTests.m */; }; + 0270BCD21B7D095C00010E03 /* libRealmReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0270BCB31B7D04D700010E03 /* libRealmReact.a */; }; 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; @@ -67,14 +67,28 @@ containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = RealmReact; + remoteInfo = ReactExample; }; - 02F9EE181B6AD7AC00C807E8 /* PBXContainerItemProxy */ = { + 0270BCAE1B7D04D700010E03 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 02F9EE091B6AD7AC00C807E8 /* RealmReactModule.xcodeproj */; + containerPortal = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RealmReactModule; + 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; }; 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -120,13 +134,13 @@ 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 /* RealmReactTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RealmReactTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356EE1AD99517003FC87E /* ReactExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* RealmReactTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RealmReactTests.m; sourceTree = ""; }; - 02F9EE091B6AD7AC00C807E8 /* RealmReactModule.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RealmReactModule.xcodeproj; path = ReactModule/RealmReactModule.xcodeproj; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* ReactExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactExampleTests.m; sourceTree = ""; }; + 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RealmJS.xcodeproj; path = ../../RealmJS.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 /* RealmReact.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RealmReact.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 = ""; }; 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; @@ -150,7 +164,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 02F9EE1B1B6AD87D00C807E8 /* libRealm.a in Frameworks */, + 0270BCD21B7D095C00010E03 /* libRealmReact.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, @@ -207,13 +221,13 @@ name = Products; sourceTree = ""; }; - 00E356EF1AD99517003FC87E /* RealmReactTests */ = { + 00E356EF1AD99517003FC87E /* ReactExampleTests */ = { isa = PBXGroup; children = ( - 00E356F21AD99517003FC87E /* RealmReactTests.m */, + 00E356F21AD99517003FC87E /* ReactExampleTests.m */, 00E356F01AD99517003FC87E /* Supporting Files */, ); - path = RealmReactTests; + path = ReactExampleTests; sourceTree = ""; }; 00E356F01AD99517003FC87E /* Supporting Files */ = { @@ -224,10 +238,12 @@ name = "Supporting Files"; sourceTree = ""; }; - 02F9EE0A1B6AD7AC00C807E8 /* Products */ = { + 0270BC9F1B7D04D700010E03 /* Products */ = { isa = PBXGroup; children = ( - 02F9EE191B6AD7AC00C807E8 /* libRealm.a */, + 0270BCAF1B7D04D700010E03 /* RealmJS.framework */, + 0270BCB11B7D04D700010E03 /* RealmJSTests.xctest */, + 0270BCB31B7D04D700010E03 /* libRealmReact.a */, ); name = Products; sourceTree = ""; @@ -248,7 +264,7 @@ name = Products; sourceTree = ""; }; - 13B07FAE1A68108700A75B9A /* RealmReact */ = { + 13B07FAE1A68108700A75B9A /* ReactExample */ = { isa = PBXGroup; children = ( 008F07F21AC5B25A0029DE68 /* main.jsbundle */, @@ -259,7 +275,7 @@ 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 13B07FB71A68108700A75B9A /* main.m */, ); - name = RealmReact; + name = ReactExample; sourceTree = ""; }; 146834001AC3E56700842450 /* Products */ = { @@ -282,7 +298,7 @@ isa = PBXGroup; children = ( 146833FF1AC3E56700842450 /* React.xcodeproj */, - 02F9EE091B6AD7AC00C807E8 /* RealmReactModule.xcodeproj */, + 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, @@ -307,9 +323,9 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( - 13B07FAE1A68108700A75B9A /* RealmReact */, + 13B07FAE1A68108700A75B9A /* ReactExample */, 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* RealmReactTests */, + 00E356EF1AD99517003FC87E /* ReactExampleTests */, 83CBBA001A601CBA00E9B192 /* Products */, ); indentWidth = 2; @@ -319,8 +335,8 @@ 83CBBA001A601CBA00E9B192 /* Products */ = { isa = PBXGroup; children = ( - 13B07F961A680F5B00A75B9A /* RealmReact.app */, - 00E356EE1AD99517003FC87E /* RealmReactTests.xctest */, + 13B07F961A680F5B00A75B9A /* ReactExample.app */, + 00E356EE1AD99517003FC87E /* ReactExampleTests.xctest */, ); name = Products; sourceTree = ""; @@ -328,9 +344,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* RealmReactTests */ = { + 00E356ED1AD99517003FC87E /* ReactExampleTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RealmReactTests" */; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactExampleTests" */; buildPhases = ( 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, @@ -341,14 +357,14 @@ dependencies = ( 00E356F51AD99517003FC87E /* PBXTargetDependency */, ); - name = RealmReactTests; - productName = RealmReactTests; - productReference = 00E356EE1AD99517003FC87E /* RealmReactTests.xctest */; + name = ReactExampleTests; + productName = ReactExampleTests; + productReference = 00E356EE1AD99517003FC87E /* ReactExampleTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 13B07F861A680F5B00A75B9A /* RealmReact */ = { + 13B07F861A680F5B00A75B9A /* ReactExample */ = { isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RealmReact" */; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactExample" */; buildPhases = ( 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, @@ -358,9 +374,9 @@ ); dependencies = ( ); - name = RealmReact; + name = ReactExample; productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* RealmReact.app */; + productReference = 13B07F961A680F5B00A75B9A /* ReactExample.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -378,7 +394,7 @@ }; }; }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RealmReact" */; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactExample" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -431,14 +447,14 @@ ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; }, { - ProductGroup = 02F9EE0A1B6AD7AC00C807E8 /* Products */; - ProjectRef = 02F9EE091B6AD7AC00C807E8 /* RealmReactModule.xcodeproj */; + ProductGroup = 0270BC9F1B7D04D700010E03 /* Products */; + ProjectRef = 0270BC9E1B7D04D700010E03 /* RealmJS.xcodeproj */; }, ); projectRoot = ""; targets = ( - 13B07F861A680F5B00A75B9A /* RealmReact */, - 00E356ED1AD99517003FC87E /* RealmReactTests */, + 13B07F861A680F5B00A75B9A /* ReactExample */, + 00E356ED1AD99517003FC87E /* ReactExampleTests */, ); }; /* End PBXProject section */ @@ -479,11 +495,25 @@ remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 02F9EE191B6AD7AC00C807E8 /* libRealm.a */ = { + 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 /* libRealmReact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libRealm.a; - remoteRef = 02F9EE181B6AD7AC00C807E8 /* PBXContainerItemProxy */; + path = libRealmReact.a; + remoteRef = 0270BCB21B7D04D700010E03 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { @@ -548,7 +578,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 00E356F31AD99517003FC87E /* RealmReactTests.m in Sources */, + 00E356F31AD99517003FC87E /* ReactExampleTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -566,7 +596,7 @@ /* Begin PBXTargetDependency section */ 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* RealmReact */; + target = 13B07F861A680F5B00A75B9A /* ReactExample */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -596,11 +626,11 @@ "DEBUG=1", "$(inherited)", ); - INFOPLIST_FILE = RealmReactTests/Info.plist; + INFOPLIST_FILE = ReactExampleTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RealmReact.app/RealmReact"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactExample.app/ReactExample"; }; name = Debug; }; @@ -613,11 +643,11 @@ "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); - INFOPLIST_FILE = RealmReactTests/Info.plist; + INFOPLIST_FILE = ReactExampleTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RealmReact.app/RealmReact"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactExample.app/ReactExample"; }; name = Release; }; @@ -633,7 +663,7 @@ INFOPLIST_FILE = iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = RealmReact; + PRODUCT_NAME = ReactExample; }; name = Debug; }; @@ -649,7 +679,7 @@ INFOPLIST_FILE = iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = RealmReact; + PRODUCT_NAME = ReactExample; }; name = Release; }; @@ -742,7 +772,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RealmReactTests" */ = { + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactExampleTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 00E356F61AD99517003FC87E /* Debug */, @@ -751,7 +781,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RealmReact" */ = { + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactExample" */ = { isa = XCConfigurationList; buildConfigurations = ( 13B07F941A680F5B00A75B9A /* Debug */, @@ -760,7 +790,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RealmReact" */ = { + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactExample" */ = { isa = XCConfigurationList; buildConfigurations = ( 83CBBA201A601CBA00E9B192 /* Debug */, diff --git a/examples/RealmReact/RealmReact.xcodeproj/xcshareddata/xcschemes/RealmReact.xcscheme b/examples/ReactExample/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme similarity index 76% rename from examples/RealmReact/RealmReact.xcodeproj/xcshareddata/xcschemes/RealmReact.xcscheme rename to examples/ReactExample/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme index 941adf04..6d25028d 100644 --- a/examples/RealmReact/RealmReact.xcodeproj/xcshareddata/xcschemes/RealmReact.xcscheme +++ b/examples/ReactExample/ReactExample.xcodeproj/xcshareddata/xcschemes/ReactExample.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "ReactExample.app" + BlueprintName = "ReactExample" + ReferencedContainer = "container:ReactExample.xcodeproj"> + BuildableName = "ReactExampleTests.xctest" + BlueprintName = "ReactExampleTests" + ReferencedContainer = "container:ReactExample.xcodeproj"> @@ -47,9 +47,9 @@ + BuildableName = "ReactExampleTests.xctest" + BlueprintName = "ReactExampleTests" + ReferencedContainer = "container:ReactExample.xcodeproj"> @@ -57,9 +57,9 @@ + BuildableName = "ReactExample.app" + BlueprintName = "ReactExample" + ReferencedContainer = "container:ReactExample.xcodeproj"> @@ -77,9 +77,9 @@ + BuildableName = "ReactExample.app" + BlueprintName = "ReactExample" + ReferencedContainer = "container:ReactExample.xcodeproj"> @@ -96,9 +96,9 @@ + BuildableName = "ReactExample.app" + BlueprintName = "ReactExample" + ReferencedContainer = "container:ReactExample.xcodeproj"> diff --git a/examples/RealmReact/RealmReactTests/Info.plist b/examples/ReactExample/ReactExampleTests/Info.plist similarity index 100% rename from examples/RealmReact/RealmReactTests/Info.plist rename to examples/ReactExample/ReactExampleTests/Info.plist diff --git a/examples/RealmReact/RealmReactTests/RealmReactTests.m b/examples/ReactExample/ReactExampleTests/ReactExampleTests.m similarity index 96% rename from examples/RealmReact/RealmReactTests/RealmReactTests.m rename to examples/ReactExample/ReactExampleTests/ReactExampleTests.m index 08d184a1..f0e4f54f 100644 --- a/examples/RealmReact/RealmReactTests/RealmReactTests.m +++ b/examples/ReactExample/ReactExampleTests/ReactExampleTests.m @@ -17,11 +17,11 @@ #define TIMEOUT_SECONDS 240 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" -@interface RealmReactTests : XCTestCase +@interface ReactExampleTests : XCTestCase @end -@implementation RealmReactTests +@implementation ReactExampleTests - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test diff --git a/examples/RealmReact/iOS/AppDelegate.h b/examples/ReactExample/iOS/AppDelegate.h similarity index 100% rename from examples/RealmReact/iOS/AppDelegate.h rename to examples/ReactExample/iOS/AppDelegate.h diff --git a/examples/RealmReact/iOS/AppDelegate.m b/examples/ReactExample/iOS/AppDelegate.m similarity index 99% rename from examples/RealmReact/iOS/AppDelegate.m rename to examples/ReactExample/iOS/AppDelegate.m index 421b272f..974b861e 100644 --- a/examples/RealmReact/iOS/AppDelegate.m +++ b/examples/ReactExample/iOS/AppDelegate.m @@ -46,7 +46,7 @@ // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"RealmReact" + moduleName:@"ReactExample" launchOptions:launchOptions]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; diff --git a/examples/RealmReact/iOS/Base.lproj/LaunchScreen.xib b/examples/ReactExample/iOS/Base.lproj/LaunchScreen.xib similarity index 93% rename from examples/RealmReact/iOS/Base.lproj/LaunchScreen.xib rename to examples/ReactExample/iOS/Base.lproj/LaunchScreen.xib index 53e5de63..301a982d 100644 --- a/examples/RealmReact/iOS/Base.lproj/LaunchScreen.xib +++ b/examples/ReactExample/iOS/Base.lproj/LaunchScreen.xib @@ -18,7 +18,7 @@ -