opened
PKBeam
username_0
Running this code:

```
import Cocoa
import SMCKit

do {
    let fans = try SMCKit.fanCount()
    print(fans)
} catch {
    print("Error")
}
```

Prints "Error". It happens with fan speed, fan names, etc. What am I doing wrong?
Xcode 8.1 - Can't return anything with SMCKit
issue
created
beltex
username_1
Hello @username_0!

`open()` must be called first to get a connection to the SMC driver (and make sure to call `close()` when your done!). See [SMCKitTool](https://github.com/username_1/SMCKit/blob/master/SMCKitTool/main.swift#L309-L314) for an example. `README`/docs should be updated to make that clear, since a number of folks have asked about this, (so my bad!).

Hope that helps!

**P.S** New Macbook? Nice! :)
comment
created
PKBeam
username_0
Ah, I see. Thanks.
comment
closed
PKBeam
username_0
issue