Skip to content

Commit 8482ddb

Browse files
committed
v13.0.0
1 parent 513c5ec commit 8482ddb

File tree

6 files changed

+46
-4
lines changed

6 files changed

+46
-4
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ repositories {
5656

5757
dependencies {
5858
implementation "com.facebook.react:react-native:+"
59-
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '12.1.0'
59+
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '13.0.0'
6060

6161

6262
if(rootProject && rootProject.ext) {

android/src/main/java/com/reactnativegleapsdk/GleapsdkModule.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,13 @@ public void run() {
341341

342342
if (userProps != null) {
343343
map.putString("userId", gleapUser.getUserId());
344-
map.putString("phone", userProps.getPhoneNumber());
344+
map.putString("phone", userProps.getPhone());
345345
map.putString("email", userProps.getEmail());
346346
map.putString("name", userProps.getName());
347347
map.putDouble("value", userProps.getValue());
348+
map.putString("plan", userProps.getPlan());
349+
map.putString("companyName", userProps.getCompanyName());
350+
map.putString("companyId", userProps.getCompanyId());
348351
}
349352

350353
promise.resolve(map);
@@ -572,6 +575,15 @@ public void run() {
572575
if (jsonObject.has("value")) {
573576
gleapUserSession.setValue(jsonObject.getDouble("value"));
574577
}
578+
if (jsonObject.has("plan")) {
579+
gleapUserSession.setPlan(jsonObject.getString("plan"));
580+
}
581+
if (jsonObject.has("companyName")) {
582+
gleapUserSession.setCompanyName(jsonObject.getString("companyName"));
583+
}
584+
if (jsonObject.has("companyId")) {
585+
gleapUserSession.setCompanyId(jsonObject.getString("companyId"));
586+
}
575587
if (jsonObject.has("customData")) {
576588
gleapUserSession.setCustomData(jsonObject.getJSONObject("customData"));
577589
}
@@ -630,6 +642,15 @@ public void run() {
630642
if (jsonObject.has("phone")) {
631643
gleapUserSession.setPhoneNumber(jsonObject.getString("phone"));
632644
}
645+
if (jsonObject.has("plan")) {
646+
gleapUserSession.setPlan(jsonObject.getString("plan"));
647+
}
648+
if (jsonObject.has("companyName")) {
649+
gleapUserSession.setCompanyName(jsonObject.getString("companyName"));
650+
}
651+
if (jsonObject.has("companyId")) {
652+
gleapUserSession.setCompanyId(jsonObject.getString("companyId"));
653+
}
633654
if (jsonObject.has("value")) {
634655
gleapUserSession.setValue(jsonObject.getDouble("value"));
635656
}

ios/Gleapsdk.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,15 @@ - (void)stopObserving
428428
if (userProperties != nil && [userProperties objectForKey: @"value"] != nil) {
429429
userProperty.value = [userProperties objectForKey: @"value"];
430430
}
431+
if (userProperties != nil && [userProperties objectForKey: @"plan"] != nil) {
432+
userProperty.plan = [userProperties objectForKey: @"plan"];
433+
}
434+
if (userProperties != nil && [userProperties objectForKey: @"companyName"] != nil) {
435+
userProperty.companyName = [userProperties objectForKey: @"companyName"];
436+
}
437+
if (userProperties != nil && [userProperties objectForKey: @"companyId"] != nil) {
438+
userProperty.companyId = [userProperties objectForKey: @"companyId"];
439+
}
431440
if (userProperties != nil && [userProperties objectForKey: @"customData"] != nil) {
432441
userProperty.customData = [userProperties objectForKey: @"customData"];
433442
}
@@ -451,6 +460,15 @@ - (void)stopObserving
451460
if (userProperties != nil && [userProperties objectForKey: @"value"] != nil) {
452461
userProperty.value = [userProperties objectForKey: @"value"];
453462
}
463+
if (userProperties != nil && [userProperties objectForKey: @"plan"] != nil) {
464+
userProperty.plan = [userProperties objectForKey: @"plan"];
465+
}
466+
if (userProperties != nil && [userProperties objectForKey: @"companyName"] != nil) {
467+
userProperty.companyName = [userProperties objectForKey: @"companyName"];
468+
}
469+
if (userProperties != nil && [userProperties objectForKey: @"companyId"] != nil) {
470+
userProperty.companyId = [userProperties objectForKey: @"companyId"];
471+
}
454472
if (userProperties != nil && [userProperties objectForKey: @"customData"] != nil) {
455473
userProperty.customData = [userProperties objectForKey: @"customData"];
456474
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-gleapsdk",
3-
"version": "12.1.1",
3+
"version": "13.0.0",
44
"description": "Know exactly why and how a bug happened. Get reports with screenshots, live action replays and all of the important metadata every time.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

react-native-gleapsdk.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
1616
s.source_files = "ios/**/*.{h,m,mm}"
1717

1818
s.dependency "React-Core"
19-
s.dependency "Gleap", "12.1.0"
19+
s.dependency "Gleap", "13.0.0"
2020
end

src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export type GleapUserProperty = {
1212
name?: string;
1313
phone?: string;
1414
value?: number;
15+
plan?: string;
16+
companyName?: string;
17+
companyId?: string;
1518
customData?: { [key: string]: string | number };
1619
};
1720

0 commit comments

Comments
 (0)