CoreServices not found: CMake build deploying on iOS 10 device

I’m having trouble running a standalone plugin build on an iOS 10 device (iPad mini), with the Xcode project generated by CMake. I’ve fixed various compiler and architecture settings for the relevant targets. Now I’m stuck on the following runtime error complaining about CoreServices.framework being missing:

dyld: Library not loaded: /System/Library/Frameworks/CoreServices.framework/CoreServices
  Referenced from: /var/containers/Bundle/Application/6274125D-8814-4CE1-B3E5-2BEE949AA20F/
  Reason: image not found

I’ve tried manually adding it (via Xcode) to both the main standalone target and the shared code target. However I understand that CMake should be setting the linker flag automagically.

This works fine on the simulator, and with a more recent iOS device (running iOS 13)

I’m on JUCE 6.0.7, Xcode 12.4

Any help with this would be much appreciated!

Maybe related to

I wondered that. I tried changing it back to MobileCoreServices in regenerating and rebuilding the project but I still got the missing CoreServices error.

Unfortunately I don’t have an iOS 10 device here for testing. Can you hack stuff around and try passing -weak_framework CoreServices rather than just -framework CoreServices? I think there’s a chance that might work.

That sorted it!! Thanks!! Now, how do we make that part of the build process…?

Thanks for the update, I’ll have a think about this today. Perhaps we can special-case this framework so that it is linked weakly, depending on the deployment target.

1 Like

I’ve pushed this change, which should resolve the issue. Please let us know if you encounter any other problems.

1 Like