-
Notifications
You must be signed in to change notification settings - Fork 25
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
Not possible to request Tracking Transparency in iOS 15 #15
Comments
i don't know why doesn't work on iOS 15 , but i changed the requestTrackingPermission call on onPress event in my login button and works fine again. |
It's weird. But it's working as you said, maybe we cannot ask for tracking transparency on app startup anymore? |
i don'd know, but another way is using a time out function.
|
Interested to see why the ATT pop up doesn't show anymore with iOS 15. |
In one of our apps, I discovered that the ATT prompt is triggered even when the app is in What I did in the end, was listening for the app state changes: whenever the app goes from As it turns out, you can also do it later e.g. upon clicking on the login button as well |
For me in iOS 15 the pop up shows, but any user choice will freeze the app. this lead to close the app and open it again. |
Having this issue |
I was having the same issue, this is caused because in iOS 15 we can only raise the pop up when the app is in active state. To solve this, I added a listener for the AppState change, which can be imported from react-native itself and I just run the function to raise the pop up when the AppState is equal to active.
|
@leonardocroda your work around works, thank you. |
It's work but why ? =.=" |
@fpgce how'd it go ? |
I can confirm that an additional setTimeout is needed. Without it, our app got rejected. |
I had the same issue. It was solved by updating the OS to Monterey, execute xcode (click the install menu that appears after running), and then rebuilding. |
Same here |
Facing the same issue, on a real device even with timeout it doesnt pop up |
@leonardocroda's solution with React.useEffect(() => {
if (Platform.OS !== 'ios') {
return
}
const updateTrackingStatus = (status: AppStateStatus) => {
if (status === 'active') {
;(async () => {
const trackingStatus = await getTrackingStatus()
if (trackingStatus === 'not-determined') {
requestTrackingPermission()
}
})()
}
}
// Ready to check the permission now
if (AppState.currentState === 'active') {
updateTrackingStatus(AppState.currentState)
} else {
// Need to wait until the app is ready before checking the permission
AppState.addEventListener('change', updateTrackingStatus)
return () => {
AppState.removeEventListener('change', updateTrackingStatus)
}
}
}, [AppState.currentState]) |
Where do you import AppStateStatus from ? |
import { AppStateStatus } from 'react-native' |
Hello,
I've tested in iOS 15 as it was officially released in 2021/09/20
However when calling method from iOS 15
requestTrackingPermission()
I receivenot-determined
.The same code executed in iOS 14 is working properly.
Do you have any idea why it's not requesting?
Thanks
The text was updated successfully, but these errors were encountered: