Skip to content

Commit

Permalink
Fix clearSessionExtras typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey70 committed Feb 10, 2024
1 parent ad1a9f6 commit 1b934f2
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions AppMetricaCore/Sources/AMAAppMetrica.m
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ + (void)setSessionExtras:(nullable NSData *)data forKey:(NSString *)key
[[self sharedImpl] setSessionExtras:data forKey:key];
}

+ (void)clearSessionExtra
+ (void)clearSessionExtras
{
[[self sharedImpl] clearSessionExtra];
[[self sharedImpl] clearSessionExtras];
}

+ (BOOL)isAPIKeyValid:(NSString *)apiKey
Expand Down
2 changes: 1 addition & 1 deletion AppMetricaCore/Sources/AMAAppMetricaImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)clearAppEnvironment;

- (void)setSessionExtras:(nullable NSData *)data forKey:(NSString *)key;
- (void)clearSessionExtra;
- (void)clearSessionExtras;

- (void)setErrorEnvironmentValue:(NSString *)value forKey:(NSString *)key;
- (void)requestStartupIdentifiersWithCompletionQueue:(dispatch_queue_t)queue
Expand Down
4 changes: 2 additions & 2 deletions AppMetricaCore/Sources/AMAAppMetricaImpl.m
Original file line number Diff line number Diff line change
Expand Up @@ -1051,14 +1051,14 @@ - (void)setSessionExtras:(nullable NSData *)data forKey:(nonnull NSString *)key
}];
}

- (void)clearSessionExtra
- (void)clearSessionExtras
{
[self execute:^{
if (self.reporter == nil) {
AMALogAssert(@"reporter should be not null");
}

[self.reporter clearSessionExtra];
[self.reporter clearSessionExtras];
}];
}

Expand Down
2 changes: 1 addition & 1 deletion AppMetricaCore/Sources/Reporter/AMAReporter.m
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ - (void)setSessionExtras:(nullable NSData *)data forKey:(nonnull NSString *)key
}];
}

- (void)clearSessionExtra
- (void)clearSessionExtras
{
[self execute:^{
[self.reporterStorage.stateStorage.extrasContainer clearExtras];
Expand Down
6 changes: 3 additions & 3 deletions AppMetricaCore/Tests/AMAAppMetricaImplTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -927,15 +927,15 @@ @interface AMAAppMetricaImpl () <AMAExtendedStartupObservingDelegate>
[appMetricaImpl setSessionExtras:data forKey:key];
});
it(@"Should dispatch clear session extras", ^{
[[reporterTestHelper.appReporter should] receive:@selector(clearSessionExtra)];
[[reporterTestHelper.appReporter should] receive:@selector(clearSessionExtras)];

[appMetricaImpl activateWithConfiguration:configuration];
[appMetricaImpl clearSessionExtra];
[appMetricaImpl clearSessionExtras];
});

it(@"Should assert on clear session extras if reporter is nil", ^{
[[theBlock(^{
[appMetricaImpl clearSessionExtra];
[appMetricaImpl clearSessionExtras];
}) should] raise];
});
});
Expand Down
4 changes: 2 additions & 2 deletions AppMetricaCore/Tests/AMAAppMetricaTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1233,9 +1233,9 @@ @interface AMAAppMetricaImpl () <AMAStartupControllerDelegate>
});

it(@"Should clear session extras", ^{
[[mockedImpl should] receive:@selector(clearSessionExtra)];
[[mockedImpl should] receive:@selector(clearSessionExtras)];

[AMAAppMetrica clearSessionExtra];
[AMAAppMetrica clearSessionExtras];
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion AppMetricaCore/Tests/AMAReporterTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ @interface AMAReporterStorage (Test)
it(@"Should clear session extras if reporter is not nil", ^{
[[extrasContainer should] receive:@selector(clearExtras)];

[reporter clearSessionExtra];
[reporter clearSessionExtras];
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
// Session Management
+ (void)setSessionExtras:(nullable NSData *)data
forKey:(NSString *)key NS_SWIFT_NAME(setSessionExtra(value:for:));
+ (void)clearSessionExtra;
+ (void)clearSessionExtras;

// Logging Configuration
+ (AMALogConfigurator *)sharedLogConfigurator;
Expand All @@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_NAME(extendedReporter(for:));

/** Reports an event of a specified type to the server. This method is intended for reporting string data.

@param eventType The type of the event. See AMAEventTypes.h file for reserved event types.
@param name The name of the event, can be nil.
@param value The string value of the event, can be nil.
Expand All @@ -60,7 +60,7 @@ NS_SWIFT_NAME(extendedReporter(for:));
onFailure:(nullable void (^)(NSError *error))onFailure;

/** Reports a binary event of a specified type to the server. This method is intended for reporting binary data.

@param eventType The type of the event. See AMAEventTypes.h file for reserved event types.
@param data The data of the event, cannot be nil.
@param name The name of the event, can be nil.
Expand All @@ -82,7 +82,7 @@ NS_SWIFT_NAME(extendedReporter(for:));
onFailure:(nullable void (^)(NSError *error))onFailure;

/** Reports a file event of a specified type to the server. This method is intended for reporting file data.

@param eventType The type of the event. See AMAEventTypes.h file for reserved event types.
@param data The data of the event, cannot be nil.
@param fileName The name of file, cannot be nil.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ NS_SWIFT_NAME(AppMetricaExtendedReporting)
- (void)setSessionExtras:(nullable NSData *)data
forKey:(NSString *)key NS_SWIFT_NAME(setSessionExtra(value:for:));

- (void)clearSessionExtra;
- (void)clearSessionExtras;

/** Reports an event of a specified type to the server. This method is intended for reporting string data.

@param eventType The type of the event. See AMAEventTypes.h file for reserved event types.
@param name The name of the event, can be nil.
@param value The string value of the event, can be nil.
Expand All @@ -31,7 +31,7 @@ NS_SWIFT_NAME(AppMetricaExtendedReporting)
onFailure:(nullable void (^)(NSError *error))onFailure;

/** Reports a binary event of a specified type to the server. This method is intended for reporting binary data.

@param eventType The type of the event. See AMAEventTypes.h file for reserved event types.
@param data The data of the event, cannot be nil.
@param name The name of the event, can be nil.
Expand All @@ -53,7 +53,7 @@ NS_SWIFT_NAME(AppMetricaExtendedReporting)
onFailure:(nullable void (^)(NSError *error))onFailure;

/** Reports a file event of a specified type to the server. This method is intended for reporting file data.

@param eventType The type of the event. See AMAEventTypes.h file for reserved event types.
@param data The data of the event, cannot be nil.
@param fileName The name of file, cannot be nil.
Expand Down

0 comments on commit 1b934f2

Please sign in to comment.