I am using Firebase inside my app and calling FirebaseApp.configure() inside didFinishLaunchingWithOptions . Now my app works fine when I do a clean installation (delete the app and install again) and run it for the first time. But when I re-run the app the second time, it crashes on FirebaseApp.configure() with

2019-11-11 12:02:43.166729+0530 MyAppName[885:135491] 6.11.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled 2019-11-11 12:02:43.176694+0530 MyAppName[885:135418] -[FIRInstanceIDTokenInfo isFresh]: unrecognized selector sent to instance 0x281bc8a80 2019-11-11 12:02:43.179909+0530 MyAppName[885:135418] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FIRInstanceIDTokenInfo isFresh]: unrecognized selector sent to instance 0x281bc8a80' *** First throw call stack: (0x1a267180c 0x1a2399fa4 0x1a257536c 0x1a2675c88 0x1a2677a6c 0x102e632fc 0x102e48844 0x102e48714 0x102e48530 0x102986b70 0x102986e0c 0x1029869e4 0x1029811dc 0x102980c18 0x102980b64 0x10264ea14 0x10264e7d4 0x10264eb7c 0x1a66d0ef4 0x1a66d2d20 0x1a66d8554 0x1a5ea6cdc 0x1a633bfc4 0x1a5ea77c4 0x1a5ea721c 0x1a5ea75f0 0x1a5ea6eac 0x1a5eab3c8 0x1a626e6a4 0x1a63555b0 0x1a5eab100 0x1a63554ac 0x1a5eaaf6c 0x1a5d1cba4 0x1a5d1b70c 0x1a5d1c8dc 0x1a66d68d4 0x1a628f09c 0x1a7776850 0x1a779b8e8 0x1a7780fb4 0x1a779b5a4 0x107b1abd8 0x107b1dffc 0x1a77c04c8 0x1a77c0194 0x1a77c06bc 0x1a25ef7c4 0x1a25ef71c 0x1a25eeeb4 0x1a25ea000 0x1a25e98a0 0x1ac541328 0x1a66da768 0x102654b44 0x1a2474360) libc++abi.dylib: terminating with uncaught exception of type NSException

To setup firebase I am using the following

private func setupFirebase() { FirebaseApp.configure() Messaging.messaging().delegate = self }

I am using Cocoapods for installation and Firebase version that I'm using is 6.11.0