9 #import <UIKit/UIKit.h>
11 @class SKPaymentTransaction;
17 #import "FlurrySessionBuilder.h"
22 typedef NS_ENUM(NSUInteger, FlurryPaymentTransactionState) {
23 FlurryPaymentTransactionStatePurchasing NS_SWIFT_NAME(purchasing) = 0,
24 FlurryPaymentTransactionStateSuccess NS_SWIFT_NAME(success),
25 FlurryPaymentTransactionStateFailure NS_SWIFT_NAME(failure),
26 FlurryPaymentTransactionStateRestored NS_SWIFT_NAME(restored),
27 FlurryPaymentTransactionStateDeferred NS_SWIFT_NAME(deffered)
31 typedef NS_ENUM(NSUInteger, FlurryEventRecordStatus) {
32 FlurryEventFailed NS_SWIFT_NAME(failed) = 0,
33 FlurryEventRecorded NS_SWIFT_NAME(recorded),
34 FlurryEventUniqueCountExceeded NS_SWIFT_NAME(uniqueCountExceeded),
35 FlurryEventParamsCountExceeded NS_SWIFT_NAME(paramsCountExceeded),
36 FlurryEventLogCountExceeded NS_SWIFT_NAME(logCountExceeded),
37 FlurryEventLoggingDelayed NS_SWIFT_NAME(loggingDelayed),
38 FlurryEventAnalyticsDisabled NS_SWIFT_NAME(analyticsDisabled),
39 FlurryEventParametersMismatched NS_SWIFT_NAME(parametersMismatched)
49 typedef NS_ENUM(NSUInteger, FlurrySyndicationEvent){
50 FlurrySyndicationReblog NS_SWIFT_NAME(reblog) = 0,
51 FlurrySyndicationFastReblog NS_SWIFT_NAME(fastReblog),
52 FlurrySyndicationSourceClick NS_SWIFT_NAME(sourceClick),
53 FlurrySyndicationLike NS_SWIFT_NAME(like),
54 FlurrySyndicationShareClick NS_SWIFT_NAME(shareClick),
55 FlurrySyndicationPostSend NS_SWIFT_NAME(postSend)
58 extern NSString* _Nonnull
const kSyndicationiOSDeepLink;
59 extern NSString* _Nonnull
const kSyndicationAndroidDeepLink;
60 extern NSString* _Nonnull
const kSyndicationWebDeepLink;
63 typedef NS_ENUM(NSUInteger, FlurryTransactionRecordStatus) {
64 FlurryTransactionRecordFailed NS_SWIFT_NAME(failed) = 0,
65 FlurryTransactionRecorded NS_SWIFT_NAME(recorded),
66 FlurryTransactionRecordExceeded NS_SWIFT_NAME(recordExceeded),
67 FlurryTransactionRecodingDisabled NS_SWIFT_NAME(recordingDisabled)
99 - (void)flurrySessionDidCreateWithInfo:(nonnull NSDictionary*)info;
107 @protocol FlurryFetchObserver <NSObject>
117 - (void)onFetched:(NSDictionary<NSString *, NSString *> *_Nullable)publisherData;
140 #pragma mark - Pre-Session Calls
160 + (nonnull NSString *)getFlurryAgentVersion;
179 + (void)setShowErrorInLogEnabled:(BOOL)value
180 NS_SWIFT_NAME(set(showErrorInLogEnabled:));
195 + (void)setLogLevel:(FlurryLogLevel)value
196 NS_SWIFT_NAME(set(logLevel:));
201 #pragma mark - Flurry Delegate setters
220 NS_SWIFT_NAME(set(delegate:));
237 + (void)setDelegate:(nonnull
id<
FlurryDelegate>)delegate withCallbackQueue:(nonnull dispatch_queue_t)flurryCallbackQueue
238 NS_SWIFT_NAME(set(delegate:callbackQueue:));
240 #pragma mark - start session APIs'
278 + (void)startSession:(nonnull NSString *)apiKey
279 NS_SWIFT_NAME(startSession(apiKey:));
314 + (void) startSession:(nonnull NSString *)apiKey withOptions:(nullable
id)options
315 NS_SWIFT_NAME(startSession(apiKey:options:));
355 + (void) startSession:(nonnull NSString *)apiKey withOptions:(nullable
id)options withSessionBuilder:(nullable
FlurrySessionBuilder*) sessionBuilder
356 NS_SWIFT_NAME(startSession(apiKey:options:sessionBuilder:));
392 + (void) startSession:(nonnull NSString *)apiKey withSessionBuilder:(nullable
FlurrySessionBuilder *)sessionBuilder
393 NS_SWIFT_NAME(startSession(apiKey:sessionBuilder:));
396 #pragma mark - Session Details
412 + (BOOL)activeSessionExists;
429 + (nonnull NSString*)getSessionID;
431 #pragma mark - Manual session pausing
450 + (void)pauseBackgroundSession;
453 #pragma mark - User Info Setters and Getters
469 + (void)setUserID:(nullable NSString *)userID
470 NS_SWIFT_NAME(set(userId:));
485 + (void)setAge:(
int)age
486 NS_SWIFT_NAME(set(age:));
502 + (void)setGender:(nonnull NSString *)gender
503 NS_SWIFT_NAME(set(gender:));
539 + (BOOL)trackPreciseLocation:(BOOL)state;
551 + (void) setIAPReportingEnabled:(BOOL)value
552 NS_SWIFT_NAME(set(iapReportingEnabled:));
555 #pragma mark - Add sessionOrigin, originAttributes and sessionProperties
575 + (void)addSessionOrigin:(nonnull NSString *)sessionOriginName
576 NS_SWIFT_NAME(add(sessionOriginName:));
598 + (void)addSessionOrigin:(nonnull NSString *)sessionOriginName
599 withDeepLink:(nonnull NSString *)deepLink
600 NS_SWIFT_NAME(add(sessionOriginName:deepLink:));
631 + (void)sessionProperties:(nonnull NSDictionary *)parameters;
654 + (void)addOrigin:(nonnull NSString *)originName
655 withVersion:(nonnull NSString *)originVersion
656 NS_SWIFT_NAME(add(originName:originVersion:));
689 + (void)addOrigin:(nonnull NSString *)originName
690 withVersion:(nonnull NSString*)originVersion
691 withParameters:(nullable NSDictionary *)parameters
692 NS_SWIFT_NAME(add(originName:originVersion:parameters:));
694 #pragma mark - Event Logging
737 + (FlurryEventRecordStatus)logEvent:(nonnull NSString *)eventName
738 NS_SWIFT_NAME(log(eventName:));
784 + (FlurryEventRecordStatus)logEvent:(nonnull NSString *)eventName
785 withParameters:(nullable NSDictionary *)parameters
786 NS_SWIFT_NAME(log(eventName:parameters:));
809 + (FlurryEventRecordStatus) logEvent:(FlurrySyndicationEvent) syndicationEvent
810 syndicationID:(nonnull NSString *) syndicationID
811 parameters:(nullable NSDictionary *) parameters
812 NS_SWIFT_NAME(log(syndicationEvent:syndicationID:parameters:));
825 + (void) logPaymentTransaction:(nonnull SKPaymentTransaction *)transaction
826 statusCallback:(nullable
void(^)(FlurryTransactionRecordStatus))statusCallback
827 NS_SWIFT_NAME(log(transaction:statusCallback:));
846 + (void) logPaymentTransactionWithTransactionId:(nonnull NSString *)transactionId
847 productId:(nonnull NSString *)productId
848 quantity:(NSUInteger)quantity
850 currency:(nonnull NSString *)currency
851 productName:(nonnull NSString *)productName
852 transactionState:(FlurryPaymentTransactionState)transactionState
853 userDefinedParams:(nullable NSDictionary *)transactionParams
854 statusCallback:(nullable
void(^)(FlurryTransactionRecordStatus))statusCallback
855 NS_SWIFT_NAME(log(transactionId:productId:quantity:price:currency:productName:transactionState:transactionParams:statusCallback:));
857 #pragma mark - Timed Event Logging
898 + (FlurryEventRecordStatus)logEvent:(nonnull NSString *)eventName timed:(BOOL)timed
899 NS_SWIFT_NAME(log(eventName:timed:));
948 + (FlurryEventRecordStatus)logEvent:(nonnull NSString *)eventName withParameters:(nullable NSDictionary *)parameters timed:(BOOL)timed
949 NS_SWIFT_NAME(log(eventName:parameters:timed:));
996 + (void)endTimedEvent:(nonnull NSString *)eventName withParameters:(nullable NSDictionary *)parameters
997 NS_SWIFT_NAME(endTimedEvent(eventName:parameters:));
999 #pragma mark - Exceptions Logging
1029 + (void)logError:(nonnull NSString *)errorID
1030 message:(nullable NSString *)message
1031 exception:(nullable NSException *)exception
1032 NS_SWIFT_NAME(log(errorId:message:exception:));
1064 + (void)logError:(nonnull NSString *)errorID
1065 message:(nullable NSString *)message
1066 exception:(nullable NSException *)exception
1067 withParameters:(nullable NSDictionary*)parameters
1068 NS_SWIFT_NAME(log(errorId:message:exception:parameters:));
1070 #pragma mark - Error Logging
1089 + (void)logError:(nonnull NSString *)errorID
1090 message:(nullable NSString *)message
1091 error:(nullable NSError *)error
1092 NS_SWIFT_NAME(log(errorId:message:error:));
1113 + (void)logError:(nonnull NSString *)errorID
1114 message:(nullable NSString *)message
1115 error:(nullable NSError *)error
1116 withParameters:(nullable NSDictionary*)parameters
1117 NS_SWIFT_NAME(log(errorId:message:error:parameters:));
1136 + (void)leaveBreadcrumb:(nonnull NSString*)breadcrumb;
1139 #pragma mark - TVML JSContext
1202 + (void)registerJSContextWithContext:(JSContext * _Nonnull)jscontext;
1205 #pragma mark - Privacy dashboard
1217 + (void)openPrivacyDashboard:(nullable
void(^)(BOOL success))completionHandler;
1220 #pragma mark - Publisher Segmentation
1227 + (BOOL)isFetchFinished;
1235 + (void)registerFetchObserver:(
id<FlurryFetchObserver> _Nonnull)observer withExecutionQueue:(dispatch_queue_t _Nonnull)queue
1236 NS_SWIFT_NAME(registerFetchObserver(_:executionQueue:));
1243 + (void)unregisterFetchObserver:(
id<FlurryFetchObserver> _Nonnull)observer;
1251 + (nullable NSDictionary<NSString *, NSString *> *)getPublisherData;
1275 + (void)setAppVersion:(nonnull NSString *)version
1276 NS_SWIFT_NAME(set(appVersion:));
1289 + (void)setSessionContinueSeconds:(
int)seconds
1290 NS_SWIFT_NAME(set(sessionContinueSeconds:));
1301 + (void)setCountBackgroundSessions:(BOOL)value
1302 NS_SWIFT_NAME(set(countBackgroundSessions:));
1311 + (BOOL)isInitialized;