11

So, the problem is that when I import anything in the Xcode 7 using Bridging Header Xcode doesn't autocomplete my code, no matter if I import given framework, header file in my current .swift, if it's just in bridging header Xcode doesn't autocomplete.

Though things are different dependently on framework, if I import Parse framework Xcode doesn't autocomplete at all, like no NSString, no other basic stuff. When I tried to import FacebookSDK, Xcode autocompletes basic stuff like NSString, but it doesn't autocomplete FacebookSDK related stuff.

Also I tried running same project in Xcode 6 and there autocomplete works properly. Is it something wrong with my Xcode 7 or the frameworks? I already tried deleting cache, derived data, reinstalling Xcode 7 but none helped. Any tip?

Damian
  • 135
  • 2
  • 7

4 Answers4

17

The solution that worked for me is to make sure you put an individual path for each framework you include in your project as in the screenshot below.

enter image description here

Van Du Tran
  • 6,736
  • 11
  • 45
  • 55
  • OMG! how could this one thing be it? Completely esoteric in my eyes. But I have to say, massive thanks to you! – Morgan Wilde Jul 24 '15 at 18:42
  • Dude, this ain't my question, but I started a bounty just for you. – Morgan Wilde Jul 24 '15 at 18:47
  • @MorganWilde Thanks a lot dude! Really appreciate it :) And I'm glad it fixed your problem, cause that was a real pain to deal with! :) – Van Du Tran Jul 24 '15 at 19:11
  • Tell me about it... I spent this whole day struggling with the effects of this bug. I'm just curious why not many other people are having this issue (judging by the amount of questions on SO related to this)... – Morgan Wilde Jul 24 '15 at 19:26
  • @MorganWilde I don't know. Maybe there are not that many using Parse/Facebook and Xcode 7 beta at the moment? Me too I was expecting a lot more people having this problem.. – Van Du Tran Jul 24 '15 at 20:00
  • i am not linking an external framework. just importing one of my .h files in the project in another .m file and it wont autocomplete. i dont know how to continue without reaching my destination view controller's properties! – AceN Sep 18 '15 at 05:10
  • @AceNeerav Importing .h and .m files into a swift or obj-c project? – Van Du Tran Sep 18 '15 at 12:05
  • its an obj c project. – AceN Sep 23 '15 at 09:15
  • I originally had non-recursive, and had to make it "recursive" for autocomplete to work – SuPotter Oct 13 '15 at 18:33
0

Obj c. Importing .h files into other .m files in the same project.

For time being i am type casting as work around.

AceN
  • 771
  • 10
  • 18
0

The Facebook SDK frameworks weren't showing up in code completion for me. What finally worked was copying the framework files into the Project directory, though the Facebook official instructions recommend using references to the 'Documents' folder.

I tried the solutions from Morgan and Van Du in adding specific directories to the framework search paths, and doing recursion, but no dice for me. Had to fully copy into project directory (running Xcode 7).

0

after I have tried every solution at stackoverflow I remove all custom plugins – and this was it. Xcode -> Windows -> Package Manager (in my case it was something about hightailing strings)