Skip to main content
Question

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

  • Sep 14, 2022 6:07 PM UTC
  • 6 replies
  • 2165 views

Forum|alt.badge.img+6

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
  • Sep 16, 2022 9:53 PM UTC

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


EgalNet
Forum|alt.badge.img+2
  • New Member
  • Sep 19, 2022 2:55 PM UTC

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
  • Sep 19, 2022 3:21 PM UTC

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
  • Sep 20, 2022 6:41 AM UTC

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


EgalNet
Forum|alt.badge.img+2
  • New Member
  • Sep 20, 2022 8:27 AM UTC

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
  • Sep 20, 2022 12:43 PM UTC

Thanks for the update!