clearing google analytics cached data - ios - ios

I am working on an iOS app in which I have integrated Google Analytics for tracking different events and crashes but what I want is that when my app crashes then only crash report should be sent to google analytics. Let me explain again
if app runs smoothly it should send all the data to google server
if app runs without internet then google caches all the data and sends when internet is available and it should run
now this one is important.
If app runs without internet then google caches all data, but when app is offline it is crashed and when analytics SDK tries to send the data to the server on next restart it should only send crash report instead of all the activity performed by user when he was inactive.

Related

How can we store firebase events offline and sync this events when device comes online bypassing 72 hours firebase offline sync limit?

We are having an enterprise application which is used in regions where there is no internet for many days. I am using Firebase for analytics and I have enabled firebase persistent storage which helps to send the analytics events to firebase when the device comes online but the limitation is it only sends 72 hours data to Firebase analytics. So, I want firebase to get at least offline analytics data of the last 10 days. Can I achieve this by storing this analytics event in core data when the device is offline and send this event to firebase when the device is connected to the internet? Or is there any alternative way to achieve this? I only want to send the event name and timestamp of the event.

App Analytics for device where network connectivity varies

Attempting to set up analytics for a react native app, and was going to use something like https://www.npmjs.com/package/react-native-google-analytics.
An issue though, is that there are times where the device may lose network connectivity. Are there any good libraries/solutions for storing events/views app side, then batch uploading them to something like google analytics?
You could use the actual iOS & Android SDK for Google Analytics, via the following react native bridge - https://github.com/idehub/react-native-google-analytics-bridge
As per docs for iOS & android
If a user loses network access or quits your app while there are still
hits waiting to be dispatched, those hits are persisted in local
storage. They will be dispatched the next time your app is running and
dispatch is called.

Is it possible to run queries on the offline local version of Firebase on mobile device?

I'm considering to use Firebase as the server database for the mobile app (iOS). The point is user should be able to:
Work offline with data
Run some queries on data even if it's offline
So I believe the first problem is not a problem anymore as for Firebase implemented the local offline version but what about the second one?
The scenario is: user downloads data when it's online and keep working with loaded data even if it's offline. What does it mean - the app allows user doing search by different criteria, so I have to implement some type of queries on the mobile. I can't figure out though if it's possible with Firebase.

Google Analytics missing ~5% of sessions from iOS SDK

I have an ecommerce application for iOS that is reporting transactions to Google Analytics. When I compare the analytics each week with the data from the sales system, Google Analytics is always missing ~5% of the transactions.
Further investigation turned up that it's not just the transaction data that occasionally goes missing, but all data (events, screen views, etc.).
For example, I have a user that I know used the app every day last week. However, Google Analytics shows activity for every day except Tuesday. It seems like the iOS SDK occasionally stops reporting data for chunks of time, but I'm not sure why.
We're not crossing any rate limits (best I can tell) and the app isn't uninstalled from the user's device so the data shouldn't be getting deleted.
The view I'm using in Google Analytics is filtered and has User-ID reports enabled. (I just created a new view this week with no filters and User-ID reports disabled to see if the results are different.)
Does anyone have any thoughts about what might be causing the data to go missing?

Xamarin iOS SocketException after azure synch

I am new to Xamarion iOS. I am developing a Xamarin iOS app. I have a running azure mobile service with tables ToDoItem and Expense. If download the Xamarin iOS sample To Do List app from azure portal, everything works fine, but I added the azure mobile services libraries (similar to sample) to an existing Xamarin iOS app. Now everything works and i get the data also, but after receiving data from azure after some time the app crashes with a SocketException with a message that socket has been shutdown.
Note: I am using offline sync approach to get data from azure.
Any help?
It's hard to know what's going wrong with just that description. I recommend that you add some logging code, or use Fiddler to trace the outgoing requests.
Here's a sample delegating handler, and the repo has a full client sample for Xamarin: https://github.com/paulbatum/FieldEngineerLite/blob/master/FieldEngineerLite.Client/FieldEngineerLite/Helpers/LoggingHelpers.cs

Resources