Skip to content

Commit

Permalink
Don't require ASIdentifierManager to be linked
Browse files Browse the repository at this point in the history
  • Loading branch information
bdolman committed Sep 11, 2014
1 parent 45811c1 commit 299a353
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Mixpanel/Mixpanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ - (NSMutableDictionary *)collectAutomaticProperties
[p setValue:carrier.carrierName forKey:@"$carrier"];
}
if (NSClassFromString(@"ASIdentifierManager")) {
[p setValue:[[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString] forKey:@"$ios_ifa"];
[p setValue:[[NSClassFromString(@"ASIdentifierManager") sharedManager].advertisingIdentifier UUIDString] forKey:@"$ios_ifa"];
}
#else
[p setValue:@"osx" forKey:@"mp_lib"];
Expand Down Expand Up @@ -495,7 +495,7 @@ - (NSString *)defaultDistinctId
NSString *distinctId = nil;
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
if (NSClassFromString(@"ASIdentifierManager")) {
distinctId = [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString];
distinctId = [[NSClassFromString(@"ASIdentifierManager") sharedManager].advertisingIdentifier UUIDString];
}
#endif
if (!distinctId) {
Expand Down Expand Up @@ -1260,7 +1260,7 @@ - (NSDictionary *)collectAutomaticProperties
[p setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"$ios_app_version"];
[p setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] forKey:@"$ios_app_release"];
if (NSClassFromString(@"ASIdentifierManager")) {
[p setValue:[[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString] forKey:@"$ios_ifa"];
[p setValue:[[NSClassFromString(@"ASIdentifierManager") sharedManager].advertisingIdentifier UUIDString] forKey:@"$ios_ifa"];
}
#else
NSMutableDictionary *p = [NSMutableDictionary dictionary];
Expand Down

0 comments on commit 299a353

Please sign in to comment.