I need to know if this is possible. I want to develop an iPhone app that uses facebook credential to login (this is possible i know) and the create an event (like a dinner) and invite friends from facebook. When the time for the event comes (like 15-20 minutes before the start time) all the users that are attending the event can see how far are the others participants to this event using GPS (Core Location lookups) and see on a map as they move towards the place of the event
Yes. Everything you have described in your question is possible.
However, iPhone doesn't allow things like that to run in the background - your app would only work if each guest had the app open as they were travelling towards the event. The app would then update a server somewhere with their locations.
You might be able to do this with a notification that told them to open the app 10 minutes before the event started?
Android allows background tasks so you might want to write this for Android devices first and then make an iPhone version later?
Related
I am thinking to make my own app like Find My iPhone app . But I am confused that whether apple allow developers to have access to play with the security or is there such Apple API's that can help us to include features as in the above app. Any suggestions?
Well I just can't comment because of low reputation. But people must give a reason to down-grade a question. Its quite a valid question.
Creating an app like this is semi possible. Due to the fact that you are not allowed to keep running in the background, except for certain special cases. Such as Music or a guidance app (navigation apps)
Your app can register to receive updates from the GPS location and process them.
The problem is it will use your gps all the time.
The find my iphone app is a combination of wifi location/sim card location/gps location.
It uses a combination of all these items which it has to keep track of your location as close as possible. Now back to your question, the fact that you cannot keep running in the background, will mean the app needs to stay open all the time (open I mean running, not necessarily onscreen). Not like the application from apple itself, which of course is allowed to go outside these developer restrictions.
The APIs exist for you to create the main functionality of this app. Core Location and APNS
When use A is looking for the location of user B, A would tell a server that it needs user B's location.
A push notification could fire up user B's app, at which point...
User B's location services would kick in, in the background,
Send this information to your server
Then update user A with another push notification.
I was wondering if it possible to create an application that will send my 9 year old's iPhone location let's say each 30 minutes, even when the iPhone is not active.
If not, then is it possible to send it each time he uses his phone?
Why not using an existing solution?
http://www.apple.com/icloud/features/find-my.html
See find my friends - it has also parental restrictions. This is excatly what you want.
You're probably looking for startMonitoringForReigion:desiredAccuracy:. This function will allow you to set the iPhone to notify your app anytime a defined boundary is crossed. When you receive this notification, I believe you can send that info to a server or wherever.
That said, if monitoring your child's location is what you want, you'll have great luck with the Find My Friends app from Apple.
Hello I would like to know if there is an equivalent to the android's alarmManager so I can register my app to be waken every X seconds?
No. At least not directly Here's the list of all kinds of multitasking that Apple supports from its's What's new page:
Multitasking
iOS 4 delivers seven new multitasking
services that allow your apps to
perform tasks in the background while
preserving battery life and
performance. These multitasking
services include:
Background audio - Allows your app to play audio continuously. So
customers can listen to your app while
they surf the web, play games, and
more.
Voice over IP - Your VoIP apps can now be even better. Users can now
receive VoIP calls and have
conversations while using another app.
Your users can even receive calls when
their phones are locked in their
pocket.
Background location - Navigation apps can now continue to guide users
who are listening to their iPods, or
using other apps. iOS 4 also provides
a new and battery-efficient way to
monitor location when users move
between cell towers. This is a great
way for your social networking apps to
keep track of users and their friends'
locations.
Push notifications - Receive alerts from your remote servers even when
your app isn't running.
Local notifications - Your app can now alert users of scheduled events
and alarms in the background, no
servers required.
Task finishing - If your app is in mid-task when your customer leaves it,
the app can now keep running to finish
the task.
Fast app switching - All developers should take advantage of fast app
switching, which allows users to leave
your app and come right back to where
they were when they left - no more
having to reload the app.
Adding to Georg's answer, you probably want this:
Local notifications - Your app can now alert users of scheduled events and alarms in the background, no servers required.
Unfortunately it also requires the user to okay relaunching the app to run your code.
I need to read the iPhone users location using google maps, but I don't want the user to have to run my app to do so. It doesn't necessarily need to be tracked constantly, but I might want to check the user location every 10 or 20 minutes.
Ideally this feature could be turned off or on by the user, but the most important part is that I don't want to have to run the app in order for it to check the user location. Is this possible? How would you go about doing this?
For an iOS 4 multitasking app, you want to read this document on Receiving Location Events in the Background. The user will need to run your app to start the tracking process.
I can't seem to find a clear answer to this-- I'm spec'ing out an iPhone app that I'd like to have live in the background and notify the user at certain periods throughout the day. So the user would launch the app in the morning and then continue to use their phone, then every few hours the app would pop open a notification dialog.
Will my app ever be shut down (automatically) by the OS? Or will it just live forever, notifying user when it needs to?
thanks,
Eric
Basically there are three kinds of running in the background on iOS 4:
Running in the background to "finish" stuff (e.g. upload a posting or a picture, finish processing something etc.). You ask the OS to grant you extra time after the user switches to another app, and it will tell you how much time you got. You can't run in the background for an indefinite time.
Running in the background to do specific stuff: VoIP, tracking location (e.g. for GPS navigation), or playing audio. You can only do the stuff that you told the OS you would do in the background.
Local notifications (UILocalNotification). From your description, this is what you're looking for. You're not actually running, you just schedule notifications, and when it's time to notify the user, they'll be notified and can go to your app. If you need to notify the user dynamically (i.e. you don't know ahead at what times they need to be notified and it's not location or VoIP triggered), you might want to look into push notifications.
Apple has a good overview here:
https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/about_the_background_execution_sequence