Skip to main content
Question

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

  • September 14, 2022
  • 6 replies
  • 1833 views

Forum|alt.badge.img+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? 

This post has been closed for comments

6 replies

imougy
Forum|alt.badge.img+9
  • Active Helper
  • September 16, 2022

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


EgalNet
Forum|alt.badge.img+2
  • New Member
  • September 19, 2022

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)

 


imougy
Forum|alt.badge.img+9
  • Active Helper
  • September 19, 2022

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.

 

 


EgalNet
Forum|alt.badge.img+2
  • New Member
  • September 20, 2022

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


EgalNet
Forum|alt.badge.img+2
  • New Member
  • September 20, 2022

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


imougy
Forum|alt.badge.img+9
  • Active Helper
  • September 20, 2022

Thanks for the update!