purchases-ios
purchases-ios copied to clipboard
Crash on `configure(with:)` call in iOS 15.0
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
Describe the bug
PurchasesOrchestrator crashes with EXC_BAD_ACCESS on iOS 15.0.
- Environment
- Platform: iOS
- SDK version: 4.13.1
- StoreKit 2 (enabled with
useStoreKit2IfEnabled) (Y/N): N - OS version: 15.0
- Xcode version: 13.4.1
- How widespread is the issue. Percentage of devices affected. Don't know.
- Debug logs that reproduce the issue
[Purchases] - DEBUG: ℹ️ Looks like you're using a legacy API key.
This is still supported, but it's recommended to migrate to using platform-specific API key, which should look like 'appl_1a2b3c4d5e6f7h'.
See https://rev.cat/auth for more details.
[Purchases] - DEBUG: 👤 Identifying App User ID
- Steps to reproduce, with a description of expected vs. actual behavior
- Configure the SDK:
Purchases.configure(
with: Configuration.Builder(withAPIKey: apiKey)
.with(usesStoreKit2IfAvailable: false)
.build()
)
- Launch the app on iOS 15.0 device (iPhone 6s if matters).
- Wait for a crash (
PurchasesOrchestrator.swift:44,EXC_BAD_ACCESS)
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Screenshots from our QA as this is not reproducible on iOS greater than 15.0.

Additional context N/A
👀 SDKONCALL-146 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hey @sochalewski, I'm trying to reproduce this - I'll follow up when I have more information.
Hey @sochalewski, unfortunately I haven't been able to reproduce this issue. Can you try re-installing the SDK and cleaning Xcode (cmd + shift + K) and trying again?
@codykerns Interesting… 🤔 Unfortunately I cannot as this does not happen on my device, but I believe it's not cache/derived data related as this occurs on builds from the TestFlight built on CI/CD as well.
Hey @sochalewski - sorry for the delay here. Escalating this with the team, we'll follow up again when we have more information.
@sochalewski are you able to reproduce this on the simulator? I just downloaded the iOS 15.0 runtime and can't reproduce it, and unfortunately I don't have an iOS 15.0 device.
Could you try this with ASan and TSan enabled? See
https://developer.apple.com/documentation/xcode/diagnosing-memory-thread-and-crash-issues-early
That would help us figure out what's happening. Thanks.
This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.