-
Notifications
You must be signed in to change notification settings - Fork 148
fix: support for iOS 14+ with setAdvertiserTrackingEnabled; remove rectangle banner on iOS
#280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9a36cfa
chore: updated readme for banner ads, render rectangle banner only fo…
TMaszko 62fe0d3
chore: cleaned up native ads manager initialization
TMaszko 36441ae
feat: added setAdvertiserTrackingEnabled for ios
TMaszko bad432f
chore: updated readme with added setAdvertiserTrackingEnabled method
TMaszko ae6739d
Update README.md
TMaszko 4362254
Update README.md
TMaszko 3351b04
chore: removed doubled logic for checking tracking status
TMaszko 2c35bc9
Merge branch 'ios-14-rectangle-banner' of github.com:callstack/react-…
TMaszko f94acfb
chore: updated readme about setAdvertiserTrackingEnabled
TMaszko 00e89ca
chore: moved note to the proper section, added comment about unrelate…
TMaszko 3d4a557
Update README.md
TMaszko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -241,7 +241,7 @@ Banners are available in 3 sizes: | |
|
|
||
| - `standard` (BANNER_HEIGHT_50) | ||
| - `large` (BANNER_HEIGHT_90) | ||
| - `rectangle` (RECTANGLE_HEIGHT_250) | ||
| - `rectangle` (RECTANGLE_HEIGHT_250) – currently Android only | ||
|
|
||
| ```js | ||
| import { BannerView } from 'react-native-fbads'; | ||
|
|
@@ -384,8 +384,21 @@ Requests permission to track the user. Requires an [`NSUserTrackingUsageDescript | |
|
|
||
| ```js | ||
| const trackingStatus = await AdSettings.requestTrackingPermission(); | ||
| if (trackingStatus === 'authorized' || trackingStatus === 'unavailable') | ||
| if (trackingStatus === 'authorized' || trackingStatus === 'unavailable') { | ||
| AdSettings.setAdvertiserIDCollectionEnabled(true); | ||
| AdSettings.setAdvertiserTrackingEnabled(true); | ||
| } | ||
| ``` | ||
|
|
||
| ### setAdvertiserTrackingEnabled | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add a clear notice that FB won't display adds when this is not set to true |
||
|
|
||
| Enables or disables personalized ads tracking on iOS 14+. See Facebook docs on [Advertising Tracking Enabled For Audience Network](https://developers.facebook.com/docs/audience-network/guides/advertising-tracking-enabled) | ||
|
|
||
| > Requires iOS 14. On Android and iOS versions below 14, this will always be no-op. | ||
| > **Important: FB won't display adds unless this is set to `true`.** | ||
|
|
||
| ```js | ||
| AdSettings.setAdvertiserTrackingEnabled(true); | ||
| ``` | ||
|
|
||
| ### setAdvertiserIDCollectionEnabled | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.