-
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
ATT Not working on IOS 15.0 #22
Comments
I just compiled the example using xcode 13 and tested it on ios 15 simulator. Everything seems running fine. As I do not have any ios devices running ios 15, I cannot test it on a real device right now. Do you have any chance to test the example on an ios 15 device? |
Oh, and please update the plugin to version 2.0.2+1 to fix a nasty bug regarding to null safety in example. |
Thank you so much for your response. I have updated the version, now it is working fine. Also i have tested it on a real device with IOS 15.0, it is working. |
I just got this as well. However, simply updating the plugin and reloading on ios 15 didn't solve the issue. I had to actually move the location where I called the plugin. I was calling it in an init that only runs after checking if it's first run, where it's always been since I started using it. Now it won't run event though the method is called. I moved it to the end of my onboarding and now it works just fine. So if you run across this and the above doesn't fix it. Try calling the the check at a different time. I am calling WidgetsFlutterBinding.ensureInitialized(); and MobileAds.instance.initialize(); in my main.dart. It's completely possible that playing with these could have been a solution as well. For some reason, the plugin just wasn't firing like it did before. I also had onesignal firing about the same time, that continued to work the same. |
I have this problem too |
I'm running in the same problem; What i found is that the plugin isn't prompting for the permission and that it returns a restricted status, upon checking this in the Tracking screen in iOS, it mentions there that the setting cannot be enabled because my Apple ID is missing age information (being 40+ and the birthdate is in my apple ID, this sounds like an issue with iOS to me...) No real solution found yet, except logging out of my apple ID and then it works... |
Same problem on my side, a solution has been found? |
Seems that, starting with iOS 15, there is a problem prompting two consecutive native popups. Especially, if you prompt at around the same time (at startup probably), the notification authorization prompt, then your ATT prompt will be squashed. On a project of mine (a native iOS one), I had to do this to overcome this problem :
Moving the ATTrackingManager to |
Thanks for your reply @ipapps , |
Hi everyone, |
anyone? same problem here |
Please read all the posts on this, there are two solutions identified earlier. ipapps identification of the issue seems to be correct. My post above tells what I did to solve. In a nutshell, with ios 15, don't have back to back notifications fire consecutively. |
You can also use a custom explainer dialog before calling AppTrackingTransparency.requestTrackingAuthorization(); Using this approach is also recommended by Google. |
@walvespit Requesting authorization in the AppDelegate solved the problem, the verification is passed, and the app is available on the store |
Thank you for your answer, can you explain a little more please ? Where exactly is "in the AppDelegate" ? |
in the file ios/Runner/AppDelegate.swift, I put this function in my class "AppDelegate" like this: /// your import
import AppTrackingTransparency // add this
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
/// your code here
}
override func applicationDidBecomeActive(_ application: UIApplication) { // add this function
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
switch status {
case .authorized:
// Tracking authorization dialog was shown
// and we are authorized
print("Authorized")
case .denied:
// Tracking authorization dialog was
// shown and permission is denied
print("Denied")
case .notDetermined:
// Tracking authorization dialog has not been shown
print("Not Determined")
case .restricted:
print("Restricted")
@unknown default:
print("Unknown")
}
})
} else {
//you got permission to track, iOS 14 is not yet installed
}
}
} The tracking permission request will be the first to be displayed, then in flutter with the "app_tracking_transparency" package I check if the permission has been granted, if so, I get the identifier. This is not the best method, but it allowed to pass the Apple verification |
We have got a message from app store.
" We're looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 15.0.
Since you indicated in App Store Connect that you collect data in order to track the user, we need to confirm that App Tracking Transparency has been correctly implemented "
Kindly update the plugin as soon as possible.
Thank You
The text was updated successfully, but these errors were encountered: