> Framework CoreMedia not found error WatchOS / Cordova
Framework CoreMedia not found error WatchOS / Cordova
If you add a WatchOS project to a Cordova app, it may run, but when you compile it, it gives a Linker error saying that FrameWork CoreMedia is not found.
Here is a step-by-step instruction how to fix it:
• In Bitcoin project -> Build Settings: Other Linker Flags, there are some flags like “-weak_framework AVFoundation“, “-weak_framework CoreMedia“, etc. Those settings will be inherited by all 3 targets: Bitcoin, Bitcoin Watch and Bitcoin Watch Extension.
Bitcoin target will need them, but Bitcoin Watch and Bitcoin Watch Extension is for watchOS, so it doesn’t have AVFoundation, CoreMedia… You must remove all flags, except -ObjC for those 2 targets. Just go to Build Settings -> Other Linker Flags of each target and delete unwanted flags (see attached image).
• All targets must have the same Version and Build number. And Build number should be integer like 1, 2, 3… instead of `1.1.1`. So I changed all targets version to 1.1.1 and build number to 1.
I also got this error below
You have to make sure that all your icons for the WatchOS app (you drag the images into the Assets.XCassets file in XCode) match the required dimensions and are named WIDTHxHRIGHT@SCALEx.png. Make sure the images have no alpha channel, so export to web on Photoshop, and select No transparency, 8 bit PNG.