O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

  1. Add NSHost to CFChatterClient.

  2. Add the observer callback to your CFChatterClient.

  3. If you run scf-dump on a laptop, you’ll probably see something like this:

    k​e​y​ ​i​s​ ​S​t​a​t​e​:​/​I​O​K​i​t​/​P​o​w​e​r​S​o​u​r​c​e​s​/​I​n​t​e​r​n​a​l​B​a​t​t​e​r​y​-​0​
     ​ ​ ​ ​M​a​x​ ​C​a​p​a​c​i​t​y​ ​:​ ​9​6​2​
     ​ ​ ​ ​C​u​r​r​e​n​t​ ​C​a​p​a​c​i​t​y​ ​:​ ​9​6​2​
     ​ ​ ​ ​N​a​m​e​ ​:​ ​I​n​t​e​r​n​a​l​B​a​t​t​e​r​y​-​0​
     ​ ​ ​ ​I​s​ ​P​r​e​s​e​n​t​ ​:​ ​1​
     ​ ​ ​ ​I​s​ ​C​h​a​r​g​i​n​g​ ​:​ ​0​
     ​ ​ ​ ​T​i​m​e​ ​t​o​ ​F​u​l​l​ ​C​h​a​r​g​e​ ​:​ ​0​
     ​ ​ ​ ​T​r​a​n​s​p​o​r​t​ ​T​y​p​e​ ​:​ ​I​n​t​e​r​n​a​l​
     ​ ​ ​ ​T​i​m​e​ ​t​o​ ​E​m​p​t​y​ ​:​ ​0​
     ​ ​ ​ ​P​o​w​e​r​ ​S​o​u​r​c​e​ ​S​t​a​t​e​ ​:​ ​A​C​ ​P​o​w​e​r​
    

    Extend the SCFMonitor application to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required