-
Notifications
You must be signed in to change notification settings - Fork 46
/
SEGAnalyticsUtils.h
35 lines (24 loc) · 1.09 KB
/
SEGAnalyticsUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// AnalyticsUtils.h
// Copyright (c) 2014 Segment.io. All rights reserved.
#import <Foundation/Foundation.h>
#define SEGStringize_helper(x) #x
#define SEGStringize(x) @SEGStringize_helper(x)
NSURL *SEGAnalyticsURLForFilename(NSString *filename);
// Date Utils
NSString *iso8601FormattedString(NSDate *date);
// Async Utils
dispatch_queue_t seg_dispatch_queue_create_specific(const char *label,
dispatch_queue_attr_t attr);
BOOL seg_dispatch_is_on_specific_queue(dispatch_queue_t queue);
void seg_dispatch_specific(dispatch_queue_t queue, dispatch_block_t block,
BOOL waitForCompletion);
void seg_dispatch_specific_async(dispatch_queue_t queue,
dispatch_block_t block);
void seg_dispatch_specific_sync(dispatch_queue_t queue, dispatch_block_t block);
// Logging
void SEGSetShowDebugLogs(BOOL showDebugLogs);
void SEGLog(NSString *format, ...);
// JSON Utils
NSDictionary *SEGCoerceDictionary(NSDictionary *dict);
NSString *SEGIDFA(void);
NSString *SEGEventNameForScreenTitle(NSString *title);