Home > OS >  How to fix Realm warning Invalid Source (file not found primitive_list_notifier.cpp)
How to fix Realm warning Invalid Source (file not found primitive_list_notifier.cpp)

Time:01-10

When I built an iOS project using Realm (5.5.2) on Xcode 13, I have the following warning concerning Realm.

realm-cocoa (Uncategorized) Invalid Source '/Library/Developer/Xcode/DerivedData/demo-gehwjphdwijztlgvgfwikjdkhvzb/SourcePackages/checkouts/realm-cocoa/Realm/ObjectStore/src/impl/primitive_list_notifier.cpp': File not found.

I do not understand this warning. Does it have an impact on the project and how to fix it?

CodePudding user response:

This is a known issue in Realm swift, there were tickets opened for this.

https://github.com/realm/realm-swift/issues/7393

One of the maintainers said it should be fixed in the next release but v5 of Realm is on a slower release cycle compared to v10.

I also noticed that the issue posted on GitHub mentioned it could be due to Swift Package Manager.

I don't think it should impact the project, however, solutions that should work include:

  • Upgrading Realm to 10.8.1 or greater
  • Using Xcode 12.5 since the release notes for Realm 5.5.2 mention it was built in Xcode 12.5
  • Use Cocoapods instead in the case you were using Swift Package Manager

Release Notes for Realm Swift 5.5.2: https://github.com/realm/realm-swift/releases/tag/v5.5.2

  •  Tags:  
  • Related