Skip to main content
Solved

Errors building version 4.12.0 onwards (Xcode 13.2.1 13C100)


Forum|alt.badge.img+2

Success building iOS RevenueCat Framework 4.11.0 and earlier (Xcode 13.2.1 13C100)

Fails with errors building iOS RevenueCat Framework 4.12.0 and after (Xcode 13.2.1 13C100)

Reproduction: Empty project (iOS ‘Application’ template) with RevenueCat framework added via File > Add Packages. No additional changes or code.
(Xcode 13.2.1 is the final available for MacOS BigSur 11.6.5)

Suggestions?
 

Sample errors (see attachment):
 

purchases-ios/Sources/Support/ManageSubscriptionsHelper.swift:37:78: error: converting non-sendable function value to '@MainActor @Sendable (Result<CustomerInfo, BackendError>) -> Void' may introduce data races                                               fetchPolicy: .cachedOrFetched) { result in                                                                              ^

 

purchases-ios/Sources/Misc/OperationDispatcher.swift:58:47: error: converting function value of type '@MainActor @Sendable () -> Void' to '@convention(block) () -> Void' loses global actor 'MainActor'             DispatchQueue.main.async(execute: block)                                               ^

 

purchases-ios/Sources/Networking/CustomerAPI.swift:22:17: error: stored property 'customerInfoCallbackCache' of 'Sendable'-conforming class 'CustomerAPI' has non-sendable type 'CallbackCache<CustomerInfoCallback>'     private let customerInfoCallbackCache: CallbackCache<CustomerInfoCallback>                 ^
 

 

Best answer by imougy

Any reason not to upgrade to Xcode 14? You have to do it at one point anyway.

View original
Did this post help you find an answer to your question?
This post has been closed for comments

17 replies

Forum|alt.badge.img
  • New Member
  • 1 reply
  • October 12, 2022

Hi, have you gotten any solution yet?


Forum|alt.badge.img+2
1minutepay wrote:

Hi, have you gotten any solution yet?

No. I think understand the programmatic cause (same core issue for all errors: supporting the latest threading techniques in the Swift language), but I don’t understand it well enough to come up with a stable solution for all the errors. It may be related to bugs in Xcode (radar needs filing for fix, ideally as patch for 13.2.1), Swift (less likely) or something specific to my installation (possible).


Forum|alt.badge.img+4
  • New Member
  • 3 replies
  • October 18, 2022

I’m having the exact issue.. How I wish there’ll be at least a temporary solution. 


Fran Tovar
Forum|alt.badge.img+3
  • New Member
  • 3 replies
  • October 18, 2022

Same problem here :(


Forum|alt.badge.img+2
  • New Member
  • 2 replies
  • October 18, 2022

Any update to this? I desperately need a fix for this since I have a bug that only exists on macOS 11 in one of our apps that uses RevenueCat and I can’t compile it with Xcode 13.2.1 (direct download version).


imougy
Forum|alt.badge.img+9
  • Active Helper
  • 94 replies
  • Answer
  • October 19, 2022

Any reason not to upgrade to Xcode 14? You have to do it at one point anyway.


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • October 20, 2022
imougy wrote:

Any reason not to upgrade to Xcode 14? You have to do it at one point anyway.

Using an old mac(2014) as build machine in my case.


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • October 28, 2022

Is there still an issue for flutter for that version? I tried with the new package but still get errors.


Forum|alt.badge.img+2
  • New Member
  • 2 replies
  • October 31, 2022

Any update on how to fix this? Currently on MAC OS 12.3.1 and can only update to 13.2.1 for xcode… 


Forum|alt.badge.img+2
imougy wrote:

Any reason not to upgrade to Xcode 14? You have to do it at one point anyway.

Yes – I won’t have access to a new machine before I need to make the choice: do I use RevenueCat or a competitor. For me this issue is the deal breaker as the competitor compiles fine. The fix for the bug(s) looks quite possible but is beyond the time / capability I have at present.
(Aside: Xcode 14 will not run on the latest OS that will run on my current machine.)


Forum|alt.badge.img+2

I’ve raised this as an urgent issue with the RevenueCat team including a request to post replies here so we can all benefit.


Forum|alt.badge.img+2
  • New Member
  • 2 replies
  • October 31, 2022

I need to be able to run it on macOS 11 because of a bug that affects that OS version, and Xcode 14 won’t run on it.

However, I was able to get it working by upgrading RevenueCat to the 4.13.3 release, which doesn’t seem to have these errors.


Forum|alt.badge.img+2
tunabelly wrote:

I need to be able to run it on macOS 11 because of a bug that affects that OS version, and Xcode 14 won’t run on it.

However, I was able to get it working by upgrading RevenueCat to the 4.13.3 release, which doesn’t seem to have these errors.

Excellent news - I’ll look at this further. That release was 7 days ago.


Forum|alt.badge.img+2
  • New Member
  • 2 replies
  • October 31, 2022

It appears that 4.13.4 has the fix as well, how do we reference a custom version like this in our pubspec.yaml?

 

https://github.com/RevenueCat/purchases-ios/pull/2000

 

Where is the fix for Flutter?


Forum|alt.badge.img+2
ramb0t wrote:

It appears that 4.13.4 has the fix as well, how do we reference a custom version like this in our pubspec.yaml?

 

https://github.com/RevenueCat/purchases-ios/pull/2000

In pubspec.yaml, woudn’t it be something like:


dependencies:

  purchases_flutter: ^4.13.4

 


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • November 1, 2022
ANdrew Kingdom wrote:
ramb0t wrote:

It appears that 4.13.4 has the fix as well, how do we reference a custom version like this in our pubspec.yaml?

 

https://github.com/RevenueCat/purchases-ios/pull/2000

In pubspec.yaml, woudn’t it be something like:


dependencies:

  purchases_flutter: ^4.13.4

 

Yes but there is no current released version which includes this fix...


Fran Tovar
Forum|alt.badge.img+3
  • New Member
  • 3 replies
  • November 7, 2022

Any 

ramb0t wrote:

It appears that 4.13.4 has the fix as well, how do we reference a custom version like this in our pubspec.yaml?

 

https://github.com/RevenueCat/purchases-ios/pull/2000

 

Where is the fix for Flutter?

Did you find some way to add this fix to your Flutter project?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings