Firebase calling "Thread 1: signal SIGABRT"

I started an empty Xcode project, and all I did was add the Firebase framework via Cocoapods and import into the Appdelegate and viewcontroller. When I add FIRApp.configure () to didFinishLoadingWithOptions , I get this error. If I delete this line, but still import the framework, it starts without errors. This happens in an empty project without anything in the storyboard or in viewcontroller.swift.

The console says libC ++ abi.dylib: termination with an uncaught exception of type NSException (11dB)

Xcode 8.2, swift 3

import UIKit import Firebase @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:. } 

}

Podfile

  # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'dur2' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for dur2 pod 'Firebase/Core' pod 'Firebase/AdMob' pod 'Firebase/Messaging' pod 'Firebase/Database' pod 'Firebase/Invites' pod 'Firebase/DynamicLinks' pod 'Firebase/Crash' pod 'Firebase/RemoteConfig' pod 'Firebase/Auth' pod 'Firebase/Storage' pod 'SDWebImage' 

end

+6
source share
8 answers

Try the test.

Create a new project according to the instructions on the Firebase website to add the GoogleService-Info.plist project to the project.

In the step where you create the pod file, make sure that you are in your projects folder and use this text:

 # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'your-project-name' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for Firesearch pod 'Firebase/Core' end 

and enter the name of the project instead of the project name

Save the file and then run

 pod install 

Then open project-name.xcworkspace and create it.

+4
source

Works for Xcode 9

If none of the solutions worked for you, try the following:

  • Close Xcode
  • In Finder:

    • Delete the .xcworkspace file
    • Delete Podfile.lock File
    • Delete folder folder
  • In the terminal (in the project folder): pod install

  • Make sure GoogleService-Info.plist is added to your target and generated for your BUNDLE_ID.

For unknown reasons, when you use both "Firebase / Admob" and "Firebase / Core" , the Xcode code can ruin the workspace and create a poor assembly that will crash at runtime if you try to call FirebaseApp.configure () or GADMobileAds.configure (withApplicationID: "APP_ID")

+3
source

If you haven’t done it yet,

Go to your project in firebase and upload the google.plist file and add it to your project and run.

+1
source

I had the same problem and solved it using a different Gmail account. Create a new project on firebase, then create a database and add your ios application to the firebase database (make sure that GoogleService-Info.plist is added to your target and generated for your BUNDLE_ID.)

+1
source

Instead of copying GoogleService-Info.plist to your project, just drag and drop GoogleService-Info.plist into ios / appName, and then check the copy option if necessary.

0
source

I use "FirebaseApp.configure ()", but it may just be part of a new quick update

0
source

I pull my hair for 2 days ...

that's what i found

  1. make sure you have the correct GoogleService-info.plist file to include the .plist file.
  2. Direct the file to your target plist table for the target application.
0
source

For Swift 4 and Xcode 10:

Delete the XC workspace, podfile.lock, podfile and the pod folder. Then re-install the module and start with the new XC workspace.

0
source

Source: https://habr.com/ru/post/1261886/


All Articles