gpt4 book ai didi

ios - Xcode:威胁 1:Sigabrt 错误

转载 作者:行者123 更新时间:2023-11-30 13:29:07 25 4
gpt4 key购买 nike

当我尝试访问应用程序的某些部分时,我的应用程序显示此错误。此外,当我尝试在 iPhone 6s 模拟器上运行它时,它不会显示此错误,但在所有其他模拟器上都会显示该错误

我使用 Firebase 作为后端。

这是我的 AppDelegate 的屏幕截图,显示了错误[应用程序委托(delegate)屏幕截图]

enter image description here

这是我的AppDelegate

import UIKit
import Firebase

var UID : String?
var EMAIL: String?
var PASSWORD: String?
var NOTIFICATIONS: Int?
var SAMPLENO: Int?

let userData = NSUserDefaults.standardUserDefaults();

struct Keys {
static let UID = "UID";
static let EMAIL = "Email";
static let PASSWORD = "Password";
static let SAMPLENO = "SampleNo";
static let AGE = "Age";
static let WAKEUP = "WakeUpTime"
static let SLEEP = "SleepTime";
static let NOTIFICATIONS = "Notifications";
static let ACTIVITIES = "Activities";
static let ACTIVITYCOUNT = "ActivityCount";
static let DISTRACTEDCOUNT = "DistractedCount"
static let ACTIVITYFOCUSLEVEL = "ActivityFocusLevel";
static let INTERVALMIDDLES = "Interval";
static let INTERVALERROR = "Error";
static let TOTALFOCUS = "Focus";
}

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
UINavigationBar.appearance().barTintColor = UIColor(red: 20/255.0, green: 36/255.0, blue: 141/255.0, alpha: 1)

UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor(), NSFontAttributeName: UIFont(name: "HelveticaNeue-Light", size: 19.0)!]

UIBarButtonItem.appearance().tintColor = UIColor.whiteColor()

UINavigationBar.appearance().tintColor = UIColor.whiteColor()

Firebase.defaultConfig().persistenceEnabled = true

return true
}






// Function deals with notification if app is in the foreground
func application(application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) {
// Do something serious in a real app.
// print("Received Local Notification:")
// print(notification.alertBody)
}


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:.
}


}

提前致谢。

最佳答案

请检查所有连接,确保所有 IBOutletsIBActions 均正确连接,并且不存在旧的、删除的或修改的变量留下的任何连接.

关于ios - Xcode:威胁 1:Sigabrt 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36785578/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com