0

I am building an app in xcode 9 using swift. I recently installed firebase into my project using cocoa pods. I am fairly sure I installed this correctly, however some time after making changes and messing around with my view controller I started getting "Thread 1: signal SIGBART" error. Using 'bt' gives me the following code which seems to be completely useless.

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x0000000107a7be3e libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x0000000107ab5150 libsystem_pthread.dylib`pthread_kill + 333
frame #2: 0x00000001077360eb libsystem_c.dylib`abort + 127
frame #3: 0x000000010815599b GraphicsServices`_GSEventInitializeApp + 713
frame #4: 0x00000001048a391d UIKit`_UIApplicationMainPreparations + 781
frame #5: 0x00000001048a35a6 UIKit`UIApplicationMain + 111
frame #6: 0x0000000102106bf7 Small Talk`main at AppDelegate.swift:16
frame #7: 0x0000000107663d81 libdyld.dylib`start + 1 *

The error seems to be occurring when the application opens in the simulator, the loading screen appears, and then crashes before getting to the first view controller. I have already looked at all of my references and deleting every reference did not solve the issue. Anyone have any idea as to how to debug this?

AppDelegate.swift:

    //
    //  AppDelegate.swift
    //  Small Talk
    //
    //  Created by Alex Hill on 1/4/18.
    //  Copyright © 2018 Kirkland Productions. All rights reserved.
    //

    import UIKit
    import Firebase


    import UIKit

    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(_ application: UIApplication, didFinishLaunchingWithOptions 
    launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        FIRApp.configure()
        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 invalidate graphics rendering callbacks. 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 active 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:.
    }


}

ViewController.swift:

//
//  ViewController.swift
//  Small Talk
//
//  Created by Alex Hill on 1/4/18.
//  Copyright © 2018 Kirkland Productions. All rights reserved.
//

import UIKit

class LaunchWelcomeVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        //setting custom back button
        let backButton = UIBarButtonItem(title: "Back", style: UIBarButtonItemStyle.plain, target: self, action: nil)
        backButton.setTitleTextAttributes([NSAttributedStringKey.font: UIFont(name: "GillSans-UltraBold", size: 17)!], for: UIControlState.normal)
        navigationItem.backBarButtonItem = backButton

        //setting navigation bar style
        self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.clear]

        self.navigationController?.navigationBar.shadowImage = UIImage()
        self.navigationController?.navigationBar.tintColor = UIColor.white
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        //
    }

    @IBAction func LoginButtonTapped(_ sender: Any) {
        self.performSegue(withIdentifier: "LaunchWelcomeToLogin", sender: self)
    }

    @IBAction func SignupButtonTapped(_ sender: Any) {
        self.performSegue(withIdentifier: "LaunchWelcomeToSignup", sender: self)
    }

}
Alex Hill
  • 11
  • 1
  • Does it crash if you comment out the firebase configuration? If not, what does the GoogleService-Info.plist look like that Firebase generated? – Dare Jan 23 '18 at 20:38
  • Did you already try adding an ObjC exception (not All exceptions!) breakpoint and see if that gives you a more helpful stack trace? – Kerni Jan 24 '18 at 10:24

1 Answers1

0

Turns out I had the wrong bundle identifier for the xcode project. I was using firebase and the project had the wrong project identifier. I also re-downloaded the GoogleService-Info.plist. Thanks for everyone who gave ideas

Alex Hill
  • 11
  • 1