#strawht-ios-crash
1 messages ยท Page 1 of 1 (latest)
strawht-ios-crash
@unkempt anchor we haven't seen a similar report before. Do you have more details? Like can you share how you initialize PaymentSheet/your code, whether it worked with another version, etc.?
not crashing from when I use the payment sheet, but when I grab the card brand image for a swiftUI view
HStack {
Image(uiImage: STPImageLibrary.cardBrandImage(for: paymentMethod.brand))
.resizable()
.frame(width: imageSize.width, height: imageSize.height)
.padding(.trailing, 7)
cardBody
}
}
we had recently upgraded from an old stripe SDK to this version. 23.4.0 -> 23.18.2
How did you install the SDK exactly?
cocoapods
Hello! I think this is probably a Cocoapods issue where it's not getting the assets into the project correctly. There's an old issue thread here with some things you can take a look at: https://github.com/stripe/stripe-ios/issues/1722
In particular, make sure the bundle resources being copied are correct: https://github.com/stripe/stripe-ios/issues/1722#issuecomment-834593132
Stripe-Stripe does exist with the xcassets
Is Stripe.bundle present in the Stripe target in Pods.xcodeproj?
yes
No, it should have Stripe.bundle in there, like this:
Are you in the Copy Bundle Resources section?
That might be the issue. If you add Stripe.bundle in there and try again do you get the same error?
huh, I don't have a Stripe.bundle
Maybe this changed since that issue... I haven't used Cocoapods in a while, but I thought it was still the same.
Can you try installing the Stripe SDK using one of the other methods here to rule out/determine if CocoaPods is the issue? https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet#setup-client-side
Another thing you can try is clearing your CocoaPods cache, then reinstall everything:
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
Please only run those commands if you understand what they do. ๐
Looking around, seems like this is a more up-to-date way to do the same thing: pod cache clean --all && pod deintegrate && pod install
Any luck?
no
cache clean and re-install doesn't work
for fixing the crash on real device
it never crashed on simulator
What device are you using?
iphone 13 pro max, iOS 17.1.2
just tested this on Stripe 23.4.0 again and it did not crash
Hm. But it works in the simulator 100% of the time? It only ever crashes on that device?
it crashes on some co-worker's real device as well
but always works on simulator
and we have nightly builds, it never crashes on device when installed from test flight only from debug
๐ค
co worker's device is: iphone 14 pro max 16.2.0
Which simulator are you using?
iOS 17.0
Which device?
iphone 15 pro
yes, and I just reset my test device the iphone 13 pro max which was on 17.1.0 and it no longer crashes.
I reset the 16.2.0 device and it crashes still
may be an issue with devices running iOS 16
You reset the device? Meaning you wiped it completely?
yeah
Wild. ๐
but i think it's weird that my pods configuration is not like what you're describing
That could just be the way CocoaPods works now. My knowledge there is out of date.
I think the real test would be to not use CocoaPods and see if you hit the same issue or not.
Like if you remove it from CocoaPods and manually install the Stripe SDK, or use Swift Package Manager to install it.
That would hopefully narrow it down to either an iOS bug or a CocoaPods bug.
yeah i'll do that later today, can i return to this thread Monday?
Not this thread, no, but you can ask for more help in #dev-help and we'll start a new thread. This thread will remain accessible, but it will be read-only.
You can bookmark the link to this thread to find it again, or you can search for it later.
ty for your help
No problem, I hope you can track it down and get it sorted out!
I feel like a CocoaPods issue is still likely, but the behavior across the different devices, simulators, and deployment methods is giving me pause.
@late grove I just test on an iOS 16.4 simulator and crash occurs
Welp. Next step is to try without CocoaPods then.
issue is resolved with SPM
Ah, okay, so it is something to do with CocoaPods.
You can stick with SPM, or you can review/reset/rebuild your CocoaPods configuration, or maybe reach out to the CocoaPods folks for help.
i'll stick with SPM thanks