Overview
dataTile is a developer tool that integrates with the Simulator to display debugging data in tiles. These are easier to see than searching for output in the debug console produced by calls to the print
function.
The "Mini" version is free, but provides no customizations options and is limited to displaying three tiles. The "Pro" version costs $7.99 per month and removes these limitations.
Installing
dataTile can be downloaded from the Mac App Store. Once installed it will appear as an app in your Applications directory. Double-click it to launch.
Configuring
There are two ways to use dataTile in an app.
Add a run pre-action.
- Click the app name to the left of the device dropdown at the top of the Xcode window.
- Click "Edit Scheme..."
- In the dialog that appears, expand the "Run" section.
- Click "Pre-actions".
- Click "+" in the lower-left.
- Enter the following:
open tile://new/{project-name}
- Click the "Close" button.
Observe an app (DID NOT WORK FOR ME!)
- Launch the Tile app from the Finder by navigating to the Applications directory and double-clicking Tile.
- Select File ... Add new app...
- Enter the name of any app that uses Apple's unified logging system, such as Xcode.
- Click the "Create" button.
Using
In code that wishes to display debugging data in a tile:
Add
import OSLog
Add calls to the
os_log
function that are passed a string in one of the following formats:- "Name: value"
- "Name 'value'" (not supported in the Mini version)
- "Name = value" (not supported in the Mini version)
The logged values will be displayed in a tile and will also be written to the debug console.
The first tile always displays "Activity" which is the total number of updates that have occurred. This means that in the Mini version only two tiles are available for displaying values.