Skip to main content
Question

Calling enableAdServicesAttributionTokenCollection on iOS 14.5 seems to hang my app.

  • Sep 4, 2022 11:16 PM UTC
  • 5 replies
  • 873 views

Forum|alt.badge.img+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!

This post has been closed for comments

5 replies

Forum|alt.badge.img+5
  • Member
  • Nov 6, 2022 11:28 AM UTC

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?


Forum|alt.badge.img+4
  • Dedicated Member
  • Dec 7, 2022 4:57 PM UTC

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!


Forum|alt.badge.img+2
  • New Member
  • Dec 9, 2024 10:46 AM UTC

Still happening for me using flutter, any update or solution? I see this first post is from 2 years ago.


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • Dec 9, 2024 12:56 PM UTC

Hi ​@uriparadeda,

Which version of the SDK are you using? And is this only happening for iOS 14.5?

 

Best,


Forum|alt.badge.img

Hi ​@uriparadeda,

Which version of the SDK are you using? And is this only happening for iOS 14.5?

 

Best,

I’m also seeing this issue happening to some users. If it’s any help I feel like it started when we added Superwall. 
Sdk:
react-native-purchases 8.2.3 

@superwall/react-native-superwall: 1.3.4,