App communicating with other devices that have the app installed

Discussion in 'iOS Programming' started by Weberley, Jun 12, 2014.

  1. Weberley macrumors newbie

    Jun 12, 2014
    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
  2. pmau macrumors 68000

    Nov 9, 2010
    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

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

    (Web based, etc.)

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

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

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

    f) Background HTTP request to show that the App is still installed
  3. loon3y macrumors 65816


    Oct 21, 2011
  4. Weberley thread starter macrumors newbie

    Jun 12, 2014
    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 :)

  5. pmau macrumors 68000

    Nov 9, 2010
    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.
  6. loon3y macrumors 65816


    Oct 21, 2011
    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
  7. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    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.

Share This Page