Debugging Auto Layout

I’m trying to debug an Auto Layout issue where my view is extending under the tab bar for some reason

Screen Shot 2014-11-20 at 13.12.01

I read in Apple’s documentation how to debug:

If possible, reproduce the issue while running under the Auto Layout template in Instruments.

An Auto Layout Instrument sounds nice. Never mind it’s actually called Cocoa Layout

Screen Shot 2014-11-20 at 13.32.21

Anyway, open that, hit record, 💣

Screen Shot 2014-11-20 at 13.28.41

Secret booleans on Swift

Is this true? Is this false?

(lldb) p self.translatesAutoresizingMaskIntoConstraints
(() -> Bool) $R5 =
(lldb) po self.translatesAutoresizingMaskIntoConstraints

(lldb) 

Hint: it’s a method :facepalm:

(lldb) po self.translatesAutoresizingMaskIntoConstraints()
false

Debugging Swift 2

(lldb) po activityIndicator
error: Couldn't lookup symbols:
  __swift_FORCE_LOAD_$_swiftQuartzCore
(lldb) po self
error: Couldn't lookup symbols:
  __swift_FORCE_LOAD_$_swiftQuartzCore

Debugging Swift

I just went ahead and ported my first class to Swift. I expect a lot more of this:

(lldb) po self

error: Error in auto-import:

failed to get module 'WordPress' from AST context:

/Users/koke/automattic/wordpress-ios/WordPress/Classes/System/WordPress-Bridging-Header.h:1:9: note: in file included from /Users/koke/automattic/wordpress-ios/WordPress/Classes/System/WordPress-Bridging-Header.h:1:

#import <AFNetworking/AFNetworking.h>

        ^

/Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFNetworking.h:34:13: note: in file included from /Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFNetworking.h:34:

    #import "AFURLConnectionOperation.h"

            ^

/Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h:192:1: error: property with 'retain (or strong)' attribute must be of object type

@property (nonatomic, strong) dispatch_queue_t completionQueue;

^

/Users/koke/automattic/wordpress-ios/WordPress/Classes/System/WordPress-Bridging-Header.h:1:9: note: in file included from /Users/koke/automattic/wordpress-ios/WordPress/Classes/System/WordPress-Bridging-Header.h:1:

#import <AFNetworking/AFNetworking.h>

        ^

/Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFNetworking.h:34:13: note: in file included from /Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFNetworking.h:34:

    #import "AFURLConnectionOperation.h"

            ^

/Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h:197:1: error: property with 'retain (or strong)' attribute must be of object type

@property (nonatomic, strong) dispatch_group_t completionGroup;

^

/Users/koke/automattic/wordpress-ios/WordPress/Classes/System/WordPress-Bridging-Header.h:1:9: note: in file included from /Users/koke/automattic/wordpress-ios/WordPress/Classes/System/WordPress-Bridging-Header.h:1:

#import <AFNetworking/AFNetworking.h>

        ^

/Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFNetworking.h:36:13: note: in file included from /Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFNetworking.h:36:

    #import "AFHTTPRequestOperationManager.h"

            ^

/Users/koke/automattic/wordpress-ios/WordPress/../Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h:30:9: error: 'CoreServices/CoreServices.h' file not found

#import <CoreServices/CoreServices.h>

        ^

failed to import bridging header '/Users/koke/automattic/wordpress-ios/WordPress/Classes/System/WordPress-Bridging-Header.h'A fatal parse error has occurred.  LLDB may become unstable; please restart your debug session as soon as possible.