App communicating with other devices that have the app installed

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

  1. Weberley macrumors newbie

    Joined:
    Jun 12, 2014
    #1
    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
     
  2. pmau macrumors 65816

    Joined:
    Nov 9, 2010
    #2
    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/
     
  3. loon3y macrumors 65816

    loon3y

    Joined:
    Oct 21, 2011
  4. Weberley thread starter macrumors newbie

    Joined:
    Jun 12, 2014
    #4
    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
     
  5. pmau macrumors 65816

    Joined:
    Nov 9, 2010
    #5
    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

    loon3y

    Joined:
    Oct 21, 2011
    #6
    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 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #7
    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