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 trialJonathan Hamada
4,810 PointsSwift Compiler Error for LocationPermissionsDelegate
I'm getting the following errors. I tried to look up information on the errors but found nothing.
Cannot invoke initializer for type 'LocationManager' with an argument list of type '(permissionsDelegate: PermissionsController)'
Use of undeclared type 'LocationPermissionsDelegate'
'weak' may only be applied to class and class-bound protocol types, not '<<error type>>'
2 Answers
Jeff McDivitt
23,970 PointsPlease post your code on Github so we can see your full code to diagnose the error
Database Admin
iOS Development Techdegree Student 201 PointsYou must declare permissionsDelegate like this
weak var permissionsDelegate: LocationPermissionsDelegate?