mixpanel-react-native 1.3.1 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,7 @@ jobs:
73
73
  run: yarn install
74
74
  - name: Setup iOS
75
75
  working-directory: ./Samples/SimpleMixpanel/ios
76
- run: pod install
76
+ run: pod install --repo-update
77
77
  - name: Test iOS
78
78
  working-directory: ./Samples/SimpleMixpanel
79
79
  run: yarn ios
package/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  #
2
2
 
3
+ ## [v1.3.4](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.4) (2021-09-25)
4
+
5
+ **Closed issues:**
6
+
7
+ - ANDROID\_NDK\_HOME error when building Android with version 1.3.3 [\#101](https://github.com/mixpanel/mixpanel-react-native/issues/101)
8
+ - \[Android\] Build fails after Maven migration [\#94](https://github.com/mixpanel/mixpanel-react-native/issues/94)
9
+ - \[Android\] Mixpanel not working after upgrading React Native to 0.65.0 [\#93](https://github.com/mixpanel/mixpanel-react-native/issues/93)
10
+ - Mixpanel.library is always displayed react-native [\#92](https://github.com/mixpanel/mixpanel-react-native/issues/92)
11
+ - App Session events don't seem to be logged after v1.2.4 [\#91](https://github.com/mixpanel/mixpanel-react-native/issues/91)
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Bump native SDK dependencies [\#102](https://github.com/mixpanel/mixpanel-react-native/pull/102)
16
+
17
+ #
18
+
19
+ ## [v1.3.3](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.3) (2021-09-21)
20
+
21
+ ### Fixes
22
+
23
+ - Enable automatic events in iOS [\#99](https://github.com/mixpanel/mixpanel-react-native/pull/99)
24
+ - replace JCenter with Maven [\#95](https://github.com/mixpanel/mixpanel-react-native/pull/95)
25
+
26
+ **Closed issues:**
27
+
28
+ - library not found for -lMixpanelReactNative for iOS [\#96](https://github.com/mixpanel/mixpanel-react-native/issues/96)
29
+ - mixpanel.register not supported in react-native library [\#90](https://github.com/mixpanel/mixpanel-react-native/issues/90)
30
+ - Mixpanel.addPushDeviceToken ? [\#89](https://github.com/mixpanel/mixpanel-react-native/issues/89)
31
+ - Are the types correct on the latest version? [\#83](https://github.com/mixpanel/mixpanel-react-native/issues/83)
32
+
33
+ **Merged pull requests:**
34
+
35
+ - Bump tmpl from 1.0.4 to 1.0.5 in /Samples/ContextAPIMixpanel [\#100](https://github.com/mixpanel/mixpanel-react-native/pull/100)
36
+ - Bump tmpl from 1.0.4 to 1.0.5 [\#98](https://github.com/mixpanel/mixpanel-react-native/pull/98)
37
+ - Bump tmpl from 1.0.4 to 1.0.5 in /Samples/MixpanelDemo [\#97](https://github.com/mixpanel/mixpanel-react-native/pull/97)
38
+ - Bump path-parse from 1.0.6 to 1.0.7 in /Samples/MixpanelDemo [\#87](https://github.com/mixpanel/mixpanel-react-native/pull/87)
39
+ - Bump path-parse from 1.0.6 to 1.0.7 [\#84](https://github.com/mixpanel/mixpanel-react-native/pull/84)
40
+ - Bump react-native from 0.64.0 to 0.64.1 in /Samples/MixpanelDemo [\#80](https://github.com/mixpanel/mixpanel-react-native/pull/80)
41
+
42
+ #
43
+
44
+ ## [v1.3.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.2) (2021-08-23)
45
+
46
+ ### Fixes
47
+
48
+ - Add constructor method type definition [\#85](https://github.com/mixpanel/mixpanel-react-native/pull/85)
49
+
50
+ **Closed issues:**
51
+
52
+ - Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId [\#75](https://github.com/mixpanel/mixpanel-react-native/issues/75)
53
+ - It only track on Android in iOS nothing at all [\#72](https://github.com/mixpanel/mixpanel-react-native/issues/72)
54
+ - Mixpanel React Native is null [\#71](https://github.com/mixpanel/mixpanel-react-native/issues/71)
55
+ - Are the documented initializations correct? [\#70](https://github.com/mixpanel/mixpanel-react-native/issues/70)
56
+ - Getting "MixpanelReactNative is null" on fresh install [\#46](https://github.com/mixpanel/mixpanel-react-native/issues/46)
57
+ - Example using ContextAPI and functional components [\#17](https://github.com/mixpanel/mixpanel-react-native/issues/17)
58
+
59
+ #
60
+
61
+ ## [v1.3.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.1) (2021-07-29)
62
+
63
+ ### Fixes
64
+
65
+ - Fix the inconsistency typescript definition of init [\#78](https://github.com/mixpanel/mixpanel-react-native/pull/78)
66
+
67
+ **Closed issues:**
68
+
69
+ - confusion re documentation [\#77](https://github.com/mixpanel/mixpanel-react-native/issues/77)
70
+
71
+ **Merged pull requests:**
72
+
73
+ - Add more sample apps for integrating Mixpanel including using Context API [\#79](https://github.com/mixpanel/mixpanel-react-native/pull/79)
74
+
75
+ #
76
+
3
77
  ## [v1.3.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.0) (2021-07-28)
4
78
 
5
79
  **Closed issues:**
@@ -34,3 +108,11 @@
34
108
 
35
109
 
36
110
 
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
@@ -19,5 +19,5 @@ Pod::Spec.new do |s|
19
19
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
20
20
 
21
21
  s.dependency "React"
22
- s.dependency "Mixpanel-swift", '2.9.3'
22
+ s.dependency "Mixpanel-swift", '3.0.0'
23
23
  end
package/README.md CHANGED
@@ -45,7 +45,8 @@ npm install mixpanel-react-native
45
45
  pod install
46
46
  ```
47
47
  Please note: You do not need to update your Podfile to add Mixpanel.
48
- 3. For Xcode 12.5+, there is a known compile issue, please refer to this **[workaround](https://github.com/mixpanel/mixpanel-react-native/issues/43#issuecomment-829599732)**.
48
+
49
+ 3. Since Xcode 12.5, there is a known swift compile issue, please refer to this **[workaround](https://github.com/mixpanel/mixpanel-react-native/issues/43#issuecomment-829599732)**. However the compile issue has been resolved in Xcode 13.2.1+, there is no extra step required as long as you upgrade to Xcode 13.2.1+.
49
50
 
50
51
 
51
52
  ### 2. Initialize Mixpanel
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>android_</name>
4
+ <comment>Project android_ created by Buildship.</comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16
+ </natures>
17
+ <filteredResources>
18
+ <filter>
19
+ <id>1632526110612</id>
20
+ <name></name>
21
+ <type>30</type>
22
+ <matcher>
23
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
24
+ <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25
+ </matcher>
26
+ </filter>
27
+ </filteredResources>
28
+ </projectDescription>
@@ -4831,7 +4831,7 @@ mixin-deep@^1.2.0:
4831
4831
  is-extendable "^1.0.1"
4832
4832
 
4833
4833
  "mixpanel-react-native@file:../..":
4834
- version "1.3.1"
4834
+ version "1.3.5"
4835
4835
 
4836
4836
  mkdirp@^0.5.1:
4837
4837
  version "0.5.5"
@@ -6253,9 +6253,9 @@ through2@^2.0.1:
6253
6253
  xtend "~4.0.1"
6254
6254
 
6255
6255
  tmpl@1.0.x:
6256
- version "1.0.4"
6257
- resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
6258
- integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
6256
+ version "1.0.5"
6257
+ resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
6258
+ integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
6259
6259
 
6260
6260
  to-fast-properties@^2.0.0:
6261
6261
  version "2.0.0"
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>android__</name>
4
+ <comment>Project android__ created by Buildship.</comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16
+ </natures>
17
+ <filteredResources>
18
+ <filter>
19
+ <id>1632526110615</id>
20
+ <name></name>
21
+ <type>30</type>
22
+ <matcher>
23
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
24
+ <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25
+ </matcher>
26
+ </filter>
27
+ </filteredResources>
28
+ </projectDescription>
@@ -468,20 +468,10 @@
468
468
  );
469
469
  inputPaths = (
470
470
  "${PODS_ROOT}/Target Support Files/Pods-MixpanelDemo/Pods-MixpanelDemo-resources.sh",
471
- "${PODS_ROOT}/Mixpanel-swift/Sources/MiniNotificationViewController.xib",
472
- "${PODS_ROOT}/Mixpanel-swift/Sources/placeholder-image.png",
473
- "${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~ipad.xib",
474
- "${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphonelandscape.xib",
475
- "${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphoneportrait.xib",
476
471
  "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
477
472
  );
478
473
  name = "[CP] Copy Pods Resources";
479
474
  outputPaths = (
480
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MiniNotificationViewController.nib",
481
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/placeholder-image.png",
482
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~ipad.nib",
483
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphonelandscape.nib",
484
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphoneportrait.nib",
485
475
  "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
486
476
  );
487
477
  runOnlyForDeploymentPostprocessing = 0;
@@ -496,20 +486,10 @@
496
486
  );
497
487
  inputPaths = (
498
488
  "${PODS_ROOT}/Target Support Files/Pods-MixpanelDemo-MixpanelDemoTests/Pods-MixpanelDemo-MixpanelDemoTests-resources.sh",
499
- "${PODS_ROOT}/Mixpanel-swift/Sources/MiniNotificationViewController.xib",
500
- "${PODS_ROOT}/Mixpanel-swift/Sources/placeholder-image.png",
501
- "${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~ipad.xib",
502
- "${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphonelandscape.xib",
503
- "${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphoneportrait.xib",
504
489
  "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
505
490
  );
506
491
  name = "[CP] Copy Pods Resources";
507
492
  outputPaths = (
508
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MiniNotificationViewController.nib",
509
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/placeholder-image.png",
510
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~ipad.nib",
511
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphonelandscape.nib",
512
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphoneportrait.nib",
513
493
  "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
514
494
  );
515
495
  runOnlyForDeploymentPostprocessing = 0;
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "mixpanel-react-native": "file:../..",
14
14
  "react": "17.0.1",
15
- "react-native": "0.64.0",
15
+ "react-native": "0.64.1",
16
16
  "react-native-gesture-handler": "^1.8.0",
17
17
  "react-native-interactable": "^2.0.1",
18
18
  "react-native-ionicons": "^4.6.5",
@@ -4734,7 +4734,7 @@ mixin-deep@^1.2.0:
4734
4734
  is-extendable "^1.0.1"
4735
4735
 
4736
4736
  "mixpanel-react-native@file:../..":
4737
- version "1.3.1"
4737
+ version "1.3.5"
4738
4738
 
4739
4739
  mkdirp@^0.5.1:
4740
4740
  version "0.5.5"
@@ -5174,9 +5174,9 @@ path-key@^3.0.0, path-key@^3.1.0:
5174
5174
  integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
5175
5175
 
5176
5176
  path-parse@^1.0.6:
5177
- version "1.0.6"
5178
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
5179
- integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
5177
+ version "1.0.7"
5178
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
5179
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
5180
5180
 
5181
5181
  path-to-regexp@^1.8.0:
5182
5182
  version "1.8.0"
@@ -5434,10 +5434,10 @@ react-native-screens@^2.13.0:
5434
5434
  resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.18.1.tgz#47b9991c6f762d00d0ed3233e5283d523e859885"
5435
5435
  integrity sha512-r5WZLpmx2hHjC1RgMdPq5YpSU9tEhBpUaZ5M1SUtNIONyiLqQVxabhRCINdebIk4depJiIl7yw2Q85zJyeX6fw==
5436
5436
 
5437
- react-native@0.64.0:
5438
- version "0.64.0"
5439
- resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.0.tgz#c3bde5b638bf8bcf12bae6e094930d39cb942ab7"
5440
- integrity sha512-8dhSHBthgGwAjU+OjqUEA49229ThPMQH7URH0u8L0xoQFCnZO2sZ9Wc6KcbxI0x9KSmjCMFFZqRe3w3QsRv64g==
5437
+ react-native@0.64.1:
5438
+ version "0.64.1"
5439
+ resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.1.tgz#cd38f5b47b085549686f34eb0c9dcd466f307635"
5440
+ integrity sha512-jvSj+hNAfwvhaSmxd5KHJ5HidtG0pDXzoH6DaqNpU74g3CmAiA8vuk58B5yx/DYuffGq6PeMniAcwuh3Xp4biQ==
5441
5441
  dependencies:
5442
5442
  "@jest/create-cache-key-function" "^26.5.0"
5443
5443
  "@react-native-community/cli" "^5.0.1-alpha.0"
@@ -6401,9 +6401,9 @@ through2@^2.0.1:
6401
6401
  xtend "~4.0.1"
6402
6402
 
6403
6403
  tmpl@1.0.x:
6404
- version "1.0.4"
6405
- resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
6406
- integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
6404
+ version "1.0.5"
6405
+ resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
6406
+ integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
6407
6407
 
6408
6408
  to-fast-properties@^2.0.0:
6409
6409
  version "2.0.0"
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
2
2
  import { Button, SafeAreaView } from "react-native";
3
3
  import { Mixpanel } from 'mixpanel-react-native';
4
4
 
5
- const mixpanel = new Mixpanel("Your Project Token");
5
+ const mixpanel = new Mixpanel("5d9d3df08d1c34a272abf23d892820bf");
6
6
  mixpanel.init();
7
7
 
8
8
  // *************************************
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>android</name>
4
+ <comment>Project android created by Buildship.</comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16
+ </natures>
17
+ <filteredResources>
18
+ <filter>
19
+ <id>1632526110607</id>
20
+ <name></name>
21
+ <type>30</type>
22
+ <matcher>
23
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
24
+ <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25
+ </matcher>
26
+ </filter>
27
+ </filteredResources>
28
+ </projectDescription>
@@ -4831,7 +4831,7 @@ mixin-deep@^1.2.0:
4831
4831
  is-extendable "^1.0.1"
4832
4832
 
4833
4833
  "mixpanel-react-native@file:../..":
4834
- version "1.3.1"
4834
+ version "1.3.5"
4835
4835
 
4836
4836
  mkdirp@^0.5.1:
4837
4837
  version "0.5.5"
@@ -9,7 +9,7 @@ import { NativeModules } from 'react-native';
9
9
 
10
10
  test(`it calls MixpanelReactNative initialize`, async () => {
11
11
  const mixpanel = await Mixpanel.init("token");
12
- expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.3.1", "mp_lib": "react-native"});
12
+ expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.3.5", "mp_lib": "react-native"});
13
13
  });
14
14
 
15
15
  test(`it calls MixpanelReactNative setServerURL`, async () => {
@@ -1,6 +1,6 @@
1
1
  buildscript {
2
2
  repositories {
3
- jcenter()
3
+ mavenCentral()
4
4
  google()
5
5
  }
6
6
  dependencies {
@@ -25,7 +25,7 @@ android {
25
25
  }
26
26
 
27
27
  repositories {
28
- jcenter()
28
+ mavenCentral()
29
29
  maven {
30
30
  url 'https://maven.google.com/'
31
31
  name 'Google'
@@ -34,5 +34,5 @@ repositories {
34
34
 
35
35
  dependencies {
36
36
  implementation 'com.facebook.react:react-native:+'
37
- implementation 'com.mixpanel.android:mixpanel-android:5.9.1'
37
+ implementation 'com.mixpanel.android:mixpanel-android:6.0.0'
38
38
  }
@@ -4014,7 +4014,7 @@ To clear all superProperties, use clearSuperProperties()
4014
4014
  <br class="clear">
4015
4015
 
4016
4016
  <footer>
4017
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jul 29 2021 15:44:03 GMT-0700 (Pacific Daylight Time)
4017
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Jan 03 2022 19:43:40 GMT-0800 (Pacific Standard Time)
4018
4018
  </footer>
4019
4019
 
4020
4020
  <script> prettyPrint(); </script>
@@ -957,7 +957,7 @@ If the property exists and is not list-valued, the union will be ignored.
957
957
  <br class="clear">
958
958
 
959
959
  <footer>
960
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jul 29 2021 15:44:03 GMT-0700 (Pacific Daylight Time)
960
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Jan 03 2022 19:43:40 GMT-0800 (Pacific Standard Time)
961
961
  </footer>
962
962
 
963
963
  <script> prettyPrint(); </script>
package/docs/People.html CHANGED
@@ -1625,7 +1625,7 @@ If the property exists and is not list-valued, the union will be ignored.
1625
1625
  <br class="clear">
1626
1626
 
1627
1627
  <footer>
1628
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jul 29 2021 15:44:03 GMT-0700 (Pacific Daylight Time)
1628
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Jan 03 2022 19:43:40 GMT-0800 (Pacific Standard Time)
1629
1629
  </footer>
1630
1630
 
1631
1631
  <script> prettyPrint(); </script>
package/docs/index.html CHANGED
@@ -88,8 +88,10 @@ We'd also love for you to come and work with us! Check out <strong><a href="http
88
88
  </ol>
89
89
  <pre class="prettyprint source"><code>pod install
90
90
  </code></pre>
91
- <p>Please note: You do not need to update your Podfile to add Mixpanel.
92
- 3. For Xcode 12.5+, there is a known compile issue, please refer to this <strong><a href="https://github.com/mixpanel/mixpanel-react-native/issues/43#issuecomment-829599732">workaround</a></strong>.</p>
91
+ <p>Please note: You do not need to update your Podfile to add Mixpanel.</p>
92
+ <ol start="3">
93
+ <li>Since Xcode 12.5, there is a known swift compile issue, please refer to this <strong><a href="https://github.com/mixpanel/mixpanel-react-native/issues/43#issuecomment-829599732">workaround</a></strong>. However the compile issue has been resolved in Xcode 13.2.1+, there is no extra step required as long as you upgrade to Xcode 13.2.1+.</li>
94
+ </ol>
93
95
  <h3>2. Initialize Mixpanel</h3>
94
96
  <p>To start tracking with the library you must first initialize with your project token. You can get your project token from <a href="https://mixpanel.com/settings/project">project settings</a>.</p>
95
97
  <pre class="prettyprint source lang-js"><code>import { Mixpanel } from 'mixpanel-react-native';
@@ -173,7 +175,7 @@ Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-detai
173
175
  <br class="clear">
174
176
 
175
177
  <footer>
176
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jul 29 2021 15:44:03 GMT-0700 (Pacific Daylight Time)
178
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Jan 03 2022 19:43:40 GMT-0800 (Pacific Standard Time)
177
179
  </footer>
178
180
 
179
181
  <script> prettyPrint(); </script>
@@ -888,7 +888,7 @@ class ObjectHelper {
888
888
  <br class="clear">
889
889
 
890
890
  <footer>
891
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jul 29 2021 15:44:03 GMT-0700 (Pacific Daylight Time)
891
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Jan 03 2022 19:43:40 GMT-0800 (Pacific Standard Time)
892
892
  </footer>
893
893
 
894
894
  <script> prettyPrint(); </script>
package/index.d.ts CHANGED
@@ -2,6 +2,7 @@ type MixpanelType = any;
2
2
  type MixpanelProperties = { [key: string]: MixpanelType };
3
3
 
4
4
  export class Mixpanel {
5
+ constructor(token: string);
5
6
  static init(token: string, optOutTrackingDefault?: boolean): Promise<Mixpanel>;
6
7
  init(optOutTrackingDefault?: boolean): Promise<void>;
7
8
  setServerURL(serverURL: string): void;
@@ -33,6 +34,7 @@ export class Mixpanel {
33
34
  }
34
35
 
35
36
  export class People {
37
+ constructor(token: string);
36
38
  set(prop: string, to: MixpanelType): void;
37
39
  setOnce(prop: string, to: MixpanelType): void;
38
40
  increment(prop: string, by: number): void;
@@ -46,6 +48,7 @@ export class People {
46
48
  }
47
49
 
48
50
  export class MixpanelGroup {
51
+ constructor(token: string, groupKey: string, groupID: MixpanelType);
49
52
  set(prop: string, to: MixpanelType): void;
50
53
  setOnce(prop: string, to: MixpanelType): void;
51
54
  unset(prop: string): void;
@@ -1,4 +1,3 @@
1
1
  struct Constants {
2
2
  static let DEFAULT_FLUSH_INTERVAL = 60.0
3
- static let AUTOMATIC_PUSH_TRACKING = false
4
3
  }
@@ -1,5 +1 @@
1
- #if __has_include("RCTBridgeModule.h")
2
- #import "RCTBridgeModule.h"
3
- #else
4
1
  #import <React/RCTBridgeModule.h>
5
- #endif
@@ -18,9 +18,9 @@ open class MixpanelReactNative: NSObject {
18
18
  resolver resolve: RCTPromiseResolveBlock,
19
19
  rejecter reject: RCTPromiseRejectBlock) -> Void {
20
20
  AutomaticProperties.setAutomaticProperties(properties)
21
- Mixpanel.initialize(token: token, launchOptions: nil, flushInterval: Constants.DEFAULT_FLUSH_INTERVAL, instanceName: token, automaticPushTracking: Constants.AUTOMATIC_PUSH_TRACKING, optOutTrackingByDefault: optOutTrackingByDefault)
21
+ Mixpanel.initialize(token: token, flushInterval: Constants.DEFAULT_FLUSH_INTERVAL, instanceName: token, optOutTrackingByDefault: optOutTrackingByDefault)
22
22
  let instance = MixpanelReactNative.getMixpanelInstance(token)
23
- instance?.trackAutomaticEventsEnabled = false
23
+ instance?.flushInterval = Constants.DEFAULT_FLUSH_INTERVAL
24
24
  resolve(true)
25
25
  }
26
26
 
@@ -312,7 +312,11 @@ open class MixpanelReactNative: NSObject {
312
312
  resolver resolve: RCTPromiseResolveBlock,
313
313
  rejecter reject: RCTPromiseRejectBlock) -> Void {
314
314
  let instance = MixpanelReactNative.getMixpanelInstance(token)
315
- instance?.setGroup(groupKey: groupKey, groupID: MixpanelTypeHandler.mixpanelTypeValue(groupID)!)
315
+ if groupID is Array<Any> {
316
+ instance?.setGroup(groupKey: groupKey, groupIDs:MixpanelTypeHandler.mixpanelTypeValue(groupID)! as! [MixpanelType])
317
+ } else {
318
+ instance?.setGroup(groupKey: groupKey, groupID:MixpanelTypeHandler.mixpanelTypeValue(groupID)!)
319
+ }
316
320
  resolve(nil)
317
321
  }
318
322
 
@@ -47,7 +47,7 @@
47
47
  return value.map { mixpanelTypeValue($0) }
48
48
 
49
49
  case let value as [String: Any]:
50
- return value
50
+ return value.mapValues { mixpanelTypeValue($0) }
51
51
 
52
52
  case let value as MixpanelType:
53
53
  return value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixpanel-react-native",
3
- "version": "1.3.1",
3
+ "version": "1.3.5",
4
4
  "description": "Official React Native Tracking Library for Mixpanel Analytics",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,30 +31,31 @@
31
31
  "mp_lib": "react-native"
32
32
  },
33
33
  "devDependencies": {
34
- "@babel/core": "^7.12.3",
35
- "@babel/runtime": "^7.12.1",
36
- "@react-native-community/eslint-config": "^2.0.0",
37
- "babel-jest": "^26.6.0",
38
- "eslint": "^7.11.0",
39
- "jest": "^26.6.0",
40
- "metro-react-native-babel-preset": "^0.63.0",
41
- "react-test-renderer": "16.13.1",
42
- "react-native": "^0.63.3"
34
+ "@babel/core": "^7.12.3",
35
+ "@babel/runtime": "^7.12.1",
36
+ "@react-native-community/eslint-config": "^2.0.0",
37
+ "babel-jest": "^26.6.0",
38
+ "eslint": "^7.11.0",
39
+ "jest": "^26.6.0",
40
+ "metro-react-native-babel-preset": "^0.63.0",
41
+ "react-native": "^0.63.3",
42
+ "react-native-clean-project": "^3.6.7",
43
+ "react-test-renderer": "16.13.1"
43
44
  },
44
45
  "jest": {
45
- "modulePathIgnorePatterns": [
46
- "<rootDir>/MixpanelDemo/"
47
- ],
48
- "testMatch": [
49
- "<rootDir>/__tests__/index.test.js"
50
- ],
51
- "setupFiles": [
52
- "<rootDir>/__tests__/jest_setup.js"
53
- ],
54
- "verbose": true,
55
- "preset": "react-native",
56
- "transform": {
57
- "^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
58
- }
46
+ "modulePathIgnorePatterns": [
47
+ "<rootDir>/MixpanelDemo/"
48
+ ],
49
+ "testMatch": [
50
+ "<rootDir>/__tests__/index.test.js"
51
+ ],
52
+ "setupFiles": [
53
+ "<rootDir>/__tests__/jest_setup.js"
54
+ ],
55
+ "verbose": true,
56
+ "preset": "react-native",
57
+ "transform": {
58
+ "^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
59
+ }
59
60
  }
60
61
  }
package/release.py CHANGED
@@ -11,9 +11,9 @@ args = parser.parse_args()
11
11
  def bump_version():
12
12
  replace_version('package.json', "\"version\": \"" + args.old + "\"", "\"version\": \"" + args.new + "\"")
13
13
  replace_version('__tests__/index.test.js', "\"$lib_version\": \"" + args.old + "\"", "\"$lib_version\": \"" + args.new + "\"")
14
- subprocess.call('cd Samples/MixpanelDemo;yarn upgrade mixpanel-react-native --latest', shell=True)
15
- subprocess.call('cd Samples/SimpleMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
16
- subprocess.call('cd Samples/ContextAPIMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
14
+ # subprocess.call('cd Samples/MixpanelDemo;yarn upgrade mixpanel-react-native --latest', shell=True)
15
+ # subprocess.call('cd Samples/SimpleMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
16
+ # subprocess.call('cd Samples/ContextAPIMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
17
17
  subprocess.call('git add package.json', shell=True)
18
18
  subprocess.call('git add __tests__/index.test.js', shell=True)
19
19
  subprocess.call('git add Samples/MixpanelDemo/yarn.lock', shell=True)