Reputation: 13355
What the ios equivalent of android Log.v, Log.d, Log.i, Log.e, etc. ? Also on android i use the Android device monitor and logcat to access the log of my phone, what i will need to use under ios ? Especially from the iphone simulator.
Upvotes: 1
Views: 2309
Reputation: 2998
Swift:
print("")
Objectve-C
NSLog(@"")
You can view the logs in the lower bottom corner of xcode. Refer the image below.
Upvotes: 4
Reputation: 409
Types of Logs:
OS_LOG_TYPE_DEFAULT
OS_LOG_TYPE_INFO
OS_LOG_TYPE_DEBUG
OS_LOG_TYPE_ERROR
OS_LOG_TYPE_FAULT
//example
os_log(OS_LOG_DEFAULT, "This is a log message.");
For details please refer to apple reference guide
Upvotes: 2