#strawht-ios-crash

1 messages ยท Page 1 of 1 (latest)

stable irisBOT
exotic mountain
#

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.?

unkempt anchor
#

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

exotic mountain
#

How did you install the SDK exactly?

unkempt anchor
#

cocoapods

late grove
unkempt anchor
#

Stripe-Stripe does exist with the xcassets

late grove
#

Is Stripe.bundle present in the Stripe target in Pods.xcodeproj?

unkempt anchor
late grove
#

No, it should have Stripe.bundle in there, like this:

#

Are you in the Copy Bundle Resources section?

unkempt anchor
late grove
#

That might be the issue. If you add Stripe.bundle in there and try again do you get the same error?

unkempt anchor
#

huh, I don't have a Stripe.bundle

late grove
#

Maybe this changed since that issue... I haven't used Cocoapods in a while, but I thought it was still the same.

#

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

stable irisBOT
late grove
#

Any luck?

unkempt anchor
#

no

#

cache clean and re-install doesn't work

#

for fixing the crash on real device

#

it never crashed on simulator

late grove
#

What device are you using?

unkempt anchor
#

iphone 13 pro max, iOS 17.1.2

#

just tested this on Stripe 23.4.0 again and it did not crash

late grove
#

Hm. But it works in the simulator 100% of the time? It only ever crashes on that device?

unkempt anchor
#

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

late grove
#

๐Ÿค”

unkempt anchor
#

co worker's device is: iphone 14 pro max 16.2.0

late grove
#

Which simulator are you using?

unkempt anchor
#

iOS 17.0

late grove
#

Which device?

unkempt anchor
#

iphone 15 pro

late grove
#

Have you tried deleteing derivied data in Xcode?

unkempt anchor
#

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

late grove
#

You reset the device? Meaning you wiped it completely?

unkempt anchor
#

yeah

late grove
#

Wild. ๐Ÿ˜…

unkempt anchor
#

but i think it's weird that my pods configuration is not like what you're describing

late grove
#

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.

unkempt anchor
#

yeah i'll do that later today, can i return to this thread Monday?

late grove
#

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.

unkempt anchor
#

ty for your help

late grove
#

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.

unkempt anchor
#

@late grove I just test on an iOS 16.4 simulator and crash occurs

late grove
#

Welp. Next step is to try without CocoaPods then.

unkempt anchor
#

yup will do

#

thank you i'll return next week

unkempt anchor
#

issue is resolved with SPM

late grove
#

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.

unkempt anchor
#

i'll stick with SPM thanks