Fix issues with Analytics
This commit is contained in:
parent
b343a46de0
commit
eab45d7dc8
|
@ -34,18 +34,17 @@ RCT_EXPORT_METHOD(setCurrentScreen:(NSString *) screenName
|
|||
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setMinimumSessionDuration:(NSNumber *) milliseconds)
|
||||
RCT_EXPORT_METHOD(setMinimumSessionDuration:(nonnull NSNumber *) milliseconds)
|
||||
{
|
||||
//Not implemented on iOS
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setSessionTimeoutDuration:(NSNumber *) milliseconds)
|
||||
RCT_EXPORT_METHOD(setSessionTimeoutDuration:(nonnull NSNumber *) milliseconds)
|
||||
{
|
||||
//Not implemented on iOS
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setUserId: (NSString *) id
|
||||
props:(NSDictionary *) props)
|
||||
RCT_EXPORT_METHOD(setUserId: (NSString *) id)
|
||||
{
|
||||
[FIRAnalytics setUserID:id];
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export default class Analytics extends Base {
|
|||
* @param params
|
||||
* @return {Promise}
|
||||
*/
|
||||
logEvent(name: string, params: Object): void {
|
||||
logEvent(name: string, params: Object = {}): void {
|
||||
// check name is not a reserved event name
|
||||
if (ReservedEventNames.includes(name)) {
|
||||
throw new Error(`event name '${name}' is a reserved event name and can not be used.`);
|
||||
|
|
Loading…
Reference in New Issue