Finally, I solved this issue by adding $(CONFIGURATION_BUILD_DIR) in the target’s build settings’ Runpath Search Paths field.
Plus, there are some additional steps you might need to do with your Xcode.
- Clear Xcode derived data for the project. They are in
~/Library/Developer/Xcode/DerivedData - Clean your current build by pressing ⌘⇧K
- Build your project
- In storyboard go to
Editormenu and doRefresh All Views; wait for build to be completed and errors should be gone
Credit to @Mojtaba