> On Aug 18, 2018, at 2:45 PM, Mike Crawford <mdcrawf...@gmail.com> wrote:
> 
> "older OS versions", porting to 10.6 or later vs. 10.10 or later:
> 
> I at first intended all the drivers I write for my clients to work on
> Snow Leopard 10.6, but after actually attempting to do so I settled
> upon supporting El Capitan 10.11, sometimes just Sierra 12.6.
> 
> There are some occasional but quite serious problems with new APIs
> appearing during a minor release so you can't just set your Deployment
> Target to a major release's first drop.  To get drivers to build - and
> I expect Cocoa code as well - one must take _great_ care to check
> Apple's doc for most if not all of your API calls to determine when
> they first appeared.
> 
> For one particular client's USB function driver we actually had three
> kernel extensions.  I at first planned to package this in just one
> kext bundle but because of time pressure shipped them as three
> separate ones.
> 
> Two of the drivers had Deployment Targets of 10.12, the third 10.11.
> I had some manner of good reason for doing it this way, but I've just
> been up all night nosediving deeply into Wikipedia and all manner of
> Epic Talk Page Flame Wars so just now I'm too thrashed to actually
> remember what it was.


Recent version of Xcode make this much easier to deal with, though, thanks to 
the @available attribute (#available in Swift). If you have your warnings set 
up correctly, this will result in a warning when you use an unavailable API 
outside of an @available block. In Swift, it’s a compiler error rather than a 
warning, so you’re basically forced to do this.

Charles

_______________________________________________

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