Description
Checklist before submitting a bug report
- I've updated to the latest released version of the SDKI've searched for existing GitHub issuesI've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers GroupI've read the Code of ConductThis issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
15.3
Facebook iOS SDK version
17.0.0
Dependency Manager
CocoaPods
SDK Framework
Core
Goals
I want to use the sdk according to the documentation without getting a deprecation warning.
Expected results
According to the documentation, manually setting the isAdvertiserTrackingEnabled
parameter is only necessary up to iOS 17:
For iOS 17.0 and later devices, you are no longer required to set the Advertiser Tracking Enabled parameter for Facebook SDK for iOS 17.0.0 and later versions. We now rely on Apple’s App Tracking Transparency (ATT) system API to determine ATT permission status for app events sent through Facebook SDK for iOS 17.0.0 and later versions.
So with a lower minimum deployment target (e.g. iOS 16) it is still necessary to manually set the parameter. E.g.
if #unavailable(iOS 17) {
FBSDKCoreKit.Settings.shared.isAdvertiserTrackingEnabled = true
}
In that case there should be no deprecation warning because it is useless until one updates the minimum deployment target to iOS 17.
Actual results
After updating the sdk to version 17.0.0
and FBAudienceNetwork to version 6.15.0
this gives a deprecation warning (defined in FBAdSettings.h
):
Setter for 'isAdvertiserTrackingEnabled' is deprecated: The setAdvertiserTrackingEnabled flag is not used for FBSDK v17+ on iOS 17+ as the FBSDK v17+ now relies on ATTrackingManager.trackingAuthorizationStatus.
/**
User's consent for advertiser tracking.
*/
+ (void)setAdvertiserTrackingEnabled:(BOOL)advertiserTrackingEnabled
NS_DEPRECATED_IOS(
12_0,
17_0,
"The setter for advertiserTrackingEnabled flag is deprecated: The setAdvertiserTrackingEnabled flag is not used for Audience Network SDK 6.15.0+ on iOS 17+ as the Audience Network SDK 6.15.0+ on iOS 17+ now relies on [ATTrackingManager trackingAuthorizationStatus] to accurately represent ATT permission for users of your app");
Steps to reproduce
No response
Code samples & details
// INSERT YOUR CODE HERE
var example = "Example code"
Activity
sea7reen commentedon Apr 7, 2024
i have same issue
VladOrackle commentedon Apr 8, 2024
Same
Nass33m commentedon Apr 9, 2024
same
michalnowak061 commentedon Apr 12, 2024
up
YixingWangJ commentedon Apr 16, 2024
same
ezanalemma commentedon Apr 20, 2024
Same, please fix
UnuSynth commentedon Apr 23, 2024
Same
ionutivan commentedon Apr 24, 2024
Same
guillermomuntaner commentedon Apr 30, 2024
Is this really the case that the SDK would still need this flag for iOS < 17? Or is only about the v17 of the SDK?
From the code it looks as this if really for iOS 14+, and the issue here seems the miss-leading documentation:
facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/Settings.swift
Lines 408 to 423 in 7295c42
daniel-l2 commentedon May 4, 2024
Seems like SDK uses
_advertisingTrackingStatusFromATT
only whenisDomainHandlingEnabled()
returns true.facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/Settings.swift
Lines 388 to 394 in 7295c42
And
isDomainHandlingEnabled
always returns true for iOS >= 17, but not for iOS < 17.facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/Internal/DomainHandler/FBSDKDomainHandler.m
Lines 136 to 149 in 7295c42
So it seems like the warning for iOS < 17 should be suppressed.
oronbz commentedon Aug 19, 2024
Any update / ETA for this issue? It's the only warning in our app and it's really annoying.
aayushgulia777 commentedon Oct 9, 2024
Any updates here?
cemnisan commentedon Nov 4, 2024
Any updates here?
ricsantos commentedon Dec 9, 2024
Just providing an update to all of those waiting:
There is no update.
Enjoy the two compiler warnings.
oronbz commentedon Apr 1, 2025
Almost a full year... Can we please give it some love?
sanchan commentedon Jun 30, 2025
This issue will reach the legal drinking age before it's resolved.
ikarus6941 commentedon Jul 3, 2025
Any updates here? It’s already 2025.