Question

Publishing changes from background threads is not allowed

  • 16 September 2023
  • 5 replies
  • 272 views

Badge +2

Getting a ton of warnings from Xcode saying:

Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.

All of these are coming from RevenueCat’s SDK:

purchases-ios/Sources/Caching/DeviceCache.swift:167

purchases-ios/Sources/Caching/DeviceCache.swift:602

purchases-ios/Sources/Networking/HTTPClient/ETagManager.swift:193


Have implemented the sdk incorrectly? Any suggestions are welcome.


5 replies

Userlevel 4
Badge +8

Hi,

Just letting you know I emailed you from RevenueCat support asking for some more info so we can look into this for you.

Badge

I got the same issue… Any solutions ?

Badge +2

Hi Joris,

I reached out to them recently about it with the details. They seem to be looking into it. You should also send them your details. Might help them narrow down the issue.


Still seems to be happening in the latest release: 4.37.0

Badge

Having the exact same issue with version 4.41.2 - even when wrapping the setup code inside a DispatchQueue.main.async

Badge

I’ve tried with 5.0.0 and apparently this is still an issue. 

 

Reply