[swift-users] Foundation on Linux `CFBooleanGetTypeID`/`CFGetTypeID`

Ryan Lovelett swift-dev at ryan.lovelett.me
Mon May 23 14:25:23 CDT 2016


I am trying to run some Swift code that relies on Foundation on Linux
(it is thoughtbot's Argo library if anyone wants to know the exact
code).

There is a fairly simple extension to NSNumber that looks like:

import Foundation

extension NSNumber {
  var isBool: Bool {
    return CFBooleanGetTypeID() == CFGetTypeID(self)
  }
}

However it seems that Foundation on Linux has neither
`CFBooleanGetTypeID` or `CFGetTypeID`.

Is this expected?


More information about the swift-users mailing list