Xcode has a number of logging features I’ve found help me figure out why various things are failing over the years. It’s usually (and by usually I mean always) due to something stupid I did, but the logs help me figure out what’s going on pretty quickly. So first up, let’s look at enabling the activity logs. To do this, we’ll send an EnableDebugActivityLogs Boolean variable into com.apple.dt.XCBuild.plist: defaults write com.apple.dt.XCBuild EnableDebugActivityLogs -bool YES Now let’s turn on the build debugging mode. Now, for the above command you can leave it on without a performance hit, but this one should be turned on and off as you’re going as you’ll…
-
-
lsregister: How Files Are Handled in Mac OS X
The lsregister command is used to query and manage the Launch Services database, or the database that is used to determine the default application used to open files of various types. lsregister is part of Core Services, and stored in /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support. To see the options available to lsregister, run the command with no operators: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister You can dump the database to the screen using the -dump option: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump You can then grep the database or redirect the output into a text file for parsing: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump > dump.txt Sometimes applications don’t open with a given file type. When this happens, you can quickly and easily check if the problem…