app rejected because of advertisingIdentifier in Facebook SDK and Flurry SDK
facebook, ios, iphone, objective-c
Solution
Get the source code from https://github.com/facebook/facebook-ios-sdk , instead of the compiled framework. Just deleting the framework and pasting in the source code should do it.
Go to FBUtility.m and modify this method:
+ (NSString *)advertiserID {
NSString *advertiserID = nil;
Class ASIdentifierManagerClass = [FBDynamicFrameworkLoader loadClass:@"ASIdentifierManager" withFramework:@"AdSupport"];
if ([ASIdentifierManagerClass class]) {
ASIdentifierManager *manager = [ASIdentifierManagerClass sharedManager];
advertiserID = [[manager advertisingIdentifier] UUIDString];
}
return advertiserID;
}
to
+ (NSString *)advertiserID {
return @"";
}
Problem
My app was rejected because of `advertisingIdentifier` in Facebook sdk and Flurry SDK ! I found an occurrence of `advertisingIdentifier` in the latest `Facebook SDK (3.12)` and Flurry SDK. Maybe you can check your library's for an occurence with the method below: I opened the FacebookSDK.framework as a library in the terminal and typed the following command ``` otool -v -s __TEXT __objc_methname FacebookSDK | grep advertisingIdentifier ``` and the same way for Flurry SDK. But I don't know what to do.? For news: Flurry has recently updated their SDK and it doesn't contain the `advertisingIdentifier`, but Facebook didn't yet.