Auto complete issue with dataTaskWithURL

Hi,
When I run the following code with AppCode 3.3 (XCode 7.1, Swift), two things happen.
1) After "session.dataTaskWithURL(" I don't get any auto-complete suggestion. Specially for expanding closure. ( { (data, response, error) -> Void in )
2) In the last line after typing "task." I don't get any auto-complete suggestions and AppCode says task is unknown.

Has anyone else experiened similar issues?

 
var url = NSURL(string: "some URL here...")
 
let session = NSURLSession.sharedSession()
 
let task = session.dataTaskWithURL(url!) { (data, response, error) -> Void in

  if
error != nil {
    print(error)
  } else {
    print(NSString(data: data!, encoding: NSUTF8StringEncoding))
  }
}

task.resume()


I hope AppCode team is working on this issue. It's sad that AppCode tries to be as good as IDEA or Resharper but it falls short on even suggesting method signatures. This is not the only examples but where I think if I use AppCode, I have to have XCode open to get suggestions that AppCode doesn't provide.

Ali

1 comment
Comment actions Permalink

Hi Ali.

I've created issue OC-12680 for point (2) from your report, however, point (1) is not fully clear: do you invoke Basic (Ctrl+Space) or Smart (Ctrl+Shift+Space) completion for closure params? What variables do you expect to appear there (could you please specify relevant declarations that you have)?

0

Please sign in to leave a comment.