diff --git a/Mixpanel/AutomaticEvents.h b/Mixpanel/AutomaticEvents.h index 1c83b8b49..7ee9e335f 100644 --- a/Mixpanel/AutomaticEvents.h +++ b/Mixpanel/AutomaticEvents.h @@ -7,14 +7,14 @@ // #import -#import #import "MixpanelPeople.h" + @protocol TrackDelegate - (void)track:(NSString *)event properties:(NSDictionary *)properties; @end -@interface AutomaticEvents: NSObject +@interface AutomaticEvents: NSObject @property (atomic, weak) id delegate; @property (atomic, assign) UInt64 minimumSessionDuration; @property (atomic, assign) UInt64 maximumSessionDuration; diff --git a/Mixpanel/AutomaticEvents.m b/Mixpanel/AutomaticEvents.m index f331d0c0a..e31e80b40 100644 --- a/Mixpanel/AutomaticEvents.m +++ b/Mixpanel/AutomaticEvents.m @@ -9,6 +9,11 @@ #import "AutomaticEvents.h" #import "MPSwizzler.h" #import +#import + +@interface AutomaticEvents() + +@end @implementation AutomaticEvents { NSMutableDictionary *awaitingTransactions; diff --git a/Mixpanel/Mixpanel.m b/Mixpanel/Mixpanel.m index 107b240c1..622d7ddca 100755 --- a/Mixpanel/Mixpanel.m +++ b/Mixpanel/Mixpanel.m @@ -13,8 +13,8 @@ #import "MPLogger.h" #import "MPNetworkPrivate.h" -#if !MIXPANEL_NO_NOTIFICATION_AB_TEST_SUPPORT #import +#if !MIXPANEL_NO_NOTIFICATION_AB_TEST_SUPPORT #import "NSThread+MPHelpers.h" #endif #if defined(MIXPANEL_WATCHOS) @@ -1729,6 +1729,7 @@ - (void)checkForDecideResponseWithCompletion:(void (^)(NSArray *notifications, N return; } +#if !MIXPANEL_NO_AUTOMATIC_EVENTS_SUPPORT NSDictionary *config = object[@"config"]; if (config && [config isKindOfClass:NSDictionary.class]) { NSDictionary *validationConfig = config[@"ce"]; @@ -1743,6 +1744,7 @@ - (void)checkForDecideResponseWithCompletion:(void (^)(NSArray *notifications, N } } } +#endif id rawNotifications = object[@"notifications"]; NSMutableArray *parsedNotifications = [NSMutableArray array]; diff --git a/Mixpanel/MixpanelPrivate.h b/Mixpanel/MixpanelPrivate.h index 9e7f70aaa..4e8d747dc 100644 --- a/Mixpanel/MixpanelPrivate.h +++ b/Mixpanel/MixpanelPrivate.h @@ -48,11 +48,16 @@ #import "MPConnectIntegrations.h" #endif -#if !MIXPANEL_NO_NOTIFICATION_AB_TEST_SUPPORT -@interface Mixpanel () -#else +#if defined(MIXPANEL_NO_NOTIFICATION_AB_TEST_SUPPORT) && defined(MIXPANEL_NO_AUTOMATIC_EVENTS_SUPPORT) @interface Mixpanel () +#elif defined(MIXPANEL_NO_NOTIFICATION_AB_TEST_SUPPORT) +@interface Mixpanel () +#elif defined(MIXPANEL_NO_AUTOMATIC_EVENTS_SUPPORT) +@interface Mixpanel () +#else +@interface Mixpanel () #endif + { NSUInteger _flushInterval; BOOL _enableVisualABTestAndCodeless;