Swift version: 5.10
You can write text to the Xcode debug console using the print()
function in Swift, like this:
print("Hello, world!")
The print()
function is actually variadic, so you can pass it more than one parameter and it will print them all, like this:
print(1, 2, 3, 4, 5)
SPONSORED Join some of the App Store’s biggest apps—from brands like Mojo and Citizen to thriving indies. Test pricing, run paywall experiments, update locked features, and now, launch web checkout links straight from your app—all without updates. Superwall is your complete growth toolkit.
Available from iOS 7.0
This is part of the Swift Knowledge Base, a free, searchable collection of solutions for common iOS questions.
Link copied to your pasteboard.