1

While connecting to sup server from ios code i am getting this error "Terminating app due to uncaught exception 'SUPApplicationTimeoutException', reason: 'registration took longer then @i'" please some one help me out on this.

IOS Rocks
  • 2,127
  • 2
  • 21
  • 24
  • I have got the solution for this problem. Previously i was trying to connect through relay server(Farm ID:xxx) but now i have changed the relay server address as 0(Farm ID:0) and now its successfully connect and register to sup server. – IOS Rocks Dec 14 '12 at 11:30
  • You avoided the error, not managed it :) If your app starts without internet connection, or if the server is not reachable/not responds in time, you'll face the crash once again. See my answer below. – psychowood Jan 12 '13 at 09:49

2 Answers2

0

I was trying to connect through relay server in sup side because of that i was getting time out error. Later i tried to connect directly to the SUP, now its connect to sup server and register the device.

 SUP server side required details are
    SUPServerName:xxx
    SUPServerPort:xxx
    SUPUserName:xxx
    SUPFarmID:0
IOS Rocks
  • 2,127
  • 2
  • 21
  • 24
0

You need to catch the Timeout (or a generic NSException) when initializing the SUP client to avoid the crash (allowing you to manage the network error)

        @try
        {
            [app registerApplication:SUP_TIMEOUT];
        }
        @
        catch (NSException *exception)
        {
            MBOLogError(@"%@: %@", [exception name], [exception reason]);
        }
psychowood
  • 2,900
  • 1
  • 14
  • 14