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

'AnyObject?' is not convertible to 'String!' did you mean to use 'as!' to force downcast? What does this mean?

My playlist.swift code is peppered with this error.

1 Answer

Apple added some new syntax with their most recent Swift/Xcode update. I ran into this myself and my code worked after I let Xcode change my "as"s to "as!" Try updating your code to this new syntax and see if it works.

Ah, ok. Thanks, I shall try that.