When does Firebase Analytics track my users? - ios

I'm working on a new version of my app that implements a new online mode, the old offline mode however will still be accessible. I chose to use Firestore as my database and I just noticed that Google tracks on what VC my users are without me having to set up anything regarding analytics.
While calls to Firebase just happen if the user chose to use the online mode I still use the same VC for both modes and that means that even if the user is in offline mode Firebase gets imported. My question is now when it is that google tracks the user on the VC. So if the user just gets tracked if the VC makes a call, or as soon as I import Firebase into the VC class. Or stated differently if I will just see the users using online mode in the analytics dashboard, or all my users.
(sorry for my english :) )

Google Analytics for Firebase automatically tracks screen views in your app. You can temporarily disable analytics in your app and then reenable in your code, or you can permanently disable it.

Related

IOS: App rejected because of App Tracking Transparency on WebView

I'm working on an app made in React Native with Expo.
It uses a web view to show the site in the app.
Everything worked well, but when I submitted my app to the App Store, it got rejected.
The mail said:
We noticed you collect data to track after the user selects "Ask App
Not to Track" on the App Tracking Transparency permission request.
Specifically, we noticed your app accesses web content you own and
collects cookies for tracking after the user asked you not to track
them.
After that, using the expo tracking transparency library, I added a permission request to track data.
If the user doesn't accept it, I disable third party cookies on the web view.
After submitting again to the App Store, I got the exact same message.
I don't know what to do, because I can't control the site, and I'm limited to the React Native web view props
Maybe, I could enable incognito mode if the user doesn't want the app to track, but I'm not sure if this will be accepted too.
i had the same issue i solved it like this:
change the privacy of the app on apple store, go to app privacy and in data types section click edit and select Identifiers (Device ID) and set this one as used for tracking purposes. and make sure that this is the only one selected as used for tracking.
also make sure that the permission is showing on real device (so test it first on TestFlight).
another thing is you need to tell them where you show this permission send them video to tell them where you show the permission.

Force Firebase to send analytics data upon backgrounding?

I'm trying to figure out where users of my app lose interest during the onboarding process. To that end, I've implemented Firebase Analytics. However, it seems that in the scenario where the user only uses the app once never to open it again, the collated analytics data are never uploaded to Firebase. Only when the app is launched a second time, the data are being uploaded.
Does Firebase Analytics have a means of forcing the uploaded upon app backgrounding?
There is no way to force the Firebase Analytics client to send its data to the server at any specific time.
But as Todd says in his blog post How Long Does it Take for My Firebase Analytics Data to Show Up?:
On iOS devices, Firebase will also send down data when your app moves into the background. So if a user tries your app for 20 minutes and then uninstalls it, that session data will still be received, because your app will have sent down the data the moment the user moved your app to the background.
The only caveat to this:
The one corner case where analytics data would actually get lost on iOS would be if your app crashed and then your user immediately uninstalled it.
So it looks like the analytics data should be sent to the server if the user background the app. If that doesn't happen for you, can you describe the flow of your users whose data is not showing up more explicitly?

ios app based on Firebase database - to incorporate changes locally

In an iOS app, developed using Firebase Database, can a user make changes to database on his/her device that is reflected only locally on his/her device?
My app is a contacts app and I want any user be able to edit or favourite a contact which should be only reflected on his/her device and not to every user using the app.
I'd recommend reading up on structuring data in Firebase: https://firebase.google.com/docs/database/ios/structure-data
(When you're done, read all the docs or perhaps follow some video tutorials on Firebase.)
This will help you establish a better understanding of how Firebase works, helping you with more than just the problem at hand.

Using Firebase with multiple users in an iOS app

A number of iOS apps I develop are used in scenarios where the Organisation has a number of Drivers and the iPhone is shared between them. Each Driver has his own app credentials, logs in to the app, and is presented with his own set of data. The Firebase data is persisted as he is offline most of the day and I use keepSynced(true) to ensure data is up-to-date.
The problem I'm having is that once a user logs out with the Firebase method FIRAuth.auth()!.signOut() then when a different user logs in, he sees the previous users' data. I'm guessing that because the data is persisted it is not cleared from the cache. However, I am retrieving the data by the user id so this doesn't quite explain it.
What is the best pattern to permit multiple users to use the same iOS app with Firebase ?
Try creating multiple instances of FIRApp, each with a different name, using the +configureWithName:options: method. Then use the different apps in FIRAuth +authWithApp and elsewhere as needed.
I haven't actually done this and am too new to Firebase to say it's the best pattern, but it seems like it should work.
One thing to note from the docs is that, "On Android and iOS, Analytics are only logged for the default app." One solution might to keep the __FIRAPP_DEFAULT app, and then make a named app for each user type.

Is it necessary to give Opt-In/Opt-Out UIAlertView for using Google Analytics in ios?

I am using Google Analytics in my ios App so is it necessary to show this(see Image) kind of Alert box to user so that he can opt out for sending data to analytics.
As we are sending data to 3rd party( Google), I just want to make sure we are not violating any Apple policies.
Thanks
In sample purpose the google analytics show this message. In real time no need of this, in every 30 minutes the session automatically cleared. If you want to close the session in manually use optout for stop the tracking else part no need of this.
If you are use the analytics and submit the app in appstore , the apple does not reject your app. I used google anaytics in my apps. The app also availabe in app store

Resources