Skip to main content
Question

[iOS] App crashes when RevenueCat tries to get terms of service

  • 15 June 2024
  • 2 replies
  • 117 views

When running my app, I show a paywall as activation for the app (similar to Netflix). Right when the app launches, on Thread 1, the app gives an EXC_BAD_ACCESS and the app terminates.

This error happens in the core RevenueCat package, in RevenueCat > Sources > Paywalls > PaywallData.swift

Under “extension PaywallData” in “public struct Configuration”, the exception is called on line 224 (line 3 in this codeblock):

/// If set, the paywall will display a terms of service link.
public var termsOfServiceURL: URL? {
get { self._termsOfServiceURL }
set { self._termsOfServiceURL = newValue }
}

The full error is: Thread 1: EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff8)

This is my console logs:

10.27.0 - >GoogleUtilities/AppDelegateSwizzler]tI-SWZ001014] App Delegate does not conform to UIApplicationDelegate protocol.
DEBUG: ℹ️ Configuring SDK using RevenueCat's UserDefaults suite.
DEBUG: 👤 Identifying App User ID
DEBUG: ℹ️ Debug logging enabled
DEBUG: ℹ️ SDK Version - 4.43.0
DEBUG: ℹ️ Bundle ID - com.insightfull.Insightfull
DEBUG: ℹ️ System Version - Version 17.4 (Build 21E213)
DEBUG: ℹ️ Using a simulator. Ensure you have a StoreKit Config file set up before trying to fetch products or make purchases.
See https://errors.rev.cat/testing-in-simulator for more details.
DEBUG: 👤 No initial App User ID
DEBUG: ℹ️ Purchases is configured with response verification disabled
DEBUG: ℹ️ applicationWillEnterForeground
DEBUG: ℹ️ CustomerInfo cache is stale, updating from network in foreground.
DEBUG: ℹ️ ProductEntitlementMapping cache is stale, updating from network.
DEBUG: ℹ️ Offerings cache is stale, updating from network in foreground
DEBUG: ℹ️ GetProductEntitlementMappingOperation: Started
DEBUG: ℹ️ Found 1 unfinished transactions, will post receipt in lieu of fetching CustomerInfo:
a<StoreTransaction:
identifier="0"
product="insightfull_activation_yearly_plan"
date="2024-06-08 23:10:35 +0000"
quantity=1
>]
DEBUG: ℹ️ There are no requests currently running, starting request GET /v1/product_entitlement_mapping
DEBUG: ℹ️ API request started: GET '/v1/product_entitlement_mapping'
DEBUG: ℹ️ TransactionPoster: handling transaction '0' for product 'insightfull_activation_yearly_plan' (date: 2024-06-08 23:10:35 +0000)
DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple.
DEBUG: ℹ️ SKReceiptRefreshRequest started
AuthService: User was set (initially), getting stored user User(id: "t85fN8bIwvaRArclZwWYddIfzpC3", name: "Rohan Rocks", imageURL: Optional(https://firebasestorage.googleapis.com:443/v0/b/insightfull-8342c.appspot.com/o/users%2Ft85fN8bIwvaRArclZwWYddIfzpC3?alt=media&token=283364ac-588a-40fe-8119-1e311c8699df))
AuthService: User was set (initially), getting stored user User(id: "t85fN8bIwvaRArclZwWYddIfzpC3", name: "Rohan Rocks", imageURL: Optional(https://firebasestorage.googleapis.com:443/v0/b/insightfull-8342c.appspot.com/o/users%2Ft85fN8bIwvaRArclZwWYddIfzpC3?alt=media&token=283364ac-588a-40fe-8119-1e311c8699df))
DEBUG: ℹ️ ProductEntitlementMapping cache is stale, updating from network.
DEBUG: ℹ️ StoreKit1Wrapper (0x0000600002609c20) updatedTransaction: insightfull_activation_yearly_plan 0 1
DEBUG: ℹ️ Found 1 unfinished transactions, will post receipt in lieu of fetching CustomerInfo:
U<StoreTransaction:
identifier="0"
product="insightfull_activation_yearly_plan"
date="2024-06-08 23:10:35 +0000"
quantity=1
>]
DEBUG: ℹ️ TransactionPoster: handling transaction '0' for product 'insightfull_activation_yearly_plan' (date: 2024-06-08 23:10:35 +0000)
DEBUG: ℹ️ Throttled request to refresh receipt.
DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: $RCAnonymousID:0e0c5554251e4d789ee6dbf6e47bb070
DEBUG: ℹ️ Loaded receipt from url file:///Users/rohanrocks/Library/Developer/CoreSimulator/Devices/75214513-8492-4D35-BBE0-BE483A2BE693/data/Containers/Data/Application/AC6E5314-ED79-4010-A796-CE77DA5639DB/StoreKit/receipt
DEBUG: ℹ️ No existing products cached, starting store products request for: -"insightfull_activation_yearly_plan"]
DEBUG: ℹ️ TransactionPoster: handling transaction '0' for product 'insightfull_activation_yearly_plan' (date: 2024-06-08 23:10:35 +0000)
DEBUG: ℹ️ Throttled request to refresh receipt.
DEBUG: ℹ️ Loaded receipt from url file:///Users/rohanrocks/Library/Developer/CoreSimulator/Devices/75214513-8492-4D35-BBE0-BE483A2BE693/data/Containers/Data/Application/AC6E5314-ED79-4010-A796-CE77DA5639DB/StoreKit/receipt
DEBUG: ℹ️ Found an existing request for products: a"insightfull_activation_yearly_plan"], appending to completion
DEBUG: ℹ️ Network operation 'GetProductEntitlementMappingOperation' found with the same cache key 'GetProductEntit…'. Skipping request.
DEBUG: ℹ️ Network operation 'GetOfferingsOperation' found with the same cache key 'GetOfferingsOpe…'. Skipping request.
DEBUG: ℹ️ SKReceiptRefreshRequest finished
DEBUG: ℹ️ Loaded receipt from url file:///Users/rohanrocks/Library/Developer/CoreSimulator/Devices/75214513-8492-4D35-BBE0-BE483A2BE693/data/Containers/Data/Application/AC6E5314-ED79-4010-A796-CE77DA5639DB/StoreKit/receipt
DEBUG: ℹ️ Found an existing request for products: 0"insightfull_activation_yearly_plan"], appending to completion
DEBUG: 😻 Store products request received response
DEBUG: 😻 Store products request finished

 

This post has been closed for comments

2 replies

Badge

Anyone still know how to fix this?

Userlevel 3
Badge +5

Hi! I know that you were already helped in your individual support ticket, Rohan, but just in case anyone else comes across your community post, I just wanted to share the information that you received in the ticket. This issue has been seen when using Xcode 16 beta 1. This error seems to match an error we have identified when compiling with Xcode 16 and running on an iOS 17 device or emulator. We have found the root cause and reported the bug to Apple: https://github.com/RevenueCat/purchases-ios/issues/3949. As a workaround, we recommend that developers use Xcode 15 to test on iOS 17 devices, and Xcode 16 to test on iOS 18 devices.