#mukesh-error
1 messages · Page 1 of 1 (latest)
earlier i was using tipsi stripe for stripe payment and now i migrated to @vocal crypt/react-native-stripe
and getting error in formSpecProdvider,swift file
are you using it with expo?
react-native
and looks like it is not finding the bundle and resources there but it complied well and gives error when opening the payment sheet
i commented that line too, then the payment Sheet opens but some UI issue comes
like zip code and expire date not aligned well
and i created a test app then it works well
i compared all settings and it looks similar
getting error on following line
private let formSpecsURL = StripeBundleLocator.resourcesBundle.url(forResource: "form_specs", withExtension: ".json")!
👋 stepping in
Hello
Are you using an example somewhere or are you writing your own app?
Looks like form_specs.json can not be found
i am writing my own app and using @vocal crypt/react-native-stripe for stripe payment
I could try to help but it sounds like a react native issue other than the Stripe SDK issue to me. Have you successfully imported any other json?
Where do you put that json and does that folder has any other readable json at all?
it is not a json issue
it is resource not finding issue
and looks like stripe.bundle is not copied with the app
Is this your own code?
private let formSpecsURL = StripeBundleLocator.resourcesBundle.url(forResource: "form_specs", withExtension: ".json")!
no
this is code from formspecprovider.swift file in stripe sdk
just giving info on which line it is giving issue
now is it more clear ?
Okie I see, thanks. Wondering if this is part of the call to present the PaymentSheet?
as i think it is part of setting while integrating the stripe sdk
as when i see the app, stripe.bundle was not there
whereas in test app it was there
That's weird. Test vs Live that you mean the publishable key used, or building in Debug mode vs Release mode for iOS?
no, i made a test app to look out the issue
and there it is doing well
but not with my original app
this is the line where i get the issue
when i comment this line, it opens the payment sheet
but UI is not good
let me comment this line and show you
2 mins
So i commented this line
and now i run
see now it shows like this
card number not showing fully
it is more clear now ?
Yes, because of the missing specs.json I think. The real problem is why it is missing on your app setup
yes
let me show the app package content
there it will not have the stripe.bundle file
see ?
here it does not have stripe.bunlde file
it is content of other test app where it has stripe.bundle file
so i guess some setting in pod etc
now more clear ?
where is issue ?
it is copy bundle resource setting of the app
here i have specified to copy the stripe.bundle file
but that also not working
Umm it's hard to say. pod install surely worked right? You have the actual Stripe pod inside Pods but it's just not included?
On your current target, click on "General" and check "Frameworks, Libraries, and Embeded Content"
What do you see?
here it is
Okie, how is it compared to the working Test app?
here it is
libPods-MobileOrderingApp.a should contain it hmm
can you show me your Podfile.lock?
Okie that's perfectly fine..
Me too. Another check, can you open "Build Phases", locate "Link Binary with Libraries"?
here it is
Why do you have also libStripe.a ? I notice the test app also doesn't have it
Let's remove it from both here and General" and check "Frameworks, Libraries, and Embeded Content" and try
ok
same issue
still same
libStripe.a, i added this file while trying many thing
but still same
I am running out of ideas. Can you try to remove the both libStripe.a, libPods-MobileOrderingApp.a, also remove Pods folder, then run this step again?
i think it should be something here
removed all the Pods folder and pod install again?
yes
Hi @tepid silo I'm taking over this thread. Let me know if you have any other questions.
Is it still the error about form_specs.json missing?
Hmm, I'm running our of ideas. Can you try manually import the missing resource to xcode worksapce and try again? i.e., this is the form_specs.json https://github.com/stripe/stripe-ios/blob/master/Stripe/Resources/form_specs.json
actually that file is there with sdk itself
see ?
so importing is not an issue i guess
and it is not abt only form_sepcs
or is there any work around to show that card number properly without that form_Sepc file ?
Sorry I'm not an iOS expert, can you create an issue in iOS SDK github repo and see if others can help?
can u give me link where i can create the issue ?