-
Notifications
You must be signed in to change notification settings - Fork 295
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
App Crash when Advertisement tracking "Allow Tracking" in iOS14 #452
Comments
Hi @tpeodndyy We're releasing SDK which will support current state of things in iOS 14 beta soon, but still curious about this. So it's always reproducible for you? Any chance to get crash stack trace? Cheers |
hi @ugi That's great to hear, I am looking forward to that. The crash is happening 100% once allow the tracking and for both device and simulator. Sorry I forgot to provide more information regarding to development environment too. I have tried to find the way to get stack trace but cannot get any thing. Only crash happen with debug message |
Thanks for the info. Will try to see if we can reproduce it our end. Will keep you posted. |
@tpeodndyy One more time thanks for reporting and as far as the issue itself is concerned - wow. After a bit of debugging I noticed that app gets terminated in moment when attempt to communicate with iAd framework is being made. And literally it happens as you noticed it - only if state of consent is I have tried this in app which doesn't even use our SDK. This is how code looks like: #import "AppDelegate.h"
#import <iAd/iAd.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
switch (status) {
case ATTrackingManagerAuthorizationStatusAuthorized:
NSLog(@"ATTrackingManagerAuthorizationStatusAuthorized");
break;
case ATTrackingManagerAuthorizationStatusDenied:
NSLog(@"ATTrackingManagerAuthorizationStatusDenied");
break;
case ATTrackingManagerAuthorizationStatusRestricted:
NSLog(@"ATTrackingManagerAuthorizationStatusRestricted");
break;
case ATTrackingManagerAuthorizationStatusNotDetermined:
NSLog(@"ATTrackingManagerAuthorizationStatusNotDetermined");
break;
}
}];
} else {
// Fallback on earlier versions
}
[[ADClient sharedClient] requestAttributionDetailsWithBlock:^(NSDictionary<NSString *,NSObject *> * _Nullable attributionDetails, NSError * _Nullable error) {
NSLog(@"made it!");
}];
return YES;
} If you launch the app for the first time ever, communication with iAd framework will be attempted right away, so status of consent at that moment will be So this is reproducible by solely using Apple's API (our SDK uses this as well) and that's the problem. I filed bug report to Apple and you can also find description in here. Appears to me that maybe things don't really work well in this scenario in iOS 14 which is still beta, but let's see what Apple's reply will say. And back to finding a way how to test our SDK with iOS 14 - if iAd framework and Apple Search Ads are not something you care about while testing, you can call following method on our configuration object: [adjustConfig setAllowiAdInfoReading:NO]; and that will cause SDK to completely ignore iAd framework and not interact with it. With that option set, you should not see app being terminated. This will unfortunately be the case for our upcoming release as well (will be stated in release notes). In case you have any further questions, feel free to ask. Cheers |
And mystery solved. Bit thanks to Apple for lightning fast response. Indeed it seems to be a bug on Apple's end, but it is fixed in iOS 14 beta 5 (just tested, seems to be working just fine). So, as a final response (and a warning note we'll add in our tomorrow's CHANGELOG and release notes): Give it a shot with iOS 14 beta 5 (or later) and things should work. Cheers |
I was having thesame problem. I fixed this way. Thank you @evaldsurtans EDIT: |
My project and other similar projects are facing the crash issue when app "Allow Tracking" and get
ATTrackingManager.AuthorizationStatus.authorized
from AppTrackingTransparency.The crash happen once we start initialize Adjust SDK by
Adjust.appDidLaunch(adjustConfig)
then the app crash with message "Message from debugger: Terminated due to signal 9"I have also tried setting the config
.allowIdfaReading = false
but still face a crash.I also tried this with new example project to prove that this happen and it's. Just simple project and adding code below
If select "Allow Tracking", App will crash and even next time relaunch app it will also crash due to authorization status is already
authorized
. However if select "Do not allow tracking" App won't crash and Adjust will initialize correctly.The text was updated successfully, but these errors were encountered: