【发布时间】:2014-12-23 08:41:20
【问题描述】:
我开始遇到 Xcode 6.0.1 问题,错误 "SourceKitService Crashed Crashlog generated in ~/Library/Logs/DiagnosticReports" 开始弹出,并且所有语法高亮在 Swift 中都消失了。然后,Apple 发布了一个新的更新 Xcode 6.1.1,其中提到了此问题已得到解决。所以我将我的 Xcode 更新到 6.1.1,但这个问题仍然存在。我的情况是,问题只是留在那里,永远不会消失。
我尝试了一些在 StackOverflow 中找到的解决方案,例如删除以下内容:DerivedData/ModuleCache、清理项目等,但问题仍然存在。
我无法进行构建,并且每当我尝试得到这 2 个错误时。
/Users/MY_PROJECT/AppDelegate.swift:11:1: 'UIApplicationMain' class must conform to the 'UIApplicationDelegate'
我的 AppDelegate.h 文件中 UIApplicationMain 的协议,此命令因信号而失败: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:.
}
}
【问题讨论】:
-
在 6.1.1 中仍有许多源工具包服务可能崩溃的情况。查看 App Store 中 Xcode 的评论部分。我每天都会看到几次这样的崩溃,但它们通常不会再删除语法突出显示。
标签: ios xcode swift ios8 xcode6