Xcode 7 doesn't autocomplete if using bridging

2019-02-01 13:34发布

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?

4条回答
ゆ 、 Hurt°
2楼-- · 2019-02-01 14:10

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

For time being i am type casting as work around.

查看更多
3楼-- · 2019-02-01 14:12

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).

查看更多
仙女界的扛把子
4楼-- · 2019-02-01 14:14

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)

查看更多
【Aperson】
5楼-- · 2019-02-01 14:16

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

查看更多
登录 后发表回答