Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Swift Basics (retired) Types Strings

Hassan Khazaal
Hassan Khazaal
2,441 Points

the assistant editor doesnt show my print result how can i fix it ?

the assistant editor doesnt show the print result no matter what i try and there are no errors to prevent that im using xcode beta any solutions ?

What code isn't working? Can you paste it in here, please?

Hassan Khazaal
Hassan Khazaal
2,441 Points

i just used print("hello") and i found out that if i typed println xcode takes it as an error too

3 Answers

This is probably due to the recent update - there seems to be different ways that the compiler reacts to it. What does your error say?

The latest version of Swift has deprecated the println method, replacing it with print. Maybe your beta version of Xcode is treating the deprecation as final and calling println an error. In the standard version, both methds are still accepted.

Steve.

Hassan Khazaal
Hassan Khazaal
2,441 Points

Exactly when i type print it shows in the end that ther is a /n at the end of the code so its working the same as print ln but still the assistant editor shows a blank page

Try View | Debug Area | Activate Console ... your output may be hiding in there! Or Cmd + Shift + Y

And to avoid the new line being added, try print("Print this stuff", appendNewline: false)

Just been in another thread on the same thing. Have a look in here to see if that helps you.

Steve.