@marcoarment that is very interesting though. How well does it work in practice?
-
-
-
@conradstoll I don’t know how it works on devices, but it works great in the simulator. -
@marcoarment you should be able to test it on device with a Today Extension. That's what I did with MMWormhole.
-
-
-
@marcoarment two fragile assmps: 1) passing 0 for NSData write requires a non-atomic write, and that writer's first write(2) is valid plist -
@shantonusen Nonatomic write is intentional — if atomic is used, the vnode changes and the source loses track of the file. -
@marcoarment that's my point. The default behavior is unspecified. Might be atomic in the future -
@marcoarment better to use atomic, and dispatch source on enclosing directory. When source fires, check dev/ino for change and reparse
-
-
@marcoarment should write instead of checking if file exists at path -
@marcoarment It looks to me like the reads and writes could overlap, resulting in a read of partially written data. -
@marcoarment I write to a plist file and use CFNotificationCenterGetDarwinNotifyCenter() to inform the watchkit ext. or the host app
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Marco Arment
Conrad Stoll
Shantonu Sen
Samuel Giddins
David Starke
Plato