Why do I get Source Kit Service terminated error? [duplicate]

最后都变了- 提交于 2019-12-23 14:55:48

问题


With second line something wrong, what?

let modelURL = NSBundle.mainBundle().URLForResource("xxx", withExtension: "momd");
let managedObjectModel = NSManagedObjectModel.init(contentsOfURL: modelURL)


回答1:


In my case I had imported missing files in bridged header. After I deleted it the error notification gone.




回答2:


the issue is the ";" letter end of the first line, I removed it, and now it works, no popup anymore, that was an interesting side effect




回答3:


In my case, I created about 6+ swift files for one or two targets and SourceKit Service Failure errors occurred. I found I was importing Frameworks that I was not using. So I deleted many of the import lines across the .swift files. For me, it was helpful; I am getting (much) less error.

Hope this helps.

KW




回答4:


I run across this every once in a while too. As near as I can tell, it's an issue that occurs when you try to do something that the type checker doesn't think is valid - I run across it a lot when writing for-in loops. You should file a bug report, detailing what code, exactly, produces the error.

For now, you'll probably have to play with it until you find a combination that doesn't make the realtime-compiler angry.




回答5:


Set the target to 7.1 fix my issue. Hope this helps you.

Update: I have a working solution here, works for me:

Error Xcode 6 --> Error SourceKit terminated. Editor functionality temporarily limited

Hope can help



来源:https://stackoverflow.com/questions/24596729/why-do-i-get-source-kit-service-terminated-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!