purchases-ios: Showing CustomerCenterView() crashes the app since my rollout today
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Since today’s launch of my App in the Apple App Store, whenever you want to show CustomerCenterView(), my App crashes immediately.
When I go back to former versions, no crash happens, but instead of the regular CustomerCenterView I see a message “Update verfügbar. Bitte die App aktualisieren, damit alles korrekt funktioniert.” (Translated: “Update available. Please update the app to ensure everything works correctly.”) Below there are 2 buttons, one to Upgrade, which leads to my app’s App Store page, and the other to continue. When I press continue in the old versions, the regular customer center appears.
But as I said: With my new version it crashes immediately.
-
Environment
- Platform: iOS 17 / iOS 18
- SDK version: 5.14.6 and 5.17.0
- StoreKit version:
- StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with
.with(storeKitVersion: .storeKit1)) - StoreKit 2 (default on versions >=5.0.0)
- StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with
- OS version:
- Xcode version: 16.2
- Device and/or simulator:
- Device
- Simulator
- Environment:
- Sandbox
- TestFlight
- Production
- How widespread is the issue. Percentage of devices affected. Apple released my App in the new version and all of my devices (3) and all of the simulators crash.
-
Debug logs that reproduce the issue. Complete logs with
Purchases.logLevel = .verbosewill help us debug this issue.
When I set a breakpoint to All Exceptions, it stops in the "structure MyApp: App" line with:
"Thread 1: "-[__SwiftValue set]: unrecognized selector sent to instance 0x600000c263d0""
- Steps to reproduce, with a description of expected vs. actual behavior
Call a SwiftUI View, which includes CustomerCenterView(). It should open and display the data. But it crashes the whole app.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 22 (11 by maintainers)
Hi @facumenzella, sorry for not responding! Currently I’m under heavy workload and I don’t have a chance to test with the new version. I’ll try to test it, when I have a little spare time.
I’ve sent them also to your gmail address. Did that work?
Hi Facundo, I’ve sent you the files twice (friday and wednesday). Did you receive my e-mail(s)? Perhaps they are in your spam folder? Greetings, Eike
I don’t think it’s related tbh. Just so you know you can disable it 😃
Whenever you have the logs, please also attach the user ID. That will narrow down the issue 🙏 @ikemuc
@ikemuc for the heads up, you can disable the update warning from the dashboard.
@ikemuc would it be too much to ask for the logs =)?
Stacktrace is:
I tried it: CustomerCenterView() still crashes…
BTW: I reduced the pressure on me by replacing CustomerCenterView() with my old code in a nightly emergency rollout of a new version of SunOnly. So for me the fix isn’t time critical any more…
Some more research:
The crash also happens, when I build my App with purchases-ios 5.14.0 (the first version with CustomerCenterView).
I tried somethings else: When I switch the simulator or the device to airplane mode before opening the view containing CustomerCenterView(), I get an error message (“Es ist etwas schief gelaufen”, i.e. “Something went wrong”) instead of the crash.
=> Could this be a RevenueCat server problem? It looks like this, because my earlier app versions, which were working without any problems now show this strange “Update” warning…
Even simpler - This is enough:
This is the code currently:
` import Foundation import SwiftUI import RevenueCatUI
struct CustomerCenterSheetView: View { @Environment(MainModel.self) var mainModel @Environment(.presentationMode) var presentationMode
} `
👀 We’ve just linked this issue to our internal tracker and notified the team. Thank you for reporting, we’re checking this out!