Solved

Errors building version 4.12.0 onwards (Xcode 13.2.1 13C100)


Badge +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>                 ^
 

 

icon

Best answer by imougy 19 October 2022, 08:55

View original

17 replies

Badge

Hi, have you gotten any solution yet?

Badge +2

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).

Badge +4

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

Badge +3

Same problem here :(

Badge +2

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).

Userlevel 3
Badge +8

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

Badge +2

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.

Badge +2

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

Badge +2

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

Badge +2

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.)

Badge +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.

Badge +2

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.

Badge +2

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.

Badge +2

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?

Badge +2

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

 

Badge +2

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

Badge +3

Any 

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?

Reply