Assistant Editor in Xcode not showing my classes

JMelcherJMelcher USMember ✭✭
edited October 2015 in Xamarin.iOS

Hey guys,

I recently updated Xamarin for iOS 9 (Xcode version 7.0.1, Xamarin version 5.9.7, Xamarin.iOS version 9.0.1.20) and I can no longer view my classes in Xcode.

For instance, opening a .xib file using the Xcode Interface Builder, then showing the Assistant Editor no longer works as it should. I can select a view in my .xib file, but then no class appears in the Assistant Editor. Selecting Manual -> My project in the Assistant Editor pane only shows .storyboard and .xib files (no .h files). This makes it so that I can't assign IBOutlets, which is a major problem.

Any reason why this would be happening?

Update: There are no .h files generated in the obj -> Xcode folder when opening the .xib file from Xamarin.

Answers

  • adamkempadamkemp USInsider, Developer Group Leader mod

    This is just a guess, but when I open a .xib in Xamarin Studio it opens Xcode and I get two Xcode windows. The top one with the .xib in it doesn't have the rest of the project, which makes the assistant editor kind of useless. If I switch to the other window then I can see the project and drill down to the .xib and select it in that window, and then I can use the assistant editor. This may be an issue with Xcode's behavior changing, and maybe Xamarin Studio needs to adapt to the new behavior.

  • JMelcherJMelcher USMember ✭✭

    @adamkemp Just tried what you suggested, and I can see the project folder structure, but I still cannot see any .h files.

    Any other ideas?

  • adamkempadamkemp USInsider, Developer Group Leader mod

    You could try doing a clean and then deleting everything in ~/Library/Caches/XamarinStudio-5.0/DerivedData. Then try opening the file again. If that doesn't work then maybe something in your code or in the .xib is causing problems for the code generator that builds the dummy Xcode project.

  • JMelcherJMelcher USMember ✭✭

    @adamkemp Just tried that as well to no avail.

    This is happening on other projects as well that I have not touched, so I doubt its a problem with that one file.

    Note: I also tried reinstalling both Xcode and Xamarin earlier. Didn't solve the problem.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    Contact Xamarin support. Your account page should have an email address.

  • JMelcherJMelcher USMember ✭✭

    Will do. Thanks!

  • JMelcherJMelcher USMember ✭✭
    edited October 2015

    For anyone that runs into this problem in the future, I found a solution. I ended up downloading some older versions of my projects and found a working version, then narrowed it down to a single commit. After looking around a bit, I was able to find where the problem originated. The problem was due to ProjectTypeGuids in the iOS project files. I'm assuming that in order to open my project in Visual Studio, somebody followed what is described here: http://forums.xamarin.com/discussion/comment/120612/#Comment_120612. However, that makes it so that Xamarin will no longer synchronize with Xcode correctly.

    Non-working ProjectTypeGuids:
    <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

    Solution: Change it back to this:
    <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

    Hope this helps someone else! It was quite the headache trying to find the source of the problem.

  • sschmidTUsschmidTU Member ✭✭

    In my case, closing XCode, (moving the custom class to the proper source folder,) and reopening the storyboard in XCode Interface Designer from Visual Studio again did the trick. Then, the assistant editor had the .m and .h files right away.

Sign In or Register to comment.