iphone/ipad suddenly stops responding to firebase queries - ios

I am using firebase realtime database in my iOS application.
I am using insert into database and find user depending on filter query in my application.
It all works fine.
Sometimes suddenly my ipad and iPhone stop responding to firebase queries.
Many a times it happens that same application runs perfect on one device and doesn't work on other .
Or same build when deleted and installed stops working on ipad/iphone.
To troubleshoot this I generaly recreate my firebase authentication client id and replace my GoogleServiceInfo.plist.
But this is not the solution as sometimes it works and sometimes not.
Can anybody help regarding this issue?

I had similar problems, it seems that there is a bug for GET request from the database. What I have done is send a Post request i.e.
var rootReference = FIRDatabase.database().reference()
referenceToPath.setValue(values)
Where values are any dictionary of say type [String:String], this writes to the database and it seems to unlock the database and you can read form it.

Related

Does Firebase realtime database sync data changed while offline to the server even after app restart?

On firebases documentation it says:
Even with persistence enabled, transactions are not persisted across
app restarts. So you cannot rely on transactions done offline being
committed to your Firebase Realtime Database. To provide the best user
experience, your app should show that a transaction has not been saved
into your Firebase Realtime Database yet, or make sure your app
remembers them manually and executes them again after an app restart.
https://firebase.google.com/docs/database/ios/offline-capabilities
Yet I went into my App with an iphone 6 simulator, while offline, changed some data, then switched to iphone 7 simulator to make sure 6 simulator stopped, and then went back to the 6 simulator with my internet connection now turned on, and the change I had previously made while offline synced no problem.
What problem does this documentation point to that I need to take into account. I can't afford to make something where users are frustrated with changes they thought saved getting lost, but to my eyes there is no issue?
I think the key word there is "Transactions" which are a very specific kind of write operation. (See description here).
If you're just doing a regular ol' write to the database and not sticking it inside a transaction block, your write should be saved, even across an app restart.

My iOS app does not appear on Firebase dashboard

My app is live on the App Store and there are no crashes on the front end however when I log in to Firebase I cannot find it on the dashboard. I tried copy & pasting the database URL but I got the message saying that there was an error making the request and that I should try again later. Has anyone else encountered this issue and could advise me on who to contact to resolve it?
According to the Firebase Status Dashboard, there should be no issues with the Realtime Database at the moment.
Assuming that your app was associated with your Firebase account previously and just suddenly disappeared, I have not heard of/ encountered anything similar in the past.
One thing to try is to make sure you are logged into the correct account and have selected the correct project.
Since accessing the database directly through its URL says to try again later, this might be a temporary problem that is resolved shortly.
However to make sure, your best option at this point is probably to reach out to Firebase support directly using this form (requires sign-in).

Security of app using Parse servers

I am using Parse servers for my app, and I am concerned about people getting into the code of the app and changing the code that communicates directly with Parse.
For example, if I save a score to the database and I want to update it with a new score by the user, I have to write that code within the app. However, if someone were to change the code and hardcode in a score that wasn't earned, they technically could.
Is there a way to prevent this?
(When I say getting into the code, there is a way to do this using a jailbroken device. I don't know if Apple has fixed this, but about a year ago someone I know showed me the code to an app that is on the App Store.)

iOS - Continuously send location to a server using Xamarin

I'm working on a app similar to Happn and Tinder. For the app to be okay, it needs to continuously send to a server the position of the user that has the app installed.
For this, I've split the problem in two parts: 1. save locally into a database all the significant location changes 2. from time to time, send to the server the stored positions
The first part it works okay, I'm saving all the positions with success. The problem is that I can't find a proper way of sending that data to the server. Is background fetch a solution? Can you point me in the right direction?

iCloud and Core Data - How to debug?

I have an Library-style app which uses Core Data to store its data. Currently I am working on the integration of iCloud support.
I worked through several examples and the Apple docs and finally managed that an object created on device A is automatically synced to device B.
That is great but know I am experiencing the some problems: Some objects are synced and others are not and I have no idea how to debug this. Is there some way to "see" which data is transfered to iCloud, which data is stored in the cloud, and which data is downloaded from iCloud?
All I see at the moment is, that I create some NSManagedObject and store it to the ManagedContext/PersistentStore. I cannot see if it is transfered to the cloud and I cannot see the current content of the cloud. This makes it unpossible to debug the whole process.
So how to debug iCloud?
EDIT on 06/02/2015
I asked this question quite a while ago but it still gets some up votes or favorites. Therefore I would like to share some information I got meanwhile:
DO NOT USE iClOUD! I cannot tell you how many headacdhes and sleepless nights I had because of iCloud. It is jut not worth the candles. At least not when being used with Core Data. It just does not work reliably. This is even still true with iCloud Drive. My apps "supported" iCloud for about two years I did everything possible to get it running. Every time it seems to work I got new error messages from users. It worked fine for many users and caused trouble and even crashes for many othes. It was just terrible. Do your self a favour and use any other syncing service.
There seems to be a runtime argument
-com.apple.coredata.ubiquity.logLevel 3
check this article http://www.freelancemadscience.com/fmslabs_blog/2012/3/28/debug-settings-for-core-data-and-icloud.html?
tried the mitmproxy to see what is send and what is received?
There is a GameCenter tutorial at http://mitmproxy.org/doc/tutorials/gamecenter.html , it should be similar for iClound transfers.

Resources