I imported the MediaPlayer
framework and used MPMusicPlayerPlayParameters
in my SwiftUI project.
While the app is launching, If the app is built by Xcode 14.3.1
or a newer version, it instantly crashes on a simulator or on a real device.
This problem persists on iOS 16.0 to 16.4. (I haven't tried iOS 15 or below) I also tried to build and run the app with Xcode 15 - beta 4
however it still crashes.
Because of this reason, I archive and submit to App Store with Xcode 14.2
.
(the built made by Xcode 14.2 works perfectly!!)
Here is the error message:
dyld[17235]: Symbol not found: _$sSo27MPMusicPlayerPlayParametersCSe05MediaB0Mc
Referenced from:
<77FEF170-9C51-3580-8F8B-2ADD2F1B3FD1> /Users/[UserName]/Library/Developer/CoreSimulator/Devices/72CE26D8-4DD4-4319-B0C7-DE52D6645875/data/Containers/Bundle/Application/C808623F-5372-40F0-907F-E86E12AE6EDD/[AppName].app/[AppName]
Expected in:
<06F636E1-695C-34F1-809D-7CA24F67AFE9> /Library/Developer/CoreSimulator/Volumes/iOS_20B72/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 16.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer
I believe this is Apple related issue however if there is any way that can fix the issue, please let me know.