question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS build fails: Stored properties cannot be marked potentially unavailable with '@available'

See original GitHub issue

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
 }()

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
JuxhinBcommented, Dec 1, 2022

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

1reaction
MohamedAhmed122commented, Nov 28, 2022

I have the same issue

Stripe version is 0.2.2. react-native version is 0.66.5

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found