-
Notifications
You must be signed in to change notification settings - Fork 29
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
Popup not displayed above IOS 15.4+ #32
Comments
Same here. The permission dialog is shown on Simulator with iOS 15.5, but not on a real device with iOS 15.5. On the real device For test purposes I disabled all my other dialogs and added a delay to the permission dialog – no luck. Any help would be highly appreciated. Thank you! |
What I did was to wait 2 seconds before asking for the permission and I don't know why it worked suddently. @override
void initState() {
super.initState();
WidgetsFlutterBinding.ensureInitialized()
.addPostFrameCallback((_) async {
await Future.delayed(const Duration(milliseconds: 2000));
await AppTrackingTransparency.requestTrackingAuthorization()
);
} |
@ThebaultLouis Thanks for your response. I tried this approach already and it didn't work, but now it does. My second problem was the I wasn't aware of the iOS setting "allow tracking permission requests". On my test device, this setting was set to |
Any fix around it ? @deniza I don't think wait 2 seconds for a long time will be healthy |
I have the same issue here, and apple isn't approving my application because of that. My device has "allow tracking permission requests" enabled, but nothing I do make it works. I tried delay request, I removed other requests (like notification permissions). The request is just not shown. |
Did you tried to call AppTrackingTransparency.trackingAuthorizationStatus? What do you get when you call it? |
@deniza I don't have an iPhone here to test it, but if you could, will be greatful. On the simulator the issue doesn't appears. I know a serie of big companies that use this package and they are at the mercy of this problem. To simulate this problem I think it just you ask for the tracking dialog on the first step of your app... Maybe for those who fetch some data first are not going through this issue (talking this because to fix this issue we force wait 2 seconds to call the tracking dialog). We had publishing problems because of this, and I think the numbers of people will increase. |
My app also got rejected because of that error. I saw that the ATT permission dialog got dismissed because of another permission dialog. I saw that ATTrackingManager has an async function. And I was hoping I could force wait for the function. class func requestTrackingAuthorization() async -> ATTrackingManager.AuthorizationStatus But using an async function in the method channel on iOS-side makes the app crash and I couldn't find a way to solve that. Could be a limitation of the method channel. |
I find that after aprove or deny this permission manually on the iPhone settings the permission request is not shown anymore. Even if I uninstall completely the app and install it again the option I chose before remains checked. I used two other iPhones and the dialog showed up as expected. Maybe the problem isn't the plugin but iOS doing this. |
My app also got rejected due to this issue. Any update ? |
I highly recommend showing an explainer dialog before requesting tracking authorization. Please check the sample project. This is the officially recommended (by google) way which leads far better acceptance rates, hence more ads revenue. I tested the package on various ios versions (15.x and upcoming 16 beta). Everything seems to work fine. (I am using explainer dialog approach) |
I Already have another few dialogs which I am awaiting before I show the ATT dialog. Still it is not displaying. |
Any Updates? i am getting the same apple rejection |
Hi please make sure you have "Allow Apps to Request to Track" enabled on device and make sure the app is properly mounted on the native side. I would recommend requesting the dialog in an initState of a screen, maybe the first one. zoontek/react-native-permissions#648 (comment) this explains more about it |
Hello
Avoid infinite loop, Add AfterTrackingStatus authorizationStatus =
await AppTrackingTransparency.trackingAuthorizationStatus;
int timeoutCount = 0;
while (authorizationStatus == TrackingStatus.notDetermined &&
timeoutCount < 10) { // Adjust yourself.. maybe up to ~50
authorizationStatus =
await AppTrackingTransparency.requestTrackingAuthorization();
await Future.delayed(const Duration(milliseconds: 200));
timeoutCount++;
} BeforeTrackingStatus authorizationStatus =
await AppTrackingTransparency.trackingAuthorizationStatus;
if (authorizationStatus == TrackingStatus.notDetermined) {
authorizationStatus =
await AppTrackingTransparency.requestTrackingAuthorization();
} This is the demonstration screenshot video. 2023-01-06.1.52.43.movThanks! |
iOS 16.4 can't open. README says |
@luminkhant i was facing this same issue. I added bellow code in appDelegate.swift file and Authorisation default alert showing in iOS 16+
|
@Zaveri21 I hope you to make pull-request for it. |
我的项目是Flutter创建的,iOS端语言使用的是OC,针对该问题我的解决方案如下: #import <AppTrackingTransparency/AppTrackingTransparency.h> |
I need to request permission to collect data with the app tracking transparency dialog.
The dialog shows up in my simulator (iphone 13 ios 15.2) but not on real devices (iphone 13 on 15.4 and iphone 13 on 15.5)
I implemented the package with the following code
The text was updated successfully, but these errors were encountered: