OSX Spotlight – Filter “Safari history item” and mailboxes

Most folks browse the web and some do so often. This creates a history which Safari conveniently stores for future reference. The feature is especially useful when you go to “History -> Show All History”.

What isn’t so useful is searching for a file and receiving thousands of results for “Safari history item”. This shouldn’t be an issue because there is an option to remove “Safari” from Search Results, however, this option fails to remove Safari history items from Spotlight search results.

To disable Spotlight from searching “Safari history item”:

  • Open System Preferences, go to Spotlight and click on Privacy pane
  • open a new Finder window
  • browse to <home> /Library/Caches/Metadata/Safari
  • Drag and drop “History” folder from Finder to Privacy pane
  • Filtering Specific Mailboxes: browse to Library/Mail/
  • Find offending .imapbox, .mbox, or any other; drag and drop onto Privacy pane

As far as I can tell you can filter many of the Spotlight searches by adding any of the folders in Library/Caches/Metadata. Here is what my Privacy settings look like:


Spotlight Privacy Filter
Spotlight Privacy Filter

Hopefully you made it here and didn’t see this:

failed search

OSX Spotlight – Filter “Safari history item” and mailboxes

Apple only poised for Enterprise

As I began working this evening I realized I haven’t backed up my laptop in a few months. In fact, three months ago I backed up to a system which recently crashed. I lost data and freaked out a little and losing my laptop hard disk right now would be bad. After hearing about someone’s laptop being stolen I can’t procrastinate any longer. So what am I going to do about it?

Well, after purchasing two 500GB USB drives and a Time Capsule, I’m going to connect some cables and CLICK FOUR TIMES. Then every month I’ll CLICK FOUR TIMES, swap out one of the 500GB “archive” drives, then take the other off site. For less than $500 and 52 clicks a year I will have “secure” historical backups of my laptop.

This does NOT happen in IT.

With a business of 5-50 employees and non-Apple systems, secure offsite backups will cost anywhere from $3-30k worth of software, hardware, media, and/or bandwidth. There are valid reasons for the costs, however, once a solution is in place you maybe looking at paying for a full time employee which will cost much more than four mouse clicks.

While seemingly far-fetched, there are few differences between backing up my laptop and backing up a business; let’s keep in mind that no matter how much data is involved, the process of securely backing up, storing, and restoring data is the same. The backup life-cycle consists of transferring data to offline media, archiving, restoring, and retention. Upfront costs are typically associated with how much data you have and the recurring cost correlates with your retention and archiving policies. What a business adds in complexity is gathering data for backup, as the data may reside on multiple servers and/or desktops. The second complexity a business adds maybe proprietary software which requires additional licensing to efficiently backup data without downtime.

Unfortunately at this time there isn’t a four click backup solution for IT in small or enterprise businesses. Backups are costly and complicated. Moreover, while you can deploy Time Machine for all Macs, not every machine is a Mac and servers typically run Windows or Linux. So, while Apple has done a great job of solving the task of backups by integrating the service into their OS for free, they have not solved what is still a significantly difficult task in IT. Apple is poised for the enterprise yet continues focusing on consumers. Considering all the new avenues Apple has ventured in the last five years — Aperture, AppleTV, iPhone w/Exchange support, iLife/FinalCut/Logic, iTunes, iWork, MobileMe, Shake, and Time Machine — I have to ask myself why Apple remains out of the enterprise?

Apple only poised for Enterprise

iPhone purchase “Experience”

I picked up an iPhone yesterday and was rather lucky in doing so.  I learned a bit about the lines as well, which I’m sure has been blogged about enough already but I didn’t find anything with a quick google search. Moreover, my experience at the Apple store at Knox Henderson could be different than those of others or those who have opted to work with ATT.

I called the Apple store yesterday around 1815 and actually assumed they were out of stock. My question was along the lines of “Hi, do you know when you will get more phones and when I should be there to have the best chances of getting a new phone?”. To my surprise her answer was that they had phones in stock and I should arrive ASAP if I wanted one. I then kindly asked my friend, who was driving, to haul ass to the Apple store.

When I arrived there was a small line outside the Apple store. I entered the store and asked someone about the line and what I should do because I could see people holding white vouchers and I didn’t want to get in line for nothing. The associate stated they’d given out the last voucher and would be giving out no more; at this point I stated I was very disappointed would not have wasted my time if a representative on the phone had not told me there were phones in stock.

As it turns out, the vouchers were being given out because the purchase and activation process takes so long. Apple is personally selling, activating, configuring, and answering questions for EVERY SINGLE iPhone customer. As it turns out, they limited the number of vouchers because there wasn’t enough time in the day, not because they were out of stock.

I do have one suggestion. Find an Apple store in a Mall so the line outside the store is indoors and air conditioned. It got up to a lovely 103F yesterday and sweating outside isn’t much fun. We tried to buy margaritas to drink while in line but forgot it’s illegal to leave a restaurant with a drink.

Last but not least – it seems all of the ATT stores in Dallas are only fulfilling pre-orders and they are not expecting store shipments for 10-21 days (…which grew from 3-5 days)

So in conclusion, your chances of a getting a phone at this time is random, the lines are BYOB, and the wait is because of the stupid in-store-only activation process.

iPhone purchase “Experience”

Top Ten – No Background iPhone Processes

First of all I have to say I loathe the idea that Apple is not allowing background processes (per their documentation). Not to say Apple won’t change those provisions, but as-is, I don’t agree with disallowing background processes. On to the list (no particular order):

  1. mac worms (the kind that would spread across macs and iphones)
  2. making your iPhone a social communications device, for free
  3. p2p could be used to download and share music, for free
  4. battery life decreased more than 60 seconds
  5. turning iphone into free wifi hotspot takes away from ATT/Starbucks hot spot access
  6. cause ATT to discontinue distributing Apple revenue (due to #2, #3, #5 above)
  7. it would compete with Apple’s upcoming “iGPS”
  8. the SDK is really only for making games; Apple makes the real apps
  9. the device would be considered a weapon and be disallowed exportation
  10. iPhone can be used as a guidance control system for ballistics
Personally, I think if Apple were smart, they would realize how much running down a battery would cause folks to buy extra chargers for their car and work place. Oh well.
Top Ten – No Background iPhone Processes

Safari Crash / Bug Webkit # 16196

I’ve been seeing this type of crash fairly often in Safari now. Not necessarily the same situation every time, but the culprit is almost always Javascript – not bad javascript – Safari just doesn’t like it. 

Here’s a stack trace:
0   com.apple.WebCore             	0x9535ff20 WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded(WebCore::Position const&, WebCore::Position const&) + 32
1   com.apple.WebCore             	0x9535f02c WebCore::ApplyStyleCommand::applyInlineStyle(WebCore::CSSMutableStyleDeclaration*) + 396
2   com.apple.WebCore             	0x9535bcac WebCore::ApplyStyleCommand::doApply() + 284
3   com.apple.WebCore             	0x952e5eb8 WebCore::EditCommand::apply() + 168
4   com.apple.WebCore             	0x952e66cc WebCore::CompositeEditCommand::applyCommandToComposite(WTF::PassRefPtr) + 44
5   com.apple.WebCore             	0x9535baf8 WebCore::CompositeEditCommand::applyStyle(WebCore::CSSStyleDeclaration*, WebCore::Position const&, WebCore::Position const&, WebCore::EditAction) + 120
6   com.apple.WebCore             	0x9535b5fc WebCore::ReplaceSelectionCommand::completeHTMLReplacement(WebCore::Position const&) + 700
7   com.apple.WebCore             	0x95358240 WebCore::ReplaceSelectionCommand::doApply() + 11600
8   com.apple.WebCore             	0x952e5eb8 WebCore::EditCommand::apply() + 168
9   com.apple.WebCore             	0x953f0d0c -[WebCoreFrameBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:] + 236
10  com.apple.WebKit              	0x94b1a82c -[WebHTMLView(WebHTMLViewFileInternal) _pasteWithPasteboard:allowPlainText:] + 220
11  com.apple.AppKit              	0x918b9358 -[NSApplication sendAction:to:from:] + 104
12  com.apple.Safari              	0x00037870 0x1000 + 223344
13  com.apple.AppKit              	0x91954990 -[NSMenu performActionForItemAtIndex:] + 408
14  com.apple.AppKit              	0x919546c0 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 228
15  com.apple.AppKit              	0x91954388 -[NSMenu performKeyEquivalent:] + 744
16  com.apple.AppKit              	0x91952e6c -[NSApplication _handleKeyEquivalent:] + 456
17  com.apple.AppKit              	0x91889a94 -[NSApplication sendEvent:] + 3548
18  com.apple.Safari              	0x00032fb0 0x1000 + 204720
19  com.apple.AppKit              	0x917f6ed4 -[NSApplication run] + 776
20  com.apple.AppKit              	0x917c792c NSApplicationMain + 440
21  com.apple.Safari              	0x00002d10 0x1000 + 7440
22  ???                           	0x00000ffc 0 + 4092

For anyone blogging and trying to paste content into the blogger Compose post window, good luck in Safari!

Looks like WebKit folks are working on it, there’s an Apple bug filed as well. This bug leads to crashes. If it’s happening for you, know that you are not alone or crazy. Writing browsers ain’t easy!
I heart WebKit team.
Safari Crash / Bug Webkit # 16196

iPhone SDK – Overview (the SDK, not the Event)

First off, if you’d like an overview of the iPhone SDK event as well as some quick details, head over to macrumors.com, they’ve done a great job of summarizing the Event [macrumors summary]. The iPhone SDK is a 2.1GB download which you get from Apple’s iPhone developer site – certificates are $99 or $299 [here]. At one point the SDK documentation was publicly accessible but Apple has since restricted it to registered users. The SDK itself still appears to be free (you can signup without purchasing a certificate). What comes with the SDK:

  •  XCode 3.1 Beta (along with updated utilities)
  • Platforms/Aspen.platform
  • Platforms/AspenSimulator.platform
  • Platforms/MacOSX.platform
Quick Note: The iPhone SDK only supports Intel – it will not work if you’ve got a PPC-based system (G3/4/5)
So what are the platforms?
Apple has expanded Xcode to support projects based on a platform. The Aspen.platform directory and MacOSX.platform directories have icons which we see used in Xcode and Instruments to select between platforms for a project or trace. We can also see a glimpse of Apple’s naming process on how to refer to the ‘iPhone / iPod Touch’ operating system; as such, we’ll follow suit and use “Aspen” as well.
Since this is about the iPhone SDK and not Xcode we’ll move right along into Aspen – the simulator and the device. Fire up Xcode to start developing an application and then select a new iPhone Application project where you can select from:
  • Cocoa Touch Application
  • Cocoa Touch List
  • Cocoa Touch Toolbar 
You should first note that all three applications have the same thing in common – “Cocoa Touch”. As a part of the SDK Apple has provided the UIKit framework which provides core features required by every application as well as access to device-specific features such as the Accelerometer and Camera. The Cocoa Touch “layer” comprises of the UIKit and Foundation frameworks. It should be noted that the Aspen Foundation framework isn’t the same as the MacOSX Foundation framework.
Of the project templates above, the Application is a basic application which does nothing, the List is a flat list of locales and the Touch Toolbar could be considered the “richest” application as it is a menu bar with Red, Green, and Blue buttons which change the color of the application’s canvas.


After creating a project you can simply Build & Go which will compile and execute the project – when executed your application will open inside of the Simulator. As Apple hasn’t yet issued any developer certificates (I’m waiting on mine), you can only test with the Simulator. When certificates are available you will actually be able to test the application on your iPhone/iPod Touch while it is tethered to your machine. All of this is accomplished by changing the compile settings from Simulator to device. One quick note: Not all simulator functionality is supported on the actual devices and not all device functionality is supported on the simulator. A quick diff of the two “.Platform” directories gives us a quick glimpse of the differences:
e nessence$ diff device simulator 
> Accelerate.framework
> ApplicationServices.framework
< CFNetwork.framework
> CoreServices.framework
> DiskArbitration.framework
< OpenAL.framework
< OpenGLES.framework
This means some functionality “< ” you’ll only be able to test on the device, and other functionality “> ” you can only build for the simulator. It maybe possible you can build device functionality that’s only in the simulator with some workarounds but I’m sure the better option is to wait for Apple to update the SDK.
In addition to integration with Xcode, you’ll find that Apple’s “Instruments” application which can take advantage of debugging utilities to monitor the performance of your applications. From my testing I could only get some of the traces to work with the simulator while it was obvious I would need to debug the device directly for other traces (Core Animation, OpenGL ES). This only makes sense because you can’t currently compile an application for the Simulator with the OpenGL frameworks.
While it’s evident improvements can be made to the SDK, Apple has done a good job for the first release. Writing a simulator to encapsulate an entire OS is no small feat. The most promising functionality is the level of debugging (and remote debugging) that Apple is pushing to provide by integrating iPhone development into both Xcode and Instruments (ie DTrace).

iPhone SDK – Overview (the SDK, not the Event)