In the 10.13 SDK, the return type for NSObject.validModesForFontPanel()
changed from Int to NSFontPanel.ModeMask. This is problematic for backwards
compatibility because the different signature means it's considered to be a
new function, different from the one that's been around since 10.3.

If I simply update my function to match the new signature, then I have to
change my deployment target to 10.13, which I'd rather not do just yet.

I also tried going with the auto-fix suggestion of using @available to make
the function 10.13 only. This would mean a minor loss of functionality on
10.12... but it doesn't work because my override isn't allowed to have
different availability from the base version.

I also tried installing the 10.12 SDK and building against that, but it's
not compatible with Xcode 9 GM's Swift 3.2.

So once I start using Xcode 9 regularly, I basically have to comment that
function out until I want to require 10.13 for my app. Are there any other
options?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to