Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Swift comes with several modern features every year in the market which is the reason for the popularity of Apple. Swift programming, everyone knows about the print function to print the message at Xcode debug console and in Objective C we used the NSLog function to print the message at the console. In this blog, we are discussing how to print all properties of the values instead of just displaying the name on the message.
Xcode 8.0+, the Dump is introducing for printing the messages at the Xcode Debug console. Dumps the given object’s contents using its mirror to standard output and specified output stream.
We can use also Dump for the same purpose as we used to print() but print() only prints the class name while in the case of dump() prints the whole class hierarchy at Xcode debug console.
Let’s suppose we have 3 classes SchoolRegister, TeacherRegister and StudentRegister.
SchoolRegister class makes two instances of TeacherRegister and StudentRegister class as:
Now takes an instance of SchoolRegister class as;
Firstly, we checked with print() function as:
Now we have checked with Dump() function as:
Also, check with other parameters of dump() :
Used to show max items of hierarchy in the debug console
If you have any comments, questions, or recommendations, feel free to post them in the comment section below!
For other blogs, please click here.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.