Firebase Stops working when app starts second time in iOS - ios

Here I am facing a bug in iOS Objective-C.
if([FIRApp defaultApp] == nil){
[FIRApp configure];
}
in AppDelegate.m
If I delete App and and run a fresh install, Google Phone Auth and All REST APIs work fine. After closing the the App and starting second time. [FIRApp configure] If I manage not to configure app, all REST APIs start working but App starts crashing with the error: Firebase App is not configured.
Please reply if anyone has faced this issue and resolved.
Thanks in Advance.

Related

Xamarin.iOS app crashes on startup on iOS13 on Testflight

I have tested the application on Testflight and as soon as I open it everything works correctly. The problem comes when I close the app and open it again, at that moment the application crashed and does not let me open it anymore.
I am testing on my iphone 6s with iOS 13.1.3.
Can anyone help me, please?
The App Center SDKs work well for capturing crash information. You can then see it in the App Center Portal
I have already added AppCenter to the project, and now I can see the analytics, but it doesn't catch me crash error.
About the configuration of AppCenter, I have added to the AppDelegate.cs (FinishedLaunching)
AppCenter.Start("bxxxxxxxxxxxxxxxxxxxxxxxxxxx3a0",
typeof(Analytics), typeof(Crashes));
Crashes.NotifyUserConfirmation(UserConfirmation.AlwaysSend);
Crashes.SetEnabledAsync(true);
And to the App.xaml.cs
AppCenter.LogLevel = LogLevel.Verbose;
AppCenter.Start("ios=b41cxxxxxxxxxxxxxxxxxxxxxxxxxx0;" +
"uwp={Your UWP App secret here};" +
"android={Your Android App secret here}",
typeof(Analytics), typeof(Crashes));
Crashes.NotifyUserConfirmation(UserConfirmation.AlwaysSend);
I test the Crashes.GenerateTestCrash on the simulator and It works, but exaclty the iPhone crash no

IOS app stuck in splash screen on IOS version 10.2.1 with no error

My iOS app was perfectly working till yesterday. My QA was testing and there was no bug at all. But when I tried to install from Xcode to my iPhone 6 somehow it got stuck in splash screen and debugger shows absolutely no error. I googled a lot but no luck. I even tried to run previous version by switching my current branch but no luck.
This is what my debugger look like:
2018-02-07 12:49:56.982145 Marham[547:85300] 4.8.1 - [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40009000 started
2018-02-07 12:49:56.982649 Marham[547:85300] 4.8.1 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see [some-Link])
2018-02-07 12:49:56.983029 Marham[547:85300] 4.8.1 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
[some-Link]to ensure proper integration.
(lldb)
and here is the surprising thing for me that, app runs without any issue on simulator but got stuck only on real device.
Do you still have this issue ?
Because I had a similar one and that was because a local storage variable was blocking the execution of the first view on the phone (the simulator was working fine).
So I advise you to put your phone on debut mode and make a breakpoint on the main function in the App Delegate.
This way, you should be able to se if there's an async function waiting for nothing.

iOS, Firebase - Firebase causing crash - How to unconfigure app so that I can use database?

I configured my app using
FirebaseApp.configure();
In my Appdelegate and launched the app.
I then needed to add database functionality so I removed the above code (because it crashes and tells me the app is already configured) and added:
AppDelegate.ref = Database.database().reference()
But then I get this error:
must call `[FIRApp configure]` (`FirebaseApp.configure()` in Swift) before using Firebase Database.'
So, I am now stuck because if I add the configure() back my app just crashes and the error tells me the app is already configured.
Do I have to reconfigure? If so, how do I go about doing that as there is nothing in the documentation on this?
As suggested by Francesco, I redownloaded the configuration file. This fixed the issue.

Stop tracking Crashlytics runtime in iOS

I've just integrated Crashlytics with iOS and it's quite easy integration steps. I started session of crashlytics in didFinishLaunchingWithOptions with code [Fabric with:#[[Crashlytics class]]]; and its start tracking.
At some point in App I want to stop tracking of Crashlytics so how Can I do this? Is there any code for this? There is a way to stop tracking from online Dashboard in Crashlytics but I want to do from Code.
Looking for suggestions and help.
Thanks.
Xcode debugger does NOT allow Crashlytics to process crash reports.
if you have your device connected to your Mac, XCode's debugger will step in as well. So just disconnect the device before testing.
To make sure a crash is reported during your simulator testing:
Launch simulator
Press stop
Launch your app and force a crash
Relaunch the app from simulator
See the crash report in the web dashboard
Reference
Mike from Fabric here. I believe you're looking to kill an active Fabric session once it's been started with the same launch/session of the app.
In that case, there is not a way to kill the SDK session. I'd recommend wrapping the Fabric init in a conditional call or boolean check to see if Fabric should be initialized or not.

QuickBlox iOS SDK , Enabling Cloud Back-End Server AUTHKEY/APPLICATION ID TO APP DELEGATE

I have followed all the guidelines of how to set up the iOS SDK that QuickBlox provides. I added the SDK through cocoa pods, added the run script with the snippet code. example here! I came to a crossroad and got stuck in how to add the auth-key, app-id.. ect. To The app delegate?
This is how you set the values in AppDelegate for QuickBlox
First
import Quickblox
in your AppDelegate, then in didFinishLaunching add this
QBSettings.setApplicationID(yourAppId)
QBSettings.setAuthKey(yourAuthKey)
QBSettings.setAuthSecret(yourAuthSecret)
QBSettings.setAccountKey(yourAccountKey)

Resources