On Jul 27, 2015, at 15:08 , Rick Mann <rm...@latencyzero.com> wrote: > > Is it bridged automatically anywhere else? Seems like a lot of ad-hoc and > inconsistent support for bridging.
I dunno, really. Support for CF things (and C things and unmanaged pointers) seems to vary release by release, so I don’t try to keep up. Bridging is consistent, though, I believe. It’s very specific: Int,etc <-> NSNumber String <-> NSString [AnyObject] <-> NSArray [NSObject: AnyObject] <-> NSDictionary But this doesn’t extend to things we know about Obj-C and Cocoa externally to Swift, or internally about the implementations (such as toll-free bridging between CF and NS types). Remember, too, that we had to cast CFString variables like kSecReturnData to NSString manually in Obj-C to shut the compiler up. P.S. In my earlier example, ‘as String’ seems to work as well as ‘as NSString’. I presume that’s because of bridging, once you’ve got as far as NSString. _______________________________________________ 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