Skip to content

Commit b2d02bf

Browse files
authored
Merge pull request #205 from getsentry/feature/user-id-optional
Make userId optional, Bump sentry-cocoa to 3.5.0
2 parents d22992c + c8a9a18 commit b2d02bf

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

SentryReactNative.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Pod::Spec.new do |s|
1818
s.preserve_paths = '*.js'
1919

2020
s.dependency 'React'
21-
s.dependency 'Sentry', '~> 3.4.3'
22-
s.dependency 'Sentry/KSCrash', '~> 3.4.3'
21+
s.dependency 'Sentry', '~> 3.5.0'
22+
s.dependency 'Sentry/KSCrash', '~> 3.5.0'
2323

2424
s.source_files = 'ios/RNSentry*.{h,m}'
2525
s.public_header_files = 'ios/RNSentry.h'

ios/RNSentry.m

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#import <KSCrash/KSCrash.h>
1010
#import <Sentry/Sentry.h>
1111

12-
NSString *const RNSentryVersionString = @"0.18.0";
12+
NSString *const RNSentryVersionString = @"0.17.1";
1313
NSString *const RNSentrySdkName = @"sentry-react-native";
1414

1515
@interface RNSentry()
@@ -379,13 +379,11 @@ - (SentryUser *_Nullable)createUser:(NSDictionary *_Nonnull)user {
379379
} else if (nil != user[@"id"]) {
380380
userId = [NSString stringWithFormat:@"%@", user[@"id"]];
381381
}
382-
SentryUser *sentryUser = nil;
383-
if (nil != userId) {
384-
sentryUser = [[SentryUser alloc] initWithUserId:userId];
385-
sentryUser.email = [NSString stringWithFormat:@"%@", user[@"email"]];
386-
sentryUser.username = [NSString stringWithFormat:@"%@", user[@"username"]];
387-
sentryUser.extra = [RCTConvert NSDictionary:user[@"extra"]];
388-
}
382+
SentryUser *sentryUser = [[SentryUser alloc] init];
383+
sentryUser.userId = userId;
384+
sentryUser.email = [NSString stringWithFormat:@"%@", user[@"email"]];
385+
sentryUser.username = [NSString stringWithFormat:@"%@", user[@"username"]];
386+
sentryUser.extra = [RCTConvert NSDictionary:user[@"extra"]];
389387
return sentryUser;
390388
}
391389

0 commit comments

Comments
 (0)