I am trying to create a build (Any iOS Device (arm64)), and I get an error:

/.../CoreData:1:1: API Misuse: Attempt to serialise store access on non-owning coordinator (PSC = 0x60000381b8e0, store PSC = 0x0)

The app compiles, and runs without any errors on all Simulators, and also on real devices (tested on 3 different iPhones). I have no logs in the console, only the error, not even a warning.

My app is not using Core Data. I'm only saving a couple of user settings within UserDefaults.

The setup: Xcode 13.1 (but the same thing happens on Xcode 12), Cocoapods, Swift 5, macOS Big Sur, SwiftUI 2.0 + Combine, I'm supporting targets from iOS 14+

What I've already tried:

  • I have reviewed the assets folders - no duplicate names, it's not empty.
  • I removed Lottie, and the file that it put within assets - didn't help.
  • I have updated all my pods.
  • I have tried cleaning Derived Data, clean builds, reinstalling pods, and restarting the Mac.
  • There is no Data(contentsOf:url) in my code.

Any idea why this could be happening?

This post doesn't help, I've tried all the suggested options. None of them apply here. This is actually using Core Data, so it doesn't apply, and neither do all the posts they mention, nor their suggestions in the comments.

3

There are 3 best solutions below

0
Natalie On BEST ANSWER

Fixed the issue. What I did is:

  • removed two outdated pods (that were using Core Data) - this moved things on, but I stil had the same error.
  • Removed a file Lottie has added to Assets - this moved things forward, but didn't fix the situation.
  • removing and readding all the Assets - one by one - manually - this fixed the issue.
1
Holphana On

I was suffering from this problem as well. When I saw Natalie's comment I immediately realised the problem.

I personally had "kra" files in my assets folder. Check the file types of your images.

1
PAVUNRAJ P On

If you are running the Xcode 14 version, you may get this error of Assets AppIcon Issue Problem" on a single 1024 * 1024 px. You may change the icons to All Sizes. I have resolved this issue on my project. Try this one.