#hodgln

1 messages ยท Page 1 of 1 (latest)

amber quiverBOT
kindred egret
#

No, you can test apple pay in test mode as well

terse prism
#

Okay, I believe we spoke yesterday about this

kindred egret
#

What's the problem?

terse prism
#

When I created a new build and tried to open apple pay, the app crashed on testflight

kindred egret
#

Do you have the crash log?

terse prism
#

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

kindred egret
#

This log doesn't really tell what the problem is

#

do you have the stack trace?

terse prism
#

okay

#

will find it

#

any update?

kindred egret
#

So when does it crash? the moment you press the apple pay button?

terse prism
#

yeah

#

But isApplePaySupported still returns false

#

so I am voiding that and trying to open apple pay anyways

heavy kernel
#

๐Ÿ‘‹

#

Is the the full crash log? It doesn't tell which line in your code

#

and did it work on development build (not Testflight)?

terse prism
#

I haven't tried development build yet

#

and no I can attach the full crash log though

heavy kernel
#

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

terse prism
heavy kernel
#

Then you can even put breakpoint and see full crashlog in Xcode

terse prism
#

It said triggered by thread 16

terse prism
heavy kernel
#

That's too obscured and we wouldn't be able to debug

terse prism
#

okay

#

do you need full crash report?

heavy kernel
#

It works, with a Test mode key, you just need to use your real credit card (it won't charge)

terse prism
#

Even in expo go?

heavy kernel
#

Yep I believe

kindred egret
#

Eh, no Apple Pay is not supported in Expo Go

terse prism
#

thats why I've been creating testflight builds for it

#

Here's the whole crash log

#

(minus the info at the start)

heavy kernel
#

Spareseat or Facebook, do you have them in your project

#

I doubt this could be red herring

#

Or that's simply ReactNative

terse prism
#

Spareseat is the name of the app, facebook no, I will double check though

heavy kernel
#

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?

terse prism
#

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

heavy kernel
#

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

terse prism
#

Okay

heavy kernel
#

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'

terse prism
#

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)

heavy kernel
#

Don't think that is necessary. Let upgrade to newest version and try usePlatformPay first

terse prism
#

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

heavy kernel
#

Hmm downgrade the version of stripe?

terse prism
#

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

heavy kernel
#

Let me try to validate your ApplePay setting.

terse prism
#

okay

#

thanks

heavy kernel
#

First can you screenshot me your Merchant ID setting in Apple Dev center? It should looks like this

terse prism
heavy kernel
#

Nice. That certificate comes from Stripe Dashboard, correct?

#

Next, can you screenshot me your Dashboard ApplePay certificate setting? like this

terse prism
#

Yes I'm pretty sure

#

yep

heavy kernel
#

Great. Spot check, when you created the merchant Id on App Dev center, did you choose "No" for China mainland?

terse prism
#

I may have done? honestly can't remember

#

I don't plan on processing payments in China so probs ticked no

heavy kernel
#

Okie

#

Now open your iOS workspace by Xcode, do you have this ApplePay abilities section?

terse prism
#

So I don't think this is possible as I use expo

#

Will double check though

heavy kernel
#

You will still have the .xcworkspace file, or .xcodeproj

terse prism
#

So when I run npx expo config --type introspect

#

I see this

terse prism
#

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

heavy kernel
#

Umm that's the last step required. I doubt maybe something is missing

#

Confirm the configuration in Xcode is one last step

terse prism
#

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

terse prism
high pawn
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

terse prism
#

Sure, thanks

high pawn
#

would you mind summarizing the issue/ask?

terse prism
#

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

high pawn
heavy kernel
#

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