0

I am using cocoapods in my swift project,and I add ReactiveCocoa to my Podfile.Although ReactiveCocoa is written in Objective-C,add a bridging-header can bridge the framework to swift.It is no difficulty using framework API in my project, but later I found that I can not reference UIControl.For example, I create a button outlet, and in my viewDidLoad method, when I try to find UIButton definition,the Xcode pops up an alert with "symbol not found" text.If you try to type that variable(not full) and press Esc to let XCode hint you,it just tells you "< < error type > >".I already know that without cocoapods,it is working correctly.Anyone could help me?

tounaobun
  • 14,570
  • 9
  • 53
  • 75
  • Your question is not clear. Cocoapods in Obj-C and swift do work perfectly together. So something will be wrong in your setup. Give us more details about your files, includes and code please. – Tom Oct 27 '14 at 10:55
  • I put my project in github:https://github.com/tounaobun/MyAppName. – tounaobun Oct 27 '14 at 11:10
  • When you open that project(from xcworkspace), could you look UIButton definition?Any help would be appreciate!! – tounaobun Oct 27 '14 at 11:11
  • Finally I solved it. It is because my xcode 6.1 has corrupted for some reason. I just download a new one from AppStore. – tounaobun Oct 27 '14 at 11:43

1 Answers1

2

I had some troubles upgrading Xcode several times resulting in corrupt cache which caused the SourceKit service to crash. This seems to be a similar problem. My solutions was to remove the derived-data folder contents as mentioned here: SourceKitService Terminated

Community
  • 1
  • 1
Tom
  • 874
  • 7
  • 13