1

我正在使用 sup 2.1.3(SUP 服务器)开发 ios 本机应用程序。但是我在sybase控制中心注册设备时遇到了错误。我已经搜索过这个但是我没有得到任何解决方案..有人可以帮我解决这个问题吗?

我的代码:

SUPConnectionProfile *sp = [self.connectionProfile syncProfile];
        [sp setDomainName:@"default"];
        [sp setServerName:@"john-PC"];
        [sp setPortNumber:2480];
        [sp setNetworkProtocol:@"http,https"];
        [sp setNetworkStreamParams:@"trusted_certificates=;url_suffix="];
        [sp applyPropertiesFromApplication];



code for registering the device :


@try
{
SUPApplication* app = [SUPApplication getInstance];
[app registerApplication:120]; // here i'm increasing to 60 10 120


    @catch (SUPApplicationTimeoutException* tex)
    {
        NSLog(@"SUPApplicationTimeoutException");
        NSLog(@"%@: %@--%@", [tex name],[tex message], [tex description]);
        [self.loader hide:YES];

    }
    @catch (SUPPersistenceException * pe) {
        NSLog(@"SUPPersistenceException");
        NSLog(@"%@: %@", [pe name],[pe message]);
        [self showNoTransportAlert:kSUP102ErrorFailure];
    }
}

错误控制台:

2014-03-25 14:12:49.085 SUP102[1891:6303] =================================================
2014-03-25 14:12:49.085 SUP102[1891:6303] onConnectionStatusChanged: status = 105, code = 571, message = Error: 571 Detail: Session failed Source: /Users/iotabuilder/svn/Pioneer/MOClients/iPhone/../Common/C/moClient.cpp 1024.
2014-03-25 14:12:49.086 SUP102[1891:6303] =================================================
2014-03-25 14:12:49.087 SUP102[1891:6303] =================================================
2014-03-25 14:12:49.087 SUP102[1891:6303] onConnectionStatusChanged: status = 105, code = 571, message = Error: 571 Detail: Session failed Source: /Users/iotabuilder/svn/Pioneer/MOClients/iPhone/../Common/C/moClient.cpp 1024.
2014-03-25 14:12:49.087 SUP102[1891:6303] =================================================
4

1 回答 1

0

您应该按照标准示例进行注册:

SUPApplication* app = [SUPApplication getInstance];
[app setApplicationIdentifier:@"YOURAPPIdentifier"];

MyApplicationCallbackHandler *ch = [MyApplicationCallbackHandler getInstance]; 
[app setApplicationCallback:ch];
SUPConnectionProperties* props = app.connectionProperties;

[props setServerName:@"supserver.mycompany.com"];
[props setPortNumber:5001]; // the messaging 

SUPLoginCredentials* login = [SUPLoginCredentials getInstance];
login.username = @"username";
login.password = @"password";
props.loginCredentials = login;
[app registerApplication:120]; // 120 second timeout for registration

不要设置协议、域、网络流参数等...

于 2014-04-03T15:59:48.763 回答