7

I have been porting an app from Objective C to Swift. In Objective C I get autocomplete in the Xcode debug pane as shown. However, the Swift version does not. I may be missing something simple but after working around this for a few months I give up. Attached are relevant screenshots (top is Objective C).

I realize this may not be a language specific feature but how do you get debug autocomplete functionality in Swift like Objective C?

Objective C autocomplete Swift autocomplete (or lack of)

AMC08
  • 181
  • 1
  • 9
  • 1
    broken for me in Xcode7b4. I don't know about earlier versions since I just started my Swift project, but word on the street is it's been broken for awhile or maybe forever. Come on Xcode team! – Paul Bruneau Aug 07 '15 at 14:11
  • 1
    Still the same in pre-release version. – orkenstein Sep 12 '15 at 15:23

2 Answers2

0

Try the control+Space combination forcefully at locations. Sometimes it helps.

There's also this link I found. maybe it could help: XCode 6 isn't autocompleting in swift

Community
  • 1
  • 1
Karthik
  • 99
  • 2
  • 14
0

Answer is late, but I want to see my answer more people for this situation. This is not Xcode Problem. Erasing Derived data is just temporary work.

I guess you are included by one of them

  1. Your application is support Above iOS 7 (not iOS 8)
  2. Use Cocoapod or 3rd party app

Autocomplete is not working when you develop with swift above iOS7. Swift did't recommend to use static lib, but iOS7 support only static lib not dynamic lib. (see this post https://blog.cocoapods.org/CocoaPods-0.36/, http://corinnekrych.blogspot.kr/2015/04/how-well-does-swift-plays-on-ios7.html)

  1. Change your project to iOS 8
  2. Cocoapod will need use_frameworks! if you want to support dynamic lib.

If you use dynamic link, You don't have to write header in Bridge_header. Import it in Swift file like Import UIKit

One more trick is just clean your Project will make Swift Auto complete, but after rebuild, you can't use auto complete.

Kyle Yi
  • 448
  • 4
  • 11