#romeoEIlam
1 messages · Page 1 of 1 (latest)
Ok
Pasting your messages here:
I updated the pod package to pod 'Stripe','23.7.0'
Now there are few issues in xcode
What are the issues exactly?
Declaration of 'StripeAPI' must be imported from module 'StripeCore.Swift' before it is required
for [StripeAPI setDefaultPublishableKey:
- I use objective c
Can you clarify exactly what your code is doing? Are you following a specific documentation page? If so, which one?
Yes
So in Appdelegate
The first registration
StripeAPI setDefaultPublishableKey
Used to work smoothly so far
Now it is throwing this error messsage
Did you import StripeAPI in your code?
Of course
It used to work before the update
Same with STPApplePayContext *applePayContext = [[STPApplePayContext alloc] initWithPaymentRequest:request delegate:self];
btw its seems all the classes in this api is swift and I'm using objective c
Maybe it's connected?
Give me a few minutes to look into this...
Cheers
Note that in your screenshots we can see your live secret key. So I recommend deleting the screenshots and maybe roll your keys.
I just deleted the screenshot for you.
Sure thanks!
Hey! Taking over for my colleague.
Yes I think that' the issue
Hi hi
In general, you can't import systematically a swift package into an objective C project...
unless if the package provides both implementation or the Swift class inherits from NSObject AFAIK...
So what can I do
I will leave the last version
But apple required to update to xcode 14
And in this one the last version didn't work
This is a shit show
The one that I used before was
pod 'Stripe', '21.4.0'
Just a minute, I see in the changelog that there were some fixes related to Objective-C
Try using this version:
https://github.com/stripe/stripe-ios/blob/master/CHANGELOG.md#2271-2022-08-31
Ok cool
I found a simple guide for implementing Apple Pay with Objective-C:
https://stripe.com/docs/apple-pay?platform=ios
I think you are missing some import too
Can you try add these imports:
@import Stripe;
@import StripeCore;
@import StripeApplePay;
#import <PassKit/PassKit.h>
Hi! I'm taking over my colleague. Please, let me know if you have any other questions.