Simulator tools to get more out of the simulator

Especially the rulers can help you stop using the Mac screenshot pixel feedback to measure distance in your UI. Simulator tools give you access to more functionalities within the iOS simulator and make it often easier to access features like recording a video with xcrun. Some of the tools are paid while others are open … 

 

UI Debugging by making use of third-party apps

Although Xcode brings us the Debug View Hierarchy tool , it’s often not enough for more advanced UI debugging. Luckily enough there are some great third-party apps available to speed up your workflow in finding or resolving UI bugs. Reveal App Inspect. Modify. Debug. Website: revealapp.com Price: $59 per personal license or $119 per seat, … 

 

OSLog and Unified logging as recommended by Apple

OSLog as a replacement of print and NSLog is the recommended way of logging by Apple. It’s a bit harder to write, but it comes with some nice advantages compared to it’s better-known friends. Setting up OSLog OSLog makes it possible to log per category, which can be used to filter logs using the Console … 

 

Compiler Diagnostic Directives using a hashtag in Swift

The Swift standard library brings quite some compiler diagnostic directives by default. Although this might not ring a bell at all, a lot of them are quite known and listed in the Swift repository. Warning Warning can be used to manually trigger a warning on the given line. This can be useful during development to … 

 

Debugging breakpoints as a replacement for prints

Debugging breakpoints in Xcode allows you to replace prints and reuse debugging statements in future debugging sessions. By simply enabling and disabling needed breakpoints you can also get rid of debug levels as often defined in libraries like CocoaLumberjack. Reuse breakpoints by enabling them when needed Use breakpoints to replace print statements Keep your code … 

 

Using the Network Link Conditioner Utility

The Network Link Conditioner on iOS and macOS enables you to test your app in networking conditions like your users might have while using your app. It allows you to simulate networking conditions like 3G, Edge or High Latency DNS. Using the Network Link Conditioner on iOS You can find a Networking section inside the … 

 

Core Data Debugging in Xcode using launch arguments

Core Data is Apple’s object graph management and persistency framework for iOS, macOS, watchOS, and tvOS. It’s around for a long time and therefore a great solution to use for persistent storage of structured data in your application. Core Data Debugging might be a bit hard, although some less-known functionalities in Xcode can help you …