mixpanel-react-native 1.3.8 → 1.4.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  #
2
2
 
3
+ ## [v1.4.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.4.0) (2022-05-06)
4
+
5
+ ### Enhancements
6
+
7
+ - Bump to latest ios and android sdk versions and remove android people identify\(deprecated\) [\#137](https://github.com/mixpanel/mixpanel-react-native/pull/137)
8
+ - Allow disable flush on background [\#135](https://github.com/mixpanel/mixpanel-react-native/pull/135)
9
+ - Adds a new API `getDeviceId` for React Native [\#134](https://github.com/mixpanel/mixpanel-react-native/pull/134)
10
+
11
+ #
12
+
13
+ ## [v1.3.10](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.10) (2022-03-26)
14
+
15
+ ### Enhancements
16
+
17
+ - upgrade android targetSdkVersion to 30 [\#131](https://github.com/mixpanel/mixpanel-react-native/pull/131)
18
+
19
+ #
20
+
21
+ ## [v1.3.9](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.9) (2022-03-02)
22
+
23
+ **Merged pull requests:**
24
+
25
+ - bump mixpanel-swift to 3.1.5 [\#129](https://github.com/mixpanel/mixpanel-react-native/pull/129)
26
+
27
+ #
28
+
3
29
  ## [v1.3.8](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.8) (2022-02-25)
4
30
 
5
31
  ### Enhancements
@@ -27,17 +53,6 @@
27
53
 
28
54
  ## [v1.3.5](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.5) (2022-01-04)
29
55
 
30
- **Closed issues:**
31
-
32
- - iOS app crashes when `optOutTrackingDefault` is set - `Assertion failed: You have to call initialize\(token:\) before calling the main instance, or define a new main instance if removing the main one` [\#114](https://github.com/mixpanel/mixpanel-react-native/issues/114)
33
- - Cannot get users properties? [\#113](https://github.com/mixpanel/mixpanel-react-native/issues/113)
34
- - Users shows undefined Email of tracked user [\#112](https://github.com/mixpanel/mixpanel-react-native/issues/112)
35
- - FirstAppOpen event not triggered from iOS [\#111](https://github.com/mixpanel/mixpanel-react-native/issues/111)
36
- - Set user properties [\#107](https://github.com/mixpanel/mixpanel-react-native/issues/107)
37
- - Events missing on web dashboard. [\#106](https://github.com/mixpanel/mixpanel-react-native/issues/106)
38
- - Feature Request: functionality to get promise on mixpanel.track\(\) [\#105](https://github.com/mixpanel/mixpanel-react-native/issues/105)
39
- - "TS2554: Expected 1 arguments, but got 0." error when implementing Samples/ContextAPIMixpanel/Analytics.js [\#86](https://github.com/mixpanel/mixpanel-react-native/issues/86)
40
-
41
56
  **Merged pull requests:**
42
57
 
43
58
  - nested dictionary should be a valid type in iOS [\#119](https://github.com/mixpanel/mixpanel-react-native/pull/119)
@@ -49,14 +64,6 @@
49
64
 
50
65
  ## [v1.3.4](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.4) (2021-09-25)
51
66
 
52
- **Closed issues:**
53
-
54
- - ANDROID\_NDK\_HOME error when building Android with version 1.3.3 [\#101](https://github.com/mixpanel/mixpanel-react-native/issues/101)
55
- - \[Android\] Build fails after Maven migration [\#94](https://github.com/mixpanel/mixpanel-react-native/issues/94)
56
- - \[Android\] Mixpanel not working after upgrading React Native to 0.65.0 [\#93](https://github.com/mixpanel/mixpanel-react-native/issues/93)
57
- - Mixpanel.library is always displayed react-native [\#92](https://github.com/mixpanel/mixpanel-react-native/issues/92)
58
- - App Session events don't seem to be logged after v1.2.4 [\#91](https://github.com/mixpanel/mixpanel-react-native/issues/91)
59
-
60
67
  **Merged pull requests:**
61
68
 
62
69
  - Bump native SDK dependencies [\#102](https://github.com/mixpanel/mixpanel-react-native/pull/102)
@@ -70,13 +77,6 @@
70
77
  - Enable automatic events in iOS [\#99](https://github.com/mixpanel/mixpanel-react-native/pull/99)
71
78
  - replace JCenter with Maven [\#95](https://github.com/mixpanel/mixpanel-react-native/pull/95)
72
79
 
73
- **Closed issues:**
74
-
75
- - library not found for -lMixpanelReactNative for iOS [\#96](https://github.com/mixpanel/mixpanel-react-native/issues/96)
76
- - mixpanel.register not supported in react-native library [\#90](https://github.com/mixpanel/mixpanel-react-native/issues/90)
77
- - Mixpanel.addPushDeviceToken ? [\#89](https://github.com/mixpanel/mixpanel-react-native/issues/89)
78
- - Are the types correct on the latest version? [\#83](https://github.com/mixpanel/mixpanel-react-native/issues/83)
79
-
80
80
  **Merged pull requests:**
81
81
 
82
82
  - Bump tmpl from 1.0.4 to 1.0.5 in /Samples/ContextAPIMixpanel [\#100](https://github.com/mixpanel/mixpanel-react-native/pull/100)
@@ -94,15 +94,6 @@
94
94
 
95
95
  - Add constructor method type definition [\#85](https://github.com/mixpanel/mixpanel-react-native/pull/85)
96
96
 
97
- **Closed issues:**
98
-
99
- - Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId [\#75](https://github.com/mixpanel/mixpanel-react-native/issues/75)
100
- - It only track on Android in iOS nothing at all [\#72](https://github.com/mixpanel/mixpanel-react-native/issues/72)
101
- - Mixpanel React Native is null [\#71](https://github.com/mixpanel/mixpanel-react-native/issues/71)
102
- - Are the documented initializations correct? [\#70](https://github.com/mixpanel/mixpanel-react-native/issues/70)
103
- - Getting "MixpanelReactNative is null" on fresh install [\#46](https://github.com/mixpanel/mixpanel-react-native/issues/46)
104
- - Example using ContextAPI and functional components [\#17](https://github.com/mixpanel/mixpanel-react-native/issues/17)
105
-
106
97
  #
107
98
 
108
99
  ## [v1.3.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.1) (2021-07-29)
@@ -111,10 +102,6 @@
111
102
 
112
103
  - Fix the inconsistency typescript definition of init [\#78](https://github.com/mixpanel/mixpanel-react-native/pull/78)
113
104
 
114
- **Closed issues:**
115
-
116
- - confusion re documentation [\#77](https://github.com/mixpanel/mixpanel-react-native/issues/77)
117
-
118
105
  **Merged pull requests:**
119
106
 
120
107
  - Add more sample apps for integrating Mixpanel including using Context API [\#79](https://github.com/mixpanel/mixpanel-react-native/pull/79)
@@ -123,11 +110,6 @@
123
110
 
124
111
  ## [v1.3.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.0) (2021-07-28)
125
112
 
126
- **Closed issues:**
127
-
128
- - Xcode 12.5.1 linking issue [\#68](https://github.com/mixpanel/mixpanel-react-native/issues/68)
129
- - It only track on iOS in Android nothing at all [\#56](https://github.com/mixpanel/mixpanel-react-native/issues/56)
130
-
131
113
  **Merged pull requests:**
132
114
 
133
115
  - Deprecate the class method init\(\) and improve the example [\#76](https://github.com/mixpanel/mixpanel-react-native/pull/76)
@@ -136,12 +118,6 @@
136
118
 
137
119
  ## [v1.2.4](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.4) (2021-06-24)
138
120
 
139
- **Closed issues:**
140
-
141
- - A lot of "undefined symbol" errors happening with the latest version [\#64](https://github.com/mixpanel/mixpanel-react-native/issues/64)
142
- - Tracking and Identifying Oh My! [\#60](https://github.com/mixpanel/mixpanel-react-native/issues/60)
143
- - why is firebase-messaging listed as a dependency? [\#55](https://github.com/mixpanel/mixpanel-react-native/issues/55)
144
-
145
121
  **Merged pull requests:**
146
122
 
147
123
  - Polish README [\#67](https://github.com/mixpanel/mixpanel-react-native/pull/67)
@@ -151,14 +127,55 @@
151
127
  - Add a CHANGELOG placeholder [\#62](https://github.com/mixpanel/mixpanel-react-native/pull/62)
152
128
  - Add github workflow for auto release [\#61](https://github.com/mixpanel/mixpanel-react-native/pull/61)
153
129
 
130
+ #
131
+
132
+ ## [v1.2.3](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.3) (2021-05-20)
154
133
 
134
+ - Bump Mixpanel Andriod dependency to 5.9.1 (Migrate to Airship 12.x for the integration)
135
+ https://github.com/mixpanel/mixpanel-react-native/pull/59
155
136
 
137
+ #
156
138
 
139
+ ## [v1.2.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.2) (2021-05-08)
157
140
 
141
+ - Fix Mixpanel type conversion for ios
142
+ https://github.com/mixpanel/mixpanel-react-native/pull/48
143
+ - Fix iOS compile error
144
+ https://github.com/mixpanel/mixpanel-react-native/pull/53
158
145
 
146
+ #
159
147
 
148
+ ## [v1.2.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.0) (2021-05-03)
160
149
 
150
+ - Add new settings APIs: setUseIpAddressForGeolocation, setLoggingEnabled(add android), setServerURL(add android)
151
+ https://github.com/mixpanel/mixpanel-react-native/pull/44
152
+
153
+ #
154
+
155
+ ## [v1.1.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.1) (2021-03-17)
156
+ - Fix the issue of passing boolean value as int in iOS
157
+ https://github.com/mixpanel/mixpanel-react-native/pull/34
158
+
159
+ #
160
+
161
+ ## [v1.1.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.0) (2021-03-03)
162
+ - Add Typescript support
163
+ - https://github.com/mixpanel/mixpanel-react-native/pull/31. thanks @sroy3 !
164
+
165
+ #
166
+
167
+ ## [v1.0.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.2) (2021-01-27)
168
+ - Fix dynamic type not being able to convert properly in android that causes some group apis to fail
169
+ PR: https://github.com/mixpanel/mixpanel-react-native/pull/23
170
+ This is to address issue: https://github.com/mixpanel/mixpanel-react-native/issues/21
171
+
172
+ #
161
173
 
174
+ ## [v1.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.0) (2020-12-08)
175
+ - This is our first release! :tada::tada::tada:
176
+ Report issues or give us any feedback is appreciated!
177
+ - integration guide: https://developer.mixpanel.com/docs/react-native
178
+ - full API reference: https://mixpanel.github.io/mixpanel-react-native
162
179
 
163
180
 
164
181
 
@@ -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", '3.1.2'
22
+ s.dependency "Mixpanel-swift", '3.2.5'
23
23
  end
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <projectDescription>
3
- <name>android</name>
3
+ <name>SimpleMixpanel</name>
4
4
  <comment>Project android created by Buildship.</comment>
5
5
  <projects>
6
6
  </projects>
@@ -16,7 +16,7 @@
16
16
  </natures>
17
17
  <filteredResources>
18
18
  <filter>
19
- <id>1632526110607</id>
19
+ <id>0</id>
20
20
  <name></name>
21
21
  <type>30</type>
22
22
  <matcher>
@@ -9,13 +9,13 @@ 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.8", "mp_lib": "react-native"});
12
+ expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.4.0", "mp_lib": "react-native"});
13
13
  });
14
14
 
15
15
  test(`it calls MixpanelReactNative initialize with optOut and superProperties`, async () => {
16
16
  const mixpanel = new Mixpanel("token");
17
17
  mixpanel.init(true, {"super": "property"})
18
- expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, {"$lib_version": "1.3.8", "mp_lib": "react-native", "super": "property"});
18
+ expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, {"$lib_version": "1.4.0", "mp_lib": "react-native", "super": "property"});
19
19
  });
20
20
 
21
21
  test(`it calls MixpanelReactNative setServerURL`, async () => {
@@ -20,6 +20,7 @@ jest.doMock('react-native', () => {
20
20
  initialize: jest.fn(),
21
21
  setServerURL: jest.fn(),
22
22
  setLoggingEnabled: jest.fn(),
23
+ setFlushOnBackground: jest.fn(),
23
24
  setUseIpAddressForGeolocation: jest.fn(),
24
25
  hasOptedOutTracking: jest.fn(),
25
26
  optInTracking: jest.fn(),
@@ -11,11 +11,11 @@ buildscript {
11
11
  apply plugin: 'com.android.library'
12
12
 
13
13
  android {
14
- compileSdkVersion 28
15
- buildToolsVersion "28.0.3"
14
+ compileSdkVersion 30
15
+ buildToolsVersion "30.0.3"
16
16
  defaultConfig {
17
17
  minSdkVersion 21
18
- targetSdkVersion 26
18
+ targetSdkVersion 30
19
19
  versionCode 1
20
20
  versionName "1.0"
21
21
  }
@@ -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:6.0.0'
37
+ implementation 'com.mixpanel.android:mixpanel-android:6.2.0'
38
38
  }
@@ -98,7 +98,6 @@ public class MixpanelReactNativeModule extends ReactContextBaseJavaModule {
98
98
  MixpanelAPI instance = MixpanelAPI.getInstance(this.mReactContext, token);
99
99
  synchronized (instance) {
100
100
  instance.identify(distinctId);
101
- instance.getPeople().identify(distinctId);
102
101
  promise.resolve(null);
103
102
  }
104
103
  }
@@ -111,6 +110,14 @@ public class MixpanelReactNativeModule extends ReactContextBaseJavaModule {
111
110
  }
112
111
  }
113
112
 
113
+ @ReactMethod
114
+ public void getDeviceId(final String token, Promise promise) {
115
+ MixpanelAPI instance = MixpanelAPI.getInstance(this.mReactContext, token);
116
+ synchronized (instance) {
117
+ promise.resolve(instance.getAnonymousId());
118
+ }
119
+ }
120
+
114
121
  @ReactMethod
115
122
  public void track(final String token, final String eventName, ReadableMap properties, Promise promise) throws JSONException {
116
123
  MixpanelAPI instance = MixpanelAPI.getInstance(this.mReactContext, token);