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.
Related
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.
I want to create an app that allows a user to find the nearby other users location using GPS coordinates who are Logged in to the same app .Also it can be track the location of the devices(Logged in to the same app) which are moving in a car .
Can someone give me an overview of how I can accomplish this. is there any free API available to accomplish this task.
Danielbeard is correct - you would need to be continually storing/updating locations on a server somewhere. Your app does get some running time when it is in the background, but I'm not sure it would be enough to run the web traffic that you'd need.
Check out this post: Running app in background and send frequent http request
And check out the multitasking guide here: Multitasking Guidelines
You can also look at Push Notifications. Hopefully this helps.
In iOS7 MultiPeerConnectivity was introduced to find near by applications, so if you have a coffee shop and someone walks by or in they could get the latest deals, or, you walk into a room and the music changes to what you like as your device exchanges information with another.
http://nshipster.com/multipeer-connectivity/
How does Apple do polling of a phone's location remotely? Is there any API that allows an app developer to do the same with the SDK?
My guess is that they are private, undocumented and probably un-callable api's.
I couldn't imagine the huge security implications of having an external party/app be about to poll a phone location without the users consent.
An iOS device already maintains a connection to one of Apple's push servers if push is enabled, and the server has to know the device on the end of the connection (to determine the push notifications to deliver to it). The easiest way to build on this is to have the server say "tell me where you are!" as a push notification.
The device also hits Apple's servers for other reasons (App Store updates, captive login page detection), but it's less likely that the server can identify the device in these cases.
That said, you can do this with the user's consent:
Make your app a background "voip" app (<key>UIBackgroundModes</key><array><string>voip</string></array> I think)
At app launch, check that you can retrieve the current location (I'm not sure what happens if you do this while your app is backgrounded).
Maintain a "voip" connection to your server.
When the server asks the device for its location, ask Core Location for the location again and send it to the server. (I think you also need either "location" in UIBackgroundModes or you need to keep the connection active, possibly in both directions; the former may be easier.)
You won't be able to stop the "location services" icon from appearing in the status bar. The usual multitasking caveats also apply (your app can be killed if the phone runs out of memory; "voip" causes your app to be relaunched sometime later though).
I'm pretty sure if you do the "voip trick" your app will be refused from the store. It is only allowed if your app is actually a VOIP app, not just using it as a technique to circumvent background processing restrictions.
I have a requirement in my iPhone app that I know when somebody running the same app is close by.
I'm thinking that GameKit using Bluetooth would let me do that. GPS location is not precise enough in this particular case.
However, if the user closes the app then the function won't work anymore. Even under iOS4, the task switching will close down the BonJour services so I can't have the app run in the background.
Seems to me I can only have this function if the user leaves the app up and running. Would you agree? Or is there a different approach I can take?
People are very concerned with privacy, so they would naturally expect such privacy invading functionality to be switched off when they close down the application.
If they choose to have this feature enabled, then it's a different matter. Then they expect that somebody else may locate them.
You might however consider implementing some sort of opt-in offline service, where the latest gps position is stored on a server including a timestamp. When somebody else (with the app running) moves within a certain distance of this location while it's still "fresh", then you send off a notification to the first device. That way the user would be notified that somebody may be close, and can then switch on their own device.
http://developer.apple.com/iphone/news/archives/2010/february/#corelocation
Can anyone tell me what is the exact description of an ad and just a hint for a user?
We are developing a library that shows small banners depending on user's location. E.g. we are passing a cafe - we have a banner about this cafe, we are passing a church - we have a banner about this church. The library is to be re-used in other apps.
So from one point of view we are advertising a cafe, but from another point of view we are giving the user an advice about places to eat around him. So what is the border between an ad and advice to a user?
I think the problem is that such an app tracks the location of the user and location specific ads will constantly remind the user that their physical location is being tracked.
This is an obvious privacy and security issue but I also think Apple wants to prevent users from experiencing that creepy feeling that comes from knowing somebody is tracking you against your will.
In order to feed the iPhone location based adds, you have to upload the location of the iPhone to a server, process the appropriate adds for the location and push them back. That means that an external 3rd party, that neither Apple nor the user can control, is constantly tracking the location of the phone while the app is active. Since an app can capture info identifying individual phones, that turns the app into spy program.
Even if you actually did all the processing inside the app on a single phone e.g. looking up an internal local database, the user would still most likely assume they were being tracked remotely.
There is no way Apple will risk the damage to the iPhone's brand that would come from news stories screaming, "iPhone App Secretly Tracks User's Locations Anywhere in the World!"
The library you have in mind is clearly verboten. You could might get way with it if had a mechanism for constantly asking the user if they wanted to load location specific ads.
(BEGIN RANT: As an aside, I would say this sounds like something the explicative-deleteds in marketing came up with. They think "Hey, we can push location targeted ads at users and force them see those ads when they use any of the apps with the library! Think how great that will be for advertisers!"
Marketing driven design is almost always a disaster. If they started the design with the idea, "Hey, I think I as a user would like to have the option of seeing ads relevant to my location with a mechanism I control and which protects my privacy and security," then they would come up with a much better library.
In the long run, you make money by giving end users more power and control over their work and lives. You don't make it by strapping them down and force feeding them what you want.
If you personally wouldn't want the functionality and no users have asked you for the functionality, then its probably a bad idea. END RANT)
Edit01:
Let me address this:
So from one point of view we are
advertising a cafe, but from another
point of view we are giving the user
an advice about places to eat around
him. So what is the border between an
ad and advice to a user?
I used to work at Apple in several capacities so I understand a bit how they think.
An ad is something pushed onto the user with any prior action of the user's part. The user doesn't request the ads, doesn't select the ads may not even want the ad but they just appear anyway.
Advice is something the user ask for explicitly. An app with a button that says "Show adds for businesses in your immediate vicinity" would fall under the heading of advice. Even an app whose stated function was to show adds for businesses in the vicinity would be fine. In both cases, the user request specific information. It is not pushed onto them. More importantly, the user can control if they send their location or not.
I got caught in the nutcracker back when Apple thought it was a good idea to have dialogs popping up telling people how to upgrade to Quicktime pro. It caused no ends of problems for end users especially those in institutions because it took control out of the hands of end users and administrators. I got to stand between irate customers and the genius that thought of the idea, which turned out to the actual genius Steve Jobs. Eventually, he saw the light and the desktop ad experiment was terminated.
Jobs and Apple learned their lesson. Don't force ads on end users. Especially don't tie ads to the functioning of the software (in this case, the location manager.)
The big thing in Apple's announcement is the part that says: "If your app uses location-based information primarily to enable mobile advertisers to deliver targeted ads based on a user's location, your app will be returned to you by the App Store Review Team for modification before it can be posted to the App Store."
Is the major function of your app to advertise to users -- regardless of the fact that they may ask for the ads or not? If the major function is to advertise to users based on their location or the greater portion of Location Services usage is for the purpose of advertising to the user then Apple will reject the app. Period.