Skip to main content
Question

Calling enableAdServicesAttributionTokenCollection on iOS 14.5 seems to hang my app.

  • September 4, 2022
  • 5 replies
  • 427 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!

5 replies

Forum|alt.badge.img+5
  • Member
  • 6 replies
  • November 6, 2022

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
  • 18 replies
  • December 7, 2022

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+1
  • New Member
  • 1 reply
  • December 9, 2024

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
  • 313 replies
  • December 9, 2024

Hi ​@uriparadeda,

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

 

Best,


joan-cardona wrote:

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,


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings