Xcode 7 doesn't autocomplete if using bridging header
Asked Answered
T

4

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?

Tyronetyrosinase answered 22/6, 2015 at 9:14 Comment(6)
I am not having the bridging header autocomplete issue, but autocomplete isn't working with the Facebook SDK for me. Are you updated to the latest version of the SDK (v. 4.3.0 as of 6/25/15)? I might try that to see if it helps.Inshore
I got the same exact problem with Xcode 7 beta 2, Parse 1.7.5 and Facebook 4.4.0Farrish
I think I found a fix. Can you post a screenshot of the values inside your Build Settings / Framework Search Paths?Farrish
sure, here it is linkTyronetyrosinase
@VanDuTran so what's the fix?Iceman
@MorganWilde see my answer.Farrish
F
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

Farrish answered 24/7, 2015 at 18:37 Comment(9)
OMG! how could this one thing be it? Completely esoteric in my eyes. But I have to say, massive thanks to you!Iceman
Dude, this ain't my question, but I started a bounty just for you.Iceman
@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! :)Farrish
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)...Iceman
@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..Farrish
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!Rife
@AceNeerav Importing .h and .m files into a swift or obj-c project?Farrish
its an obj c project.Rife
I originally had non-recursive, and had to make it "recursive" for autocomplete to workSienkiewicz
R
0

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

For time being i am type casting as work around.

Rife answered 19/9, 2015 at 17:13 Comment(0)
N
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).

Neva answered 28/10, 2015 at 0:10 Comment(0)
C
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)

Chirlin answered 20/1, 2016 at 21:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.