#wangxiaofei0990
1 messages · Page 1 of 1 (latest)
HI
can you share the crash report?
OK
StripePayments/STPBINController.swift:193: Fatal error: Unexpectedly found nil while unwrapping an Optional value
2023-09-14 14:27:27.209938+0800 lotus[11197:2159642] StripePayments/STPBINController.swift:193: Fatal error: Unexpectedly found nil while unwrapping an Optional value
alex, are you still there?
are you using the latest SDK version?
No version specified.
When scanning, I just scanned something at random, such as a keyboard, a trademark, etc.
This was also discovered by accident, not deliberately scanning for other things.
can you file a issue in the relevant Github repo, the team will follow up and respond there
https://github.com/stripe/stripe-ios/issues @hushed ivy you can file the issue here
Let me take a look
this link
Hello Alex, when will you reply to this issues?
it's a different team that will take a look and respond. I don't have a specific time that I can share
Hi @hushed ivy in the same github ticket, can you also attach the images that you were scanning?
Hi! I'm taking over this thread.
Thanks, now you'll need to wait for the relevant team to answer that github issue.
Okay, thank you. Is there any API that allows me to hide this scan button first?
Thank you, I'll take a look.
NSCameraUsageDescription,This cannot be removed and has other uses.
What do you mean?
what do you mean by "entrance"?
Scan card
If you want to ebale/disable scard scan, follow this: https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet#ios-card-scanning
Correct
This permission has other uses and I can't remove it.
Not sure, having a look
I also need this permission for my own business, so I can't remove it.
Looks like there is an opion paymentConfiguration.cardScanningEnabled that you can set to false.
Which version of stripe-ios are you using?
This
So yes you need to update your code to include this line paymentConfiguration.cardScanningEnabled = false
Which SDK do I need to use, or which version?
The same you are currently using.
I mean, these apis are not available in the integrated pod 'StripePaymentSheet'.
Looking into this.
You would need to use the STPPaymentConfiguration class and this https://stripe.dev/stripe-ios/stripe/documentation/stripe/stppaymentconfiguration/cardscanningenabled/
Correct, but since you are using NSCameraUsageDescription, I think setting it to false could fix your issue.
😰
I also need this permission for my own business, so I can't remove it.
Exactly, that what I'm saying. If you have to keep NSCameraUsageDescription, then use https://stripe.dev/stripe-ios/stripe/documentation/stripe/stppaymentconfiguration/cardscanningenabled/ and set it to false.
This is the permission of the system camera.
The solution to disable camera scan:
use the STPPaymentConfiguration class and
paymentConfiguration.cardScanningEnabled = falsehttps://stripe.dev/stripe-ios/stripe/documentation/stripe/stppaymentconfiguration/cardscanningenabled/
It does not control the StripePaymentSheet panel.
Checking
You're right in that STPPaymentConfiguration doesn't control the Payment Sheet. Outside of that I don't think it's possible to disable card scanning in the Payment Sheet if you app uses NSCameraUsageDescription. Confirming
Because the scan crashes, I want to use plan B to hide the scan entrance first.
If it crashes, then I'd recommend filing a bug report at the GH repo
But yes, you can't disable it if your iOS has that entitlement
I'd recommend working with the iOS team on a resolution there
Equally, you could file an issue on GitHub requesting that the card scanning be configurable in Payment Sheet
If I can't remove the plist, the scan will crash.
Yep, I understand. And you've filed a GH issue on the SDK repository which is the correct process
The team will triage that issue and work with you on GitHub to hopefully resolve the crash
My team cannot help directly fix that potential bug now
Well, the release of my App can only be postponed.
We're looking at your GH issue and trying to reproduce it now
That's great, thank you very much!
Unfortunately our team has been unable to reproduce. I'd recommend referring to the GH issue you created. The team is predominantly US based so they'll be online later and I suspect they'll triage it then
I'd recommend sharing any extra context on the GH issue
We can't help any further here I'm afraid
We tested entering the bank card number and entered an 8, and it crashed, which was consistent with the scanning crash information.
Please share this on GH where the team can actually help resolve your issue. It'll be lost here
OK