Search Unity

wifi drops on ipad after inactivity?

Discussion in 'iOS and tvOS' started by pat_sommer, Sep 11, 2012.

  1. pat_sommer

    pat_sommer

    Joined:
    Jun 28, 2010
    Posts:
    586
    hey everyone...

    so i have a job where multiple ipads are networked together, but may be inactive for some time between use, but they still need to stay connected..

    im using the connectionGUI and/or the masterserverGUI scripts from the multiplayer tutorial to connect,

    it seems after some time of inactivity (but sometimes randomly?) the ipads one by one loose connection, i have yet to find any type of consistent pattern but im running more tests

    is there a time out on ipads for networking if the ipad is not being touched or used?? any insight on why the connection just drops?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    1. Ensure that you enable 'require wifi' in the player settings
    2. Ensure to do send stuff even when no input happens as the wifi will go to sleep if there is no connection required to save battery
    3. Ensure the app does not go to sleep otherwise its completely removed from execution and you will drop no matter what
     
  3. pat_sommer

    pat_sommer

    Joined:
    Jun 28, 2010
    Posts:
    586
    1.thanks for the input, i did not have require wifi set so hopefully that will help,

    2 how should i go about ensuring the keep sending stuff? i have objects that are using the "OnSerializeNetworkView" function, will this suffice? or is it a trick like network instancing an empty game object then deleting it? (seems like that would be kinda silly)

    3. i have the settings on the ipads themselves to never shut off, is this fine or is there a programmatic way you think would be better?
     
  4. pat_sommer

    pat_sommer

    Joined:
    Jun 28, 2010
    Posts:
    586
    "knock on wood" but i think that little require wifi checkmark did the trick, been running for over 3 hours now and before it struggled to get 30 mins :D thanks man!