Firebase Prints Analytics SSL Error, However Analytics Is Not Being Used
I have an iOS 12 Swift app that uses Firebase. I am only using the following firebase pods:
pod 'Firebase/Core', '~> 5.4'
pod 'Firebase/Auth', '~> 5.4'
pod 'Firebase/Firestore', '~> 5.4'
I am not using Firebase Analytics but I think it is bundled with the Firebase/Core
pod.
Error message:
5.4.1 - [Firebase/Analytics][I-ACS901017] Encounter network error. Code, error: -1200, Error Domain=NSURLErrorDomain Code=-1200 "Se ha producido un error de SSL y no puede establecerse una conexión segura con el servidor." UserInfo={NSErrorFailingURLStringKey=https://app-measurement.com/a, NSLocalizedRecoverySuggestion=¿Quieres conectarte al servidor de todos modos?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <699995C5-0868-4814-BE8C-4273D8CDBE63>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask <699995C5-0868-4814-BE8C-4273D8CDBE63>.<1>"
The localized error message is written in Spanish. It says something like "An SSL error has been produced and it wasn't possible to establish a secure connection with the server."
I do not have Analytics enabled in my app and I don't reference it in any of my code. I want to implement this in the future, but while this happens ¿Can I stop getting this very annoying message?
Answer
According to Firebase documentation
Permanently deactivate collection
If you need to deactivate Analytics collection permanently in a version of your app, set
FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED
to YES in your app's Info.plist file.
Setting FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED to YES takes priority over any values for FIREBASE_ANALYTICS_COLLECTION_ENABLED in your app's Info.plist as well as any values set with setAnalyticsCollectionEnabled.Temporarily disable collection
AnalyticsConfiguration.shared().setAnalyticsCollectionEnabled(false)
Related Questions
- → Function Undefined in Axios promise
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Click to navigate on mobile devices
- → Playing Video - Server is not correctly configured - 12939
- → How to allow api access to android or ios app only(laravel)?
- → Axios array map callback
- → Access the Camera and CameraRoll on Android using React Native?
- → Update React [Native] View on Day Change
- → Shopify iOS SDK - issue converting BuyProductVariant to BuyProduct
- → BigCommerce and shopify API
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → React Native - Differences between Android and IOS
- → What is the difference between React Native and React?