Skip to content

No xCode Completion #663

Closed
goldo opened this Issue Nov 27, 2012 · 19 comments

6 participants

@goldo
goldo commented Nov 27, 2012

Hello,

I have a problem with pods included in my workspace: I have no completion/colors at all.
Do you have a solution/fix ?

Thanks

@fabiopelosin
CocoaPods member

Not sure if this is related to CocoaPods.

@goldo
goldo commented Nov 27, 2012

For every other manually included lib, it works fine. This problem occurs only with cocoapods included libs. I might try to reinstall cocoapods for my project ?

@fabiopelosin
CocoaPods member

Xcode appears to have some issues with headers imported through the search paths, so I'm not sure what we can do about it. I haven't experienced them, on which version of Xcode are you?

Reinstalled the Pods would not be of much help if the workspaces builds correctly, as it implies that everything is properly set up.

@goldo
goldo commented Nov 27, 2012

I think it appeared after including some pods, because, it used to work fine a few days ago. (Im on xcode version Version 4.5.2 (4G2008a))

@fabiopelosin
CocoaPods member

Did you updated CocoaPods, Xcode, or any other system change? Otherwise the new pods might be the cause of the issue. If we could isolate the source of the issue we could understand if we can do something about it.

@goldo
goldo commented Nov 27, 2012
@goldo
goldo commented Nov 28, 2012

Ok here it is : It appears to be with categories files (I used FXImageView or UIView+TKGeometry for instance)
The problem is well described here:
https://groups.google.com/forum/?fromgroups=#!topic/cocoapods/tQxriK28vGU

Edit: Actually it seems to happen on subclasses also.. I'll keep searching for the problem

@goldo
goldo commented Nov 28, 2012
@goldo
goldo commented Nov 28, 2012

After so many hours of researches, I can't still be sure what is the problem :
Sometimes I just restart xcode, it works, 5 minutes later, no color and no completion for cocoapods included libs.
It gives me red errors but it can still compile. Crazy..

Is it possible cocoapods includes doesn't work well with UnitTests provided by xcode ?
When I target the .m files to UnitTests, the color just disappear and I get errors, when I untick it, it works fine (for now..)
I hope it is the solution.. I'll tell you if it is not.

Sorry for multiple posting about this, It is not that easy finding out xcode errors..  

@fabiopelosin
CocoaPods member

Sorry for multiple posting about this, It is not that easy finding out xcode errors..

Actually, thanks for the investigative work!

@goldo
goldo commented Nov 29, 2012

No problem :) Thank YOU for ur awesome solution cocoapods !

-> Currently it really fixes my problem: uncheck the "MyProjectTests" target on .m files you want to use cocoapods, and it works !
So, no unit testing on cocoapods project for me. what about you ?

@fabiopelosin
CocoaPods member

So, no unit testing on cocoapods project for me. what about you ?

I've been a bit busy with other tasks in the last few so I didn't have the chance to investigate the issue. I'm waiting to see if more information comes out. It is unclear to me if it is an Xcode bug or a change in behavior. In any case if no easy work around pops out this is major issue which might require to use a different solution for the headers files.

@alloy
CocoaPods member
alloy commented Nov 30, 2012

It is imo clearly a Xcode bug. Red means it won’t build, but it does, so it’s broken. Please file a radar ticket and share it on http://openradar.appspot.com with the link here, so others running into the issue can file a duplicate.

@goldo
goldo commented Nov 30, 2012
@claybridges

I've had similar problems, though not using pods. If in doubt, alt-cmd-shift-K (fully cleans your build directory; four-finger salute?).

For a real fix, I've had good luck with editing the scheme, and:

  • turning off implicit dependencies & parallel builds
  • add your dependencies explicitly in the correct order

Might work for you.

@goldo
goldo commented Dec 28, 2012
@fabiopelosin
CocoaPods member

Closing this one as non actionable.

@colasbd
colasbd commented Feb 7, 2014

Have you tried deleting the folder related to your project in DerivedData ?

@ninjudd
ninjudd commented Apr 8, 2014

Thanks, @colasjojo!

Closing Xcode, deleting the folder for my application in ~/Library/Developer/Xcode/DerivedData, and then reopening Xcode fixed the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.