I'm getting the following error in Xcode and I can't figure out how to fix it.
Cannot load underlying module for 'MediaPlayer'
I've searched Google and have come across lots of other people with similar issues whereby they're importing something and it's producing this error alongside it.
- https://stackoverflow.com/questions/76256875/cannot-load-underlying-module-for-scenekit
- https://developer.apple.com/forums/thread/115059
- https://stackoverflow.com/questions/32673866/cocoapods-cannot-load-underlying-module-for-x
The error is being shown inline with this bit of code:
import SwiftUI
import MusicKit
import MediaPlayer <-- this line here
I can build and run the project without issue and it disappears. But will quickly reappear again a short while later and it's very annoying.
How can I resolve this please?