#hodgln
1 messages ยท Page 1 of 1 (latest)
No, you can test apple pay in test mode as well
Okay, I believe we spoke yesterday about this
What's the problem?
When I created a new build and tried to open apple pay, the app crashed on testflight
Do you have the crash log?
I am using expo and have uploaded my apple pay certificate to stripe and enabled apple pay on there. I have checked that apple pay is enabled on app store connect and checked that the merchant ID is correct on there. I have checked app.json for merchant ID and it matches. Also when running expo config --type introspect it returns the merchant ID under com.apple.developer.in-app-payments.
However isApplePaySupported returns false.
yes one second
NSInvalidArgumentException: -[__NSFrozenDictionaryM _fastCStringContents:]: unrecognized selector sent to instance 0x280e86cc0
This is the exception thrown
So when does it crash? the moment you press the apple pay button?
yeah
But isApplePaySupported still returns false
so I am voiding that and trying to open apple pay anyways
๐
Is the the full crash log? It doesn't tell which line in your code
and did it work on development build (not Testflight)?
before you can get it work on hand, don't try TestFlight
You would want to register your iPhone as a test device in your Apple Provisioning profile, then test your app with your iPhone first
Then you can even put breakpoint and see full crashlog in Xcode
It said triggered by thread 16
I was under the impression that apple pay doesnt work in development, only production builds?
That's too obscured and we wouldn't be able to debug
It works, with a Test mode key, you just need to use your real credit card (it won't charge)
Even in expo go?
Yep I believe
thats why I've been creating testflight builds for it
Here's the whole crash log
(minus the info at the start)
Spareseat or Facebook, do you have them in your project
I doubt this could be red herring
Or that's simply ReactNative
Spareseat is the name of the app, facebook no, I will double check though
Anw, if isApplePaySupported returns false and you still try to push the button then it's not surprised to crash
You would need to investigate on isApplePaySupported first. Did you try the usePlatformPay function yesterday?
no I can't because I use expo which caps the version of stripe at 0.19.0
unless I eject which I don't plan on doing
I just want to figure out whether its a config mistake I've made
It would be easier if you upgrade to latest version (0.23.0) 0.19 is quite an old one
I do think there is some config mistake, but there are possibilities of version mismatch or supported, and by upgrading we can avoid all those kind of errors
Okay
And the last comment in above thread worth trying IMO
hi, in build setting / swift copiler - code generation / change optimization level for release to 'No Optimization'
Okay, what will this do?
What are the config steps I need to take?
I'm pretty sure I have done all
I have heard something about uploading a certificate to my server though? Don't know if that could be causing it as I haven't done that (was not on stripe's docs)
Don't think that is necessary. Let upgrade to newest version and try usePlatformPay first
Okay, is there any other way? I would really like to avoid ejecting my app as it has saved me a lot of hassle up to now and could cause breaking changes
I am going to try and downgrade the version of stripe and try again
Hmm downgrade the version of stripe?
Yeah
I can't really upgrade it unless I want to eject the app, which I don't massively at this stage
So any other way would be ideal
Let me try to validate your ApplePay setting.
First can you screenshot me your Merchant ID setting in Apple Dev center? It should looks like this
Nice. That certificate comes from Stripe Dashboard, correct?
Next, can you screenshot me your Dashboard ApplePay certificate setting? like this
Great. Spot check, when you created the merchant Id on App Dev center, did you choose "No" for China mainland?
I may have done? honestly can't remember
I don't plan on processing payments in China so probs ticked no
Okie
Now open your iOS workspace by Xcode, do you have this ApplePay abilities section?
You will still have the .xcworkspace file, or .xcodeproj
Not in my pre build files, will try and check the build files
Being able to view these files requires that I eject my app
So I cannot view them, but I am sure the ios entitlements command is legit
Umm that's the last step required. I doubt maybe something is missing
Confirm the configuration in Xcode is one last step
As I use expo I am not able to view these files though, and even though I can download an ipa file i can't derive those files from it
So you think something is missing or not?
๐ taking over for my colleague. Let me catch up.
Sure, thanks
would you mind summarizing the issue/ask?
So isApplePaySupported is returning false
But I'm pretty sure I have all of the relevant config stuff set up
basically wanted to know whether this was a config issue or one with my code
your colleague seemed to look into a lot of the config but as I use expo (+ I don't want to eject at this late stage of the apps development) he wasn't able to confirm whether it was a config issue or not
If you don't mind I think the best course of action here is to send us an email https://support.stripe.com/contact/email?topic=api_integration with a link to this discord thread
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I think it could be a config issue, but we wouldn't know for sure if we can't see your Xcode opening
We want to see the checkmark here
I understand it requires ejecting your app and might not be easy, but really it's the only path forward, and also to upgrade your version to 0.23. I think it worth investing your efforts since we have tried all other possible diagnostic
Feel free to write us an email like my colleague suggested and include a link to this thread. We can provide continued support over there too
https://docs.expo.dev/build-reference/ios-capabilities/#manual-setup how about the command xed ios to open the ios directory here?