2014-12-23 64 views
0

我开始遇到Xcode 6.0.1问题,其中错误"SourceKitService Crashed Crashlog generated in ~/Library/Logs/DiagnosticReports"开始弹出,Swift中的所有语法突出显示都消失了。然后苹果发布了一个新的更新Xcode 6.1.1这里提到这个问题已经解决。所以我更新了我的Xcode到6.1.1,但是这个问题仍然存在。我的情况是,问题只是呆在那里,永远不会消失。SourceKitService在Xcode 6.1.1中崩溃

enter image description here

我试着在StackOverflow上发现,如删除的内容几个解决方案:DerivedData/ModuleCache,清理项目等,但问题仍然存在。

我无法进行构建,每当我尝试获取这2个错误时。在我AppDelegate.h文件在UIApplicationMain

/Users/MY_PROJECT/AppDelegate.swift:11:1: 'UIApplicationMain' class must conform to the 'UIApplicationDelegate' 

协议和该命令失败,原因是信号:Segmentation fault: 11

这里是我的AppDelegate.swift的代码

import UIKit 

@UIApplicationMain 
class AppDelegate: UIResponder, UIApplicationDelegate { 

var window: UIWindow? 


func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool { 
    return true 
} 

func applicationWillResignActive(application: UIApplication!) { 
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 
} 

func applicationDidEnterBackground(application: UIApplication!) { 
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 
} 

func applicationWillEnterForeground(application: UIApplication!) { 
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 
} 

func applicationDidBecomeActive(application: UIApplication!) { 
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 
} 

func applicationWillTerminate(application: UIApplication!) { 
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 
} 


} 
+1

在6.1.1中,仍有很多情况下源套件服务可能会崩溃。查看App Store中Xcode的评论部分。我每天都会看到几次这样的崩溃,但通常不会再突出显示语法。 – JeremyP

回答

0

我'不知道关于这个错误的原因,我由于各种原因得到了这个源文件的崩溃。对于您来说,如果您查看UIApplicationDelegate方法,它们在签名中会稍有变化。例如,UIApplication参数现在不是可选的。

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 
     // Override point for customization after application launch. 
     return true 
    } 

因此,如果您比较新UIApplicationDelegate方法您的委托方法(如果你命令+点击可以检查方法签名),让你可以摆脱掉这个错误变化。试一下。

+0

试过了。不工作:( –