Xcode Beta 6 - Using the undeclared type "CLLocationManagerDelegate"

I just upgraded from Xcode 6 Beta 3 to Xcode 6 Beta 6. In Beta 3, everything worked fine and compiled as I would like.

Currently, I cannot get CLLocationManagerDelegate to work, that is, I always get the error "CLLocationManagerDelegate", which is not indicated in the declaration.

This is what my file looks like:

import UIKit import CoreLocation class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, CLLocationManagerDelegate { 

Additional Information:

  • I added the CoreLocation Framework (tried to add it to Xcode directly, as well as drag the actual file from the folder, no changes)
  • I had to reinstall Xcode 6 Beta 6 a couple of times before starting it (starting OSX 10.9.4, always crashing when I first started).
  • As you can see, I am importing CoreLocation into my file.
  • CLLocationManagerDelegate is not autocomplete, it comes to CLLocationManager

Any ideas? I assume something is not connected here.

+7
xcode swift cllocationmanager xcode6-beta6
source share
3 answers

Try to clear the assembly directory:

Products โ†’ Clean

Product โ†’ (Alt key) Clear build folder

Delete the received data:

Window โ†’ Organizer โ†’ Delete Derived Data

+4
source share

Another possible cause of the โ€œuse undeclared typeโ€ error is that your class is also in your target program test , but the โ€œundeclared typeโ€ is not.

+4
source share

It was a bug in Xcode. It was resolved in Beta7 / Xcode6.

+2
source share

All Articles