Question

Stored properties cannot be marked potentially unavailable with '@available'

  • 14 September 2022
  • 6 replies
  • 1069 views

Badge +5

I just updated my xcode and my computer with the new apple updates that just came out and now RevenueCat is making my project not build correctly because i keep getting this error in one of their files “Stored properties cannot be marked potentially unavailable with '@available'” What should I do to fix this? 


6 replies

Userlevel 3
Badge +8

What is your Mac config?  Is it M1? what is your Xcode version?

Badge +2

I have the same problem.

Yes, it’s M1 with Xcode Version 14.0 (14A309).

 

For example, the compiler reports this line of code:

@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
lazy var storeKit2Listener = StoreKit2TransactionListener(delegate: self)

 

Userlevel 3
Badge +8

If you want a fast workaround until the fix, please tap on your xcode app and check Open using Rossetta. @Jens, I can’t reproduce myself but I trust the issue exist.

 

 

Badge +2

Unfortunately even with Rosetta, Xcode fails to compile showing the same error.

Badge +2

I solved the problem using the latest version of RevenueCat (v4.12.0), I was using version 4.1.0

Userlevel 3
Badge +8

Thanks for the update!

Reply