Nico Nico - 1 year ago 96
iOS Question

Xcode 8 print function just print the name of the object and its address in memory

With Xcode 8, when I do a

print("user : \(user)")
, in the console I only get
user : <Object_Class: 0x6080000b3fe0>
. Is there a way to have a more detailed print?


The class is

/** @class FIRUser
@brief Represents a user.
@remarks This class is thread-safe.
@interface FIRUser : NSObject <FIRUserInfo>

Answer Source

You need this class to conform to CustomStringConvertible and implement the description property.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download