triniwiz / nativescript-plugins

Apache License 2.0
78 stars 50 forks source link

[nativescript-stripe] Not working on Xcode 14.3 #178

Open jitendraP-ashutec opened 1 year ago

jitendraP-ashutec commented 1 year ago

nativescript-stripe version 8.0.3 is not working after updating Xcode 14.3. I am getting below error.

 error: stored properties cannot be marked potentially unavailable with '@available'
    @available(iOS 13, macCatalyst 14, *)
     ^
Command SwiftCompile failed with a nonzero exit code

Do you have any suggestion how to fix it?

mreall commented 1 year ago

I get a similar error. When I attempt to build in Xcode I get the error No such module 'Stripe' in the file TNSStripe.swift. Has anyone built the latest version for iOS? It works for me on Android. (Turns out I was opening the xcodeproj instead of the xcworkspace.)

When I try to build in Xcode I get the same error in the file platforms/ios/Pods/Stripe/Stripe/CardDetailsEditView.swift which makes me think this is a Swift issue instead of a plugin issue.

I'm on NativeScript 8.5.3.

mreall commented 1 year ago

I was able to get my app to build on iOS with the following updates:

Replace the contents of node_modules/@triniwiz/nativescript-stripe/platforms/ios/Podfile with the following (see #149):

use_frameworks!
platform :ios, '14.0'
pod 'Stripe', '~> 22.5.0'
pod 'Stripe/Stripe3DS2', '~> 22.5.0'

Add/update the following line in App_Resources/iOS/build.xcconfig:

IPHONEOS_DEPLOYMENT_TARGET = 14.0