diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6e68bc1..8ec8f0f6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,13 +1,15 @@
-x.x.x Release notes (yyyy-MM-dd)
+0.14.2 Release notes (2016-7-11)
=============================================================
### Breaking changes
* Please use `rnpm 1.9.0` or later to link your project. Older versions are no longer supported.
+* ReactNative versions older than v0.14.0 are no longer supported
### Enhancements
+* Support for ReactNative versions v0.28.0+
* Added support for debugging in Visual Studio Code.
### Bugfixes
-* None
+* Fix linker error when building for minimum target version of iOS 7.
0.14.1 Release notes (2016-6-28)
=============================================================
diff --git a/examples/ReactExample/package.json b/examples/ReactExample/package.json
index b1555215..5bc9e31a 100644
--- a/examples/ReactExample/package.json
+++ b/examples/ReactExample/package.json
@@ -6,8 +6,8 @@
"start": "react-native start"
},
"dependencies": {
- "react": "15.1.0",
- "react-native": "^0.27.1",
+ "react": "~15.2.0",
+ "react-native": "^0.29.0",
"realm": "file:../.."
}
}
diff --git a/package.json b/package.json
index 36787f55..64c417ed 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "realm",
"description": "Realm is a mobile database: an alternative to SQLite and key-value stores",
- "version": "0.14.1",
+ "version": "0.14.2",
"license": "Apache-2.0",
"homepage": "https://realm.io",
"keywords": [
diff --git a/react-native/android/src/main/jni/Application.mk b/react-native/android/src/main/jni/Application.mk
index aea47831..4d8ba3c5 100644
--- a/react-native/android/src/main/jni/Application.mk
+++ b/react-native/android/src/main/jni/Application.mk
@@ -12,6 +12,7 @@ APP_CPPFLAGS := -std=c++14
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -DREALM_HAVE_CONFIG
+APP_CPPFLAGS += -fomit-frame-pointer
# Make sure every shared lib includes a .note.gnu.build-id header
APP_LDFLAGS := -Wl,--build-id
diff --git a/react-native/ios/RealmReact/RealmReact.mm b/react-native/ios/RealmReact/RealmReact.mm
index 5c362245..9ffcdd99 100644
--- a/react-native/ios/RealmReact/RealmReact.mm
+++ b/react-native/ios/RealmReact/RealmReact.mm
@@ -42,7 +42,8 @@ using namespace realm::rpc;
#endif
@interface NSObject ()
-- (instancetype)initWithJSContext:(void *)context;
+- (instancetype)initWithJSContext:(JSContext *)context;
+- (instancetype)initWithJSContext:(JSContext *)context onThread:(NSThread *)thread;
- (JSGlobalContextRef)ctx;
@end
@@ -55,17 +56,14 @@ extern "C" JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executo
id rctJSContext = object_getIvar(executor, contextIvar);
if (!rctJSContext && create) {
Class RCTJavaScriptContext = NSClassFromString(@"RCTJavaScriptContext");
- NSMethodSignature *signature = [RCTJavaScriptContext instanceMethodSignatureForSelector:@selector(initWithJSContext:)];
- assert(signature);
-
- // React Native 0.14+ expects a JSContext here, but we also support 0.13.x, which takes a JSGlobalContextRef.
- if (!strcmp([signature getArgumentTypeAtIndex:2], "@")) {
- JSContext *context = [[JSContext alloc] init];
- rctJSContext = [[RCTJavaScriptContext alloc] initWithJSContext:(void *)context];
+ if ([RCTJavaScriptContext instancesRespondToSelector:@selector(initWithJSContext:onThread:)]) {
+ // for RN 0.28.0+
+ rctJSContext = [[RCTJavaScriptContext alloc] initWithJSContext:[JSContext new] onThread:[NSThread currentThread]];
}
else {
- JSGlobalContextRef ctx = JSGlobalContextCreate(NULL);
- rctJSContext = [[RCTJavaScriptContext alloc] initWithJSContext:ctx];
+ // for RN < 0.28.0
+ assert([RCTJavaScriptContext instancesRespondToSelector:@selector(initWithJSContext:)]);
+ rctJSContext = [[RCTJavaScriptContext alloc] initWithJSContext:[JSContext new]];
}
object_setIvar(executor, contextIvar, rctJSContext);
@@ -301,7 +299,7 @@ RCT_REMAP_METHOD(emit, emitEvent:(NSString *)eventName withObject:(id)object) {
// Close all cached Realms from the previous JS thread.
realm::_impl::RealmCoordinator::clear_all_caches();
-
+
JSGlobalContextRef ctx = RealmReactGetJSGlobalContextForExecutor(executor, true);
RJSInitializeInContext(ctx);
}];
diff --git a/src/RealmJS.xcodeproj/project.pbxproj b/src/RealmJS.xcodeproj/project.pbxproj
index 72db89a9..7613a1dc 100644
--- a/src/RealmJS.xcodeproj/project.pbxproj
+++ b/src/RealmJS.xcodeproj/project.pbxproj
@@ -924,7 +924,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.14.1;
+ CURRENT_PROJECT_VERSION = 0.14.2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -985,7 +985,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.14.1;
+ CURRENT_PROJECT_VERSION = 0.14.2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -1059,7 +1059,7 @@
buildSettings = {
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 0.14.1;
+ DYLIB_CURRENT_VERSION = 0.14.2;
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = (
"REALM_PLATFORM_NODE=1",
@@ -1093,7 +1093,7 @@
isa = XCBuildConfiguration;
buildSettings = {
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 0.14.1;
+ DYLIB_CURRENT_VERSION = 0.14.2;
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = (
"REALM_PLATFORM_NODE=1",
diff --git a/tests/react-test-app/android/app/src/main/AndroidManifest.xml b/tests/react-test-app/android/app/src/main/AndroidManifest.xml
index 5b609213..4bfced4c 100644
--- a/tests/react-test-app/android/app/src/main/AndroidManifest.xml
+++ b/tests/react-test-app/android/app/src/main/AndroidManifest.xml
@@ -4,6 +4,7 @@
getPackages() {
- return Arrays.asList(
- new MainReactPackage(),
- new RNFSPackage(),
- new RealmReactPackage()
- );
- }
}
diff --git a/tests/react-test-app/android/app/src/main/java/MainApplication.java b/tests/react-test-app/android/app/src/main/java/MainApplication.java
new file mode 100644
index 00000000..d1760386
--- /dev/null
+++ b/tests/react-test-app/android/app/src/main/java/MainApplication.java
@@ -0,0 +1,40 @@
+package io.realm.react.testapp;
+
+import android.app.Application;
+import android.util.Log;
+
+import com.facebook.react.ReactApplication;
+import com.facebook.react.ReactInstanceManager;
+import com.facebook.react.ReactNativeHost;
+import com.facebook.react.ReactPackage;
+import com.facebook.react.shell.MainReactPackage;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.rnfs.RNFSPackage;
+import io.realm.react.RealmReactPackage;
+
+public class MainApplication extends Application implements ReactApplication {
+
+ private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
+ @Override
+ protected boolean getUseDeveloperSupport() {
+ return BuildConfig.DEBUG;
+ }
+
+ @Override
+ protected List getPackages() {
+ return Arrays.asList(
+ new MainReactPackage(),
+ new RNFSPackage(),
+ new RealmReactPackage()
+ );
+ }
+ };
+
+ @Override
+ public ReactNativeHost getReactNativeHost() {
+ return mReactNativeHost;
+ }
+}
\ No newline at end of file
diff --git a/tests/react-test-app/package.json b/tests/react-test-app/package.json
index 21802055..2ac3847f 100644
--- a/tests/react-test-app/package.json
+++ b/tests/react-test-app/package.json
@@ -6,8 +6,8 @@
"start": "react-native start"
},
"dependencies": {
- "react": "15.1.0",
- "react-native": "^0.27.1",
+ "react": "~15.2.0",
+ "react-native": "^0.29.0",
"react-native-fs": "^1.1.0",
"xmlbuilder": "^4.2.1",
"realm": "file:../..",