Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

0002378

Suspended
Original poster
May 28, 2017
675
671
I recently installed XCode 8.3.3, and am working on a Swift 3 project within it.

The symbol navigator, in which I'm used to seeing all foundation classes, only ever shows my app classes. It does not show any of the Cocoa/Foundation classes.

Furthermore, there is another problem which I think relates to the above problem ... I'm unable to simply open a foundation source file, such as, for instance, AVAudioRecorder.h, even though it shows up in the search list when I do Shift + Command + O. I try to open it, and it shows me an error (image attached) "Couldn't generate Swift representation".

I searched online for solutions to the Swift source problem, and cleaned my "Derived data" folder. All that did was make me a few seconds older.

Please help ! Thanks ! Images attached.
 

Attachments

  • OpenFile.png
    OpenFile.png
    369.1 KB · Views: 401
  • SymbolNav.png
    SymbolNav.png
    169.1 KB · Views: 228
  • NoSource.png
    NoSource.png
    272.2 KB · Views: 505

Krevnik

macrumors 601
Sep 8, 2003
4,100
1,309
Xcode bug, report it to Apple.

Sucks, but I don’t know any good workarounds. I tend to keep a page open to the dev docs which is my workaround.
 
  • Like
Reactions: 0002378

0002378

Suspended
Original poster
May 28, 2017
675
671
Xcode bug, report it to Apple.

Sucks, but I don’t know any good workarounds. I tend to keep a page open to the dev docs which is my workaround.

Thanks. Which version of XCode are you using, if I may ask ? I don't mind downgrading to fix this problem (assuming my 8.3.3 is the latest out there).
 

Krevnik

macrumors 601
Sep 8, 2003
4,100
1,309
At work, whatever the build system is synced to. But we don't do a lot of Swift. At home, I'm on Xcode 9 beta, but in general I've seen this bug pop up on many versions since Swift launched. No guarantees that the times I've seen it are even due to the same bug.

One of the problems of autogenerating header-like Swift files from Obj-C headers is that it is one more thing that can go wrong with the whole process. Even when it works, it tends to be missing a chunk of the headerdoc information, or other useful bits that I've just trained myself not to lean on it too much.
 
  • Like
Reactions: TonyK and 0002378
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.