advertisingIdentifier: reason for apple rejection.
I'm using this configuration :
react-native: 0.61.5
react-native-branch: 4.3.0"
Apple rejects our application with the following message:
your Kids Category app collects IDFA information, which is not appropriate.
and to test if our application is using IDFA in some plugin, we execute the following command:
fgrep -R advertisingIdentifier .
which retrieve this:
./Pods/Branch/Branch-SDK/Branch-SDK/BNCSystemObserver.m: SEL advertisingIdentifierSelector = NSSelectorFromString(@"advertisingIdentifier");
./Pods/Branch/Branch-SDK/Branch-SDK/BNCSystemObserver.m: ((NSUUID* (*)(id, SEL))[sharedManager methodForSelector:advertisingIdentifierSelector])
./Pods/Branch/Branch-SDK/Branch-SDK/BNCSystemObserver.m: (sharedManager, advertisingIdentifierSelector);
is there any way to remove any reference to IDFA?, or, is absolutely necessary for this plugin to have that in order to run?
This is currently blocking us from delivering any of our updates to the store.
Branch is often used for marketing links and therefore uses the advertising identifier by default. It is NOT strictly necessary and can be removed by removing the AdSupport framework.
The RN layer makes this a bit more complex than in just native code. I'll talk to the team about it in the morning.
Branch is often used for marketing links and therefore uses the advertising identifier by default. It is NOT strictly necessary and can be removed by removing the AdSupport framework.
The RN layer makes this a bit more complex than in just native code. I'll talk to the team about it in the morning.
after some test i can give you more information:
after the instalation of the plugin and a pod install, in my Pods-APPNAME.release.xcconfig and others xcconfig appears in OTHER_LDFLAGS this flag:
-framework "AdSupport"
And the other problem that we have is that this package has a dependency of FBSDKCoreKit that has the following lines, for example:
#import <AdSupport/AdSupport.h>
#pragma mark - AdSupport Classes
_fbsdkdfl_load_framework_once_impl_(AdSupport)
_fbsdkdfl_handle_get_impl_(AdSupport)
and a few more lines...
Added a ticket to address this issue. Although the fix is rather simple, it may take a bit of time to get a release out since the work is spread across two SDKs.
-
Update the Branch iOS SDK with a pod without AdSupport. https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/blob/master/Branch.podspec
-
Update the Branch RN SDK with a version without AdSupport https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution/blob/master/react-native-branch.podspec
If you're in a hurry, you can make the same changes locally.
- Checkout the Branch iOS SDK and remove AdSupport from the iOS SDK Branch.podspec
- Checkout the Branch RN SDK and edit react-native-branch.podspec to point to your local checkout of the Branch iOS SDK.
- Point your project to the local copy of the Branch RN SDK.
Also, the FB specific code is not part of our SDK, it's included by RN itself. That code is dynamically checking for AdSupport so it's not an issue.
should i change this lines
s.frameworks = 'AdSupport', 'CoreServices', 'SystemConfiguration'
s.ios.frameworks = 'WebKit', 'iAd', 'CoreTelephony'
to:
s.frameworks = 'CoreServices', 'SystemConfiguration'
s.ios.frameworks = 'WebKit', 'CoreTelephony'
or only this one:
s.frameworks = 'CoreServices', 'SystemConfiguration'
s.ios.frameworks = 'WebKit', 'iAd', 'CoreTelephony'
on the other hand facebook no only wants us to remove AdSupport, but:
they want the app to contain absolutely no IDFA code, regardless of if it is called or not.
Just to clarify, FB requested that code be removed? Cause it's their code. I can see Apple requesting it, but normally they just want the AdSupport framework removed cause that disables IDFA entirely.
iAd is a different feature. It's used for Apple Search Ads support, if you dont use it you can remove it also. It is unrelated to IDFA.
Just to clarify, FB requested that code be removed? Cause it's their code. I can see Apple requesting it, but normally they just want the AdSupport framework removed cause that disables IDFA entirely.
@echo-branch Sorry for my mistake, i was referring to apple not facebook, our app is still being rejected so, only removing AdSupport doesnt work,
we need to remove this:
./Pods/Branch/Branch-SDK/Branch-SDK/BNCSystemObserver.m: SEL advertisingIdentifierSelector = NSSelectorFromString(@"advertisingIdentifier"); ./Pods/Branch/Branch-SDK/Branch-SDK/BNCSystemObserver.m: ((NSUUID* (*)(id, SEL))[sharedManager methodForSelector:advertisingIdentifierSelector]) ./Pods/Branch/Branch-SDK/Branch-SDK/BNCSystemObserver.m: (sharedManager, advertisingIdentifierSelector);
That's a rather odd request to remove that. Normally, Apple allows weak linking so that we can support both Apps that do use IDFA and apps that cannot use it.
Are you certain the AdSupport framework was removed and the app rebuilt?
If you enable logging in Branch you will see a variable set to "idfa" in the request payload if AdSupport is present. If it's not present you'll see the vendor id instead.
@echo-branch we couldn't do anything to make apple keep rejecting us the version having branch, so we had to delete it.
I uploaded an issue to the ios branch team: 1049, but didn't get any response
@echo-branch also you should keep mind that from ios 14 you cant use idfa for any other thing that isnt ad related
@pabloearg IDFA has always been for Ads and related tasks such as Ad attribution. On native iOS, Branch is used for marketing purposes, marketing links and ad attribution, hence IDFA was included by default. React Native is the only platform where people use Branch for generic non-ads based linking, we failed to account properly for that use case and need to make IDFA optional.
There's on-going work on the iOS SDK to make that possible, but it will take some time to get that all the way to RN.
just got a rejection today using react-native-branch 5.0.0 (latest) related to IDFA, thought it would be IDFA free already (uses latest Branch iOS SDK). Any thoughts?
@erisvaldojunior Appears AdSupport.framework is still included by React Native itself, even though it appears they're not using it. This will trigger us to look for iDFA.
Try the following:
- Search for
GCC_PREPROCESSOR_DEFINITIONS - Locate
Branch.debug.xcconfigandBranch.release.xcconfig - Edit the preprocessor line to
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 BRANCH_EXCLUDE_IDFA_CODE=1 - Clean and rebuild
If you breakpoint in BNCSystemObserver.m at getAdId, it should now always return nil.
Does anybody know if this has been addressed in a subsequent release so we don't have to patch the .xcconfig files?
Last I checked, RN is still including the AdSupport.framework by default. Removing our conditional IDFA check will negatively impact our native iOS SDK and other plugins. We have a ticket backlogged to make this workaround for RN easier to use.
What's the update on this? We need to ensure branch works correctly (link attribution) without relying on IDFA
@mlfarrell If I'm understanding your comment, you're concerned about attribution with iOS 14.5 and no IDFA? There's quite a bit to unpack with those changes and this thread is just about the technical aspect of removing the IDFA from RN.
Please see this post for an intro on the impact to Branch. https://blog.branch.io/attribution-on-ios-14-welcoming-apples-new-world-order/
I understand that now. I did do a BRANCH_EXCLUDE_IDFA_CODE build and was able to, even after a uninstall & reinstall attribute a link click on a device correctly. So I'm assuming i'm in the good here unless the previous idfa was somehow cached and linked to the IDFV on your servers.