iOS build fails: Stored properties cannot be marked potentially unavailable with '@available'
See original GitHub issueAfter 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
}()
Issue Analytics
- State:
- Created 10 months ago
- Comments:9
Top Results From Across the Web
Xcode 14 build error: Stored properties cannot be marked ...
After doing some experimentation, I believe the most straightforward approach would be to wrap the class around another class that will ...
Read more >Xcode 14 beta error: Stored properties cannot be marked ...
I have this error in Flutter project in XCode 14. One of the external packages were using: @available(iOS 14.0, *) My current fix...
Read more >stored properties cannot be marked potentially unavailable ...
stored properties cannot be marked potentially unavailable with '@available ' iPhone 14.
Read more >Xcode 14 compile error using @avai… - Apple Developer
This worked fine until the release of Xcode 14 which now flags a compile error: Stored properties cannot be marked potentially unavailable with...
Read more >Why is @available property wrapper allowed but stored ...
It's actually a bug fixed on the main branch. Conditionally-available property wrappers are not allowed for the same reason as conditionally- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 have the same issue
Stripe version is 0.2.2. react-native version is 0.66.5