facebook / facebook/facebook-ios-sdk
Clarify/rectify documentation related to tracking and device consent
- Dominant language
- Swift
- Stars
- 8.1k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist before submitting a bug report
- [x] I've updated to the latest released version of the SDK
- [x] I've searched for existing [GitHub issues](https://github.com/facebook/facebook-ios-sdk/issues)
- [x] I've looked for existing answers on [Stack Overflow](https://facebook.stackoverflow.com), the [Facebook Developer Community Forum](https://developers.facebook.com/community/) and the [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers)
- [x] I've read the [Code of Conduct](https://github.com/facebook/facebook-ios-sdk/blob/main/CODE_OF_CONDUCT.md)
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
### Xcode version
26.5
### Facebook iOS SDK version
18.0.3
### Dependency Manager
SPM
### SDK Framework
Core
### Goals
In https://developers.facebook.com/docs/app-events/getting-started-app-events-ios it states:
> Changes have been made to the Facebook iOS SDK. We recommend upgrading to the new version of the Facebook iOS SDK. See the Device Consent section for more information about this change.
Which is a bit outdated, because as of iOS 17 this is handled automatically.
It links to the following stuff, that's also outdated:
In the [`Get Device Consent`](https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#get-device-consent) section it states:
> Starting with iOS 14.5, you will need to set isAdvertiserTrackingEnabled and log each time you give a device permission to share data with Facebook.
>
> If a device provides consent, set Settings.shared.isAdvertiserTrackingEnabled = true.
>
> If a device does not allow tracking, set Settings.shared.isAdvertiserTrackingEnabled = false.
But that is only true up to iOS v17.
Then in the `Disable Collection of Advertiser IDs` section it says to set
> ```
> FacebookAdvertiserIDCollectionEnabled
>
> ```
But that's also outdated.
On this page the information seems to be more accurate: https://developers.facebook.com/docs/app-events/guides/advertising-tracking-enabled/
But it also says:
> Setting ATE Flag in FB iOS SDK versions 17.0.0+
And then right below it:
> Warning: 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.
So that's a bit contradicting.
I think those two pages should be combined into one with a more accurate description.
Currently a warning is still being thrown by the SDK by the way. It seems to be resolved in https://github.com/facebook/facebook-ios-sdk/commit/0ebdfc6c994e7ec26cc05f0ad0bb92e69e169255 . But that commit hasn't been released yet.
### Expected results
n/a
### Actual results
n/a
### Steps to reproduce
n/a
### Code samples & details
```swift
```
Contributor guide
Assessment
This issue has not been assessed yet.