Skip to content

Commit db9e077

Browse files
refactor(ios): update identifyUser id param
rename identifyUser `id` to `userId`
1 parent 4e9957a commit db9e077

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/default/ios/InstabugTests/InstabugSampleTests.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,19 @@ - (void)testIdentifyUser {
188188
NSString *name = @"this is my name";
189189

190190
OCMStub([mock identifyUserWithEmail:email name:name]);
191-
[self.instabugBridge identifyUser:email name:name id:nil];
191+
[self.instabugBridge identifyUser:email name:name userId:nil];
192192
OCMVerify([mock identifyUserWithID:nil email:email name:name]);
193193
}
194194

195195
- (void)testIdentifyUserWithID {
196196
id mock = OCMClassMock([Instabug class]);
197197
NSString *email = @"[email protected]";
198198
NSString *name = @"this is my name";
199-
NSString *userID = @"this is my id";
199+
NSString *userId = @"this is my id";
200200

201-
OCMStub([mock identifyUserWithID:userID email:email name:name]);
202-
[self.instabugBridge identifyUser:email name:name id:userID];
203-
OCMVerify([mock identifyUserWithID:userID email:email name:name]);
201+
OCMStub([mock identifyUserWithID:userId email:email name:name]);
202+
[self.instabugBridge identifyUser:email name:name userId:userId];
203+
OCMVerify([mock identifyUserWithID:userId email:email name:name]);
204204
}
205205

206206
- (void)testLogOut {

ios/RNInstabug/InstabugReactBridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
- (void)setString:(NSString *)value toKey:(NSString *)key;
5151

52-
- (void)identifyUser:(NSString *)email name:(NSString *)name id:(nullable NSString *)id;
52+
- (void)identifyUser:(NSString *)email name:(NSString *)name userId:(nullable NSString *)id;
5353

5454
- (void)logOut;
5555

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ - (dispatch_queue_t)methodQueue {
191191
[Instabug clearFileAttachments];
192192
}
193193

194-
RCT_EXPORT_METHOD(identifyUser:(NSString *)email name:(NSString *)name id:(nullable NSString *)id) {
195-
[Instabug identifyUserWithID:id email:email name:name];
194+
RCT_EXPORT_METHOD(identifyUser:(NSString *)email name:(NSString *)name userId:(nullable NSString *)userId) {
195+
[Instabug identifyUserWithID:userId email:email name:name];
196196
}
197197

198198
RCT_EXPORT_METHOD(logOut) {

0 commit comments

Comments
 (0)