Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Weberley

macrumors newbie
Original poster
Jun 12, 2014
2
0
Hey there ;)
Im relatively new to iOS Development and programming in general, and have only taken the first baby steps in C# and recently Objective C.
I got the idea of an app, that, if running in the background consistently checks if other iPhones also have that app installed and running. Is this kind of communication (may it be wifi Ad hock or bluetooth) possible in iOS? The idea is that the app doesnt require GPS and a server to check, but rather checks this "directly".

Thanks in advance
Weberley
 
You should consider security and privacy implications.
But here are a few topics to give you ideas.

a) Bonjour (mDNS) allows you to register a service that is visible on the same wifi network

https://developer.apple.com/library...troduction.html#//apple_ref/doc/uid/10000119i

b) A server operated by yourself that Phones can register on.

(Web based, etc.)

c) Bluetooth discovery and verification (using point b).

https://developer.apple.com/library...w.html#//apple_ref/doc/uid/TP40013257-CH2-SW1

d) Geofencing to get a broad sense of location changes.

https://developer.apple.com/library...g.html#//apple_ref/doc/uid/TP40009497-CH9-SW1

e) Push notifications to wake your app (annoying as hell)

https://developer.apple.com/library...html#//apple_ref/doc/uid/TP40008194-CH102-SW1

f) Background HTTP request to show that the App is still installed

http://www.doubleencore.com/2013/09/ios-7-background-fetch/
 
Thanks pmau for the quick response!
Bonjour seems to be exactly what i need. I will look into it and report back if i still have some questions :)

Greetings,
Weberley
 
My personal take on this, i.e what I would do:

1) Implement a server (HTTP/PHP if you like).
Let iPhones call a URL at start with a unique id, probably save Bluetooth and Wifi Mac

2) Schedule a (fake) background download
This enables you to track if the app is installed even if it's not used.
Transfer the estimated location of the device to your server.

3) Register for push notifications.
Push a notification after NN days of non use to remind the user. (Annoying)
This lets you start the App after NN days of inactivity. Not recommended.

4) Use geo-fencing

Post a rough location based on Cell Tower Info to your server.
It's cheap and allows you to discover phones near to each other.
Use Location services with the lowest accuracy. It's basically built-in and doesn't cost much resources. (GPS, etc.)

5) Discover Phones

Use bonjour (as already said) and Bluetooth to discover phones near you.
Callback to your server if the Phones are known. You have the bonjour data and MAC addresses. Try to established direct connections.

Please keep in mind that most of these functions would require consent by the users and probably "Terms And Conditions" agreement pages.

But if you just want to play this might be a fun project.
 
Using Bonjour can i have my apps communicate with each other on a local network without the use of a server?


because the devices will be on a local network without internet connection, but i want them to sync, like if one device takes a order and saves, i want the other devices in the same area/store to get the order as well.


and some of the devices will be using barcode scanners via bluetooth
 
The other thing to always do when you have an idea for an app is to check the app store for similar apps. If you find some you will either get some ideas from them or give up because it's already been done.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.