From f059d57bf446f7b932480d7636d56ef8a56c9340 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Wed, 17 Feb 2016 13:53:26 -0800 Subject: [PATCH] Add Mixpanel property for JS VM --- react-native/RealmAnalytics.h | 1 + react-native/RealmAnalytics.mm | 2 ++ .../android/src/main/java/io/realm/react/RealmAnalytics.java | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/react-native/RealmAnalytics.h b/react-native/RealmAnalytics.h index 22a2a860..ec796399 100644 --- a/react-native/RealmAnalytics.h +++ b/react-native/RealmAnalytics.h @@ -31,6 +31,7 @@ // // Currently the following information is reported: // - What kind of JavaScript framework is being used (e.g. React Native). +// - What kind of JavaScript VM is being used (e.g. JavaScriptCore or V8). // - What version of Realm is being used, and from which language (obj-c or Swift). // - What version of OS X it's running on (in case Xcode aggressively drops // support for older versions again, we need to know what we need to support). diff --git a/react-native/RealmAnalytics.mm b/react-native/RealmAnalytics.mm index 2494b5c6..f4d91f19 100644 --- a/react-native/RealmAnalytics.mm +++ b/react-native/RealmAnalytics.mm @@ -31,6 +31,7 @@ // // Currently the following information is reported: // - What kind of JavaScript framework is being used (e.g. React Native). +// - What kind of JavaScript VM is being used (e.g. JavaScriptCore or V8). // - What version of Realm is being used, and from which language (obj-c or Swift). // - What version of OS X it's running on (in case Xcode aggressively drops // support for older versions again, we need to know what we need to support). @@ -185,6 +186,7 @@ static NSDictionary *RLMAnalyticsPayload() { @"Binding": @"js", @"Language": @"js", @"Framework": @"react-native", + @"Virtual Machine": @"jsc", @"Realm Version": [[@(RealmReactVersionString) componentsSeparatedByString:@"-"] lastObject] ?: kUnknownString, #if TARGET_OS_MAC @"Target OS Type": @"osx", diff --git a/react-native/android/src/main/java/io/realm/react/RealmAnalytics.java b/react-native/android/src/main/java/io/realm/react/RealmAnalytics.java index 2cdbeb3f..90150b28 100644 --- a/react-native/android/src/main/java/io/realm/react/RealmAnalytics.java +++ b/react-native/android/src/main/java/io/realm/react/RealmAnalytics.java @@ -42,6 +42,7 @@ import java.util.Set; // // Currently the following information is reported: // - What kind of JavaScript framework is being used (e.g. React Native) +// - What kind of JavaScript VM is being used (e.g. JavaScriptCore or V8) // - What version of Realm is being used // - What OS you are running on // - An anonymized MAC address and bundle ID to aggregate the other information on. @@ -63,7 +64,8 @@ public class RealmAnalytics { + " \"Anonymized Bundle ID\": \"%APP_ID%\",\n" + " \"Binding\": \"js\",\n" + " \"Language\": \"js\",\n" - + " \"Framework\": \"react-native\"," + + " \"Framework\": \"react-native\",\n" + + " \"Virtual Machine\": \"jsc\",\n" + " \"Realm Version\": \"%REALM_VERSION%\",\n" + " \"Host OS Type\": \"%OS_TYPE%\",\n" + " \"Host OS Version\": \"%OS_VERSION%\",\n"