
May 13
Recently, Apple released an update to Mac OS X that broke syncing in my app ShoveBox. The app syncs over the user's local WiFi network and uses Bonjour in order to find the iPhone/iPod version of ShoveBox.
A few fellow developers were curious what was changed in 10.5.7, so I thought I'd post it here.
After some troubleshooting, I found that Apple had made a slight tweak to the way the Cocoa APIs for Bonjour work. As of 10.5.6 and below, if you called -startMonitoring on an NSNetService, it would immediately call the delegate method – netService:didUpdateTXTRecordData: to let you know that the TXT record changed or became available, even if it had not changed from when -startMonitoring was called.
I'm not sure what I was under the influence of when writing this part of ShoveBox, but I had (perhaps defensively) coded it to only count the NSNetService as a viable sync source once –netService:didUpdateTXTRecordData: was called — as it did seem to be called in every case.
As of 10.5.7, NSNetService (correctly) only calls that method once the TXT record has actually changed.
The fix involved checking for/validating the TXT record for the NSNetService as soon as its address is resolved (in – netServiceDidResolveAddress:). Now, only if it is not present and valid, it I call -startMonitoring. It should be sufficient, however, to only validate once if the broadcasting application does not change its TXT records.
For some reason, I had never heard this song before.
April 23
“A lot of it is definitely trying to keep up with the Joneses,” said Daniel Bennett, a labor economist and the author of the center’s report. “Universities and colleges are catering more to students, trying to make college a lifestyle, not just people getting an education.”
This is a huge problem with college today. Many students have a hard enough time paying for an education, much less the expensive "lifestyle" colleges are selling.
© 2009 Dan Grover.