Question

Calling enableAdServicesAttributionTokenCollection on iOS 14.5 seems to hang my app.

  • 5 September 2022
  • 2 replies
  • 268 views

Badge +4

Hi,

I just migrated to the latest RevenueCat SDK on iOS (from 3 → 4). I also setup SearchAds attribution, but I only want to use the standard attribution (I’m not showing ATT prompt). I am using the latest iOS SDK (4.11.0) via cocoa pods.

 

I noticed that on all iOS versions except 14.5, my app loads. On 14.5, it hangs after calling -enableAdServicesAttributionTokenCollection:

- (instancetype)init {
self = [super init];
if (self) {
_purchases = [RCPurchases configureWithAPIKey:@"[MY API KEY HERE]"];
#ifdef DEBUG
RCPurchases.logLevel = RCLogLevelError; //RCLogLevelDebug
#endif
if (@available(iOS 14.3, macOS 11.1, macCatalyst 14.3, *)) {
[_purchases.attribution enableAdServicesAttributionTokenCollection];
}
_purchases.delegate = self;
}
return self;
}

Any ideas why this might be happening? I’m importing iAd, AdServices, and RevenueCat. It works 100% when I comment out that function call.


Thanks!


2 replies

Userlevel 1
Badge +5

Same thing here! 

The app just freezes with this line (happens only in simulator)

if #available(iOS 14.3, *) {
Purchases.shared.attribution.enableAdServicesAttributionTokenCollection()
}

 

Unfortunately, the workaround to this problem is excluding this line on simulators:

if #available(iOS 14.3, *) {
#if !targetEnvironment(simulator)
Purchases.shared.attribution.enableAdServicesAttributionTokenCollection()
#endif

}

Any update in this?

Badge +4

Same here. I’ve just spent over an hour trying to figure out why my app freezes on the launch screen on the iOS 14.5 simulator. It boils down to `enableAdServicesAttributionTokenCollection`.

 

I’m surprised this hasn’t been addressed after being reported over 3 months ago!

Reply