(XCode, Swift) XCode 8 not showing foundation classes

Discussion in 'Mac Programming' started by maculateConception, Jul 21, 2017.

  1. maculateConception macrumors 6502

    maculateConception

    Joined:
    May 28, 2017
    Location:
    Die Bundesstaat Kalifornien
    #1
    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.
     

    Attached Files:

  2. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #2
    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.
     
  3. maculateConception thread starter macrumors 6502

    maculateConception

    Joined:
    May 28, 2017
    Location:
    Die Bundesstaat Kalifornien
    #3
    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).
     
  4. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #4
    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.
     

Share This Page