iOS build fails: Stored properties cannot be marked potentially unavailable with '@available'
After updating xCode to v14.1 I'm unable to build project anymore.
Stripe version is 0.2.2.
Error is at CardDetailsEditView.swift,
Stored properties cannot be marked potentially unavailable with '@available'
@available(iOS 13, macCatalyst 14, *)
lazy var cardScanningView: CardScanningView? = {
if !STPCardScanner.cardScanningAvailable() {
return nil // Don't initialize the scanner
}
let scanningView = CardScanningView()
scanningView.alpha = 0
scanningView.isHidden = true
return scanningView
}()
I have the same issue
Stripe version is 0.2.2. react-native version is 0.66.5
Same issue, if someone have an idea ...
After updating xCode to v14.1 I'm unable to build project anymore.
Stripe version is 0.2.2.
Error is at
CardDetailsEditView.swift,
Stored properties cannot be marked potentially unavailable with '@available'@available(iOS 13, macCatalyst 14, *) lazy var cardScanningView: CardScanningView? = { if !STPCardScanner.cardScanningAvailable() { return nil // Don't initialize the scanner } let scanningView = CardScanningView() scanningView.alpha = 0 scanningView.isHidden = true return scanningView }()
I updated my stripe-react-native to the latest version. After that you will have to update the FlipperKit versions. The build is now working.
for the flipper version in your pod file :
versions['Flipper'] ||= '~> 0.88.0'
versions['Flipper-Folly'] ||= '~> 2.6.7'
versions['Flipper-RSocket'] ||= '~> 1.4.3'
@Hadi-G I don't actually have flipper at all. I am working in an old project with expo
"expo": "^40.0.1",
"react-native": "^0.61.5"
@JuxhinB Flipper is issue is a consequence of the update of stripe-react-native, so may be you are not concerned.
Have you tried to update the stripe-react-native package to a recent version ?
@Hadi-G there many libraries, which make use of that version of react-native, updating it would break many things and require me to upgrade also other libraries. This is a situation I'm stuck with older but stable version of libraries related to each other.
npx react-native info results
System: OS: macOS 12.5.1 CPU: (10) x64 Apple M1 Pro Memory: 284.89 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 14.20.0 - ~/.nvm/versions/node/v14.20.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v14.20.0/bin/yarn npm: 8.19.2 - ~/.nvm/versions/node/v14.20.0/bin/npm Watchman: 2022.11.28.00 - /opt/homebrew/bin/watchman SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8815526 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild npmPackages: react: ^16.9.0 => 16.9.0 react-native: ^0.61.5 => 0.61.5
I managed to solve my issue, I needed to downgrade my xcode version to 13.7. I updated because I was trying to fix this issue indeed : RN 0.63.4 main.jsbundle does not exist. This must be a bug with'
And the answer of my issue was in this comment: https://github.com/facebook/react-native/issues/31094#issuecomment-796743154
I managed to solve my issue, I needed to downgrade my xcode version to 13.7. I updated because I was trying to fix this issue indeed : RN 0.63.4 main.jsbundle does not exist. This must be a bug with'
And the answer of my issue was in this comment: facebook/react-native#31094 (comment)
Hey @JuxhinB I am also having old project and I am having XCode 14.1. Is there any way of solving this error?
I have this issue too. recently update to Xcode 14.2
I am also facing the same issue my project. is only working if run the project on older xcode version it is not running on xcode 14 and above.. any solution....??
I am also facing the same issue my project. is only working if run the project on older xcode version it is not running on xcode 14 and above.. any solution....??
I have to install the last version of "stripe-react-native".
npm i @stripe/[email protected] then
pod deintegrate
pod update and
pod install
I am also facing the same issue my project. is only working if run the project on older xcode version it is not running on xcode 14 and above.. any solution....??
I have to install the last version of "stripe-react-native".
npm i @stripe/[email protected]thenpod deintegratepod updateandpod install
Thanks it worked.....👍
What if wee want to keep the older version ? there's a lot of changes in the newest version...
I am also facing the same issue my project. is only working if run the project on older xcode version it is not running on xcode 14 and above.. any solution....??
I have to install the last version of "stripe-react-native".
npm i @stripe/[email protected]thenpod deintegratepod updateandpod install
Thanks! it's working for me
What if wee want to keep the older version ? there's a lot of changes in the newest version...
Hey @hugoh59, do you find any solution on this one?