Viewing console output
You can use the print
function to write information to the console, which is very useful for debugging. If you have not yet used the console in Xcode, follow these simple steps to view it:
- In the upper right-hand corner of Xcode, make sure that the debug area is turned on, as shown in the following screenshot:
- In the bottom right-hand corner of Xcode, make sure that the console is turned on, as shown in the following screenshot:
Get Swift Game Development - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.