iOS - Continuously send location to a server using Xamarin - ios

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?

Related

Background process for mobile device tracking web site

I am working on a web site for emergency service workers that would also track the position of each person from thier Mobile phone with thier permission when they log on.
I am able to open a web page and using JS and PHP write away the coordinates of the user to a mysql database then display the result on a google map using API
The problem is that I need to run the saving of the coordinates in the background, as if the user moves to a new page and loses focus of the page writing the data or auto lock kicks in on the mobile (ie goes to sleep) the writing of the data stops
I have tried working with 'web workers', but they seem to NOT allow PHP code so I cannot write away the coordinates to MySQL
Any suggestions for how I might be able to run a background process that writes the data to MYSQL even when focus is lost or device goes to auto-lock, I can stop the process when a close indicator is made in the database stopping the incident tracking so it does not run for ever
Any ideas most welcome

iphone/ipad suddenly stops responding to firebase queries

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.

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.)

Find if user is near a certain location iOS

I want to make a app which will find nearby coffee shops and push notify users if found any within 1 mile.
I just wanted to make sure How it can be done
This is what I have thought about till now
Get users Location
Update every minute in background and find if changed
If changed, find nearby Stores from the database on server
If found any nearby Stores, Push Notify user on their phone.
1 notification per store, so if same store found in same location, it won't send push notification again.
Please do tell me, if this can be done. I'm just not sure about background location updating in background or even if the app is closed.
I will suggest that you take a look at Parse.com - A very mobile-friendly (both android, win and iOS) DB and library system. Easy to set up to user location and geolocation for your stores. Parse has an in-built push notification system, that works really easy, which could be triggered by how far you are from a store. Parse's DB is scalable and free to use until you reach a high level of user traffic in your app.
Take a look: Parse.com

iBeacon notification database

I have a question which I have not been able to figure out so I decided to see if I can get some help on here.
I am working on an iBeacons project and I have been able to understand the basic function of iBeacons, setting up UUID'S and major and minor id's to specify exact notifications, but my question is how do I dynamically update information I send out to the users without having to go into the code each time to do this. Do I need to create a database to store all my information I want to push out to users? if so how will this database constantly refresh messages pushed out to users? An example would be lets say if you walk into a store and you get a notification in the shoe section saying there is a 10 percent off, you look at the notification but not too impressed and start to walk out, then you get another notification saying for today only you can get a 25 percent off... The app has to dynamically refresh for this to be possible.
Please help me clarify this
Thank you very much for the help
What you probably want is to store this deal information in a web service so you can update it without changing the app. Your app would need to download the updated deal information from the web service either when it starts up or when it sees an iBeacon.
My company, Radius Networks, offers a tool called Proximity Kit that makes this easy. You can assign arbitrary key/value pairs to iBeacons using a web interface. Then your app downloads them automatically an has access to them whenever you see iBeacons.
In your scenario, they key/values could be something like:
primary_offer_text=10% off all shoes
secondary_offer_text=20% off all shoes

Resources