Setting Up Application Properties

The Application instance contains the information and authentication credentials needed to register and connect to the Sybase Unwired Platform server.

The following code illustrates how to set up the minimum required fields:
// Initialize Application settings
SUPApplication* app = [SUPApplication getInstance];
        
// The identifier has to match the application ID deployed to the SUP server
app.applicationIdentifier = @"SUP101";
                
// ConnectionProperties has the infomation needed to register
// and connect to SUP server
SUPConnectionProperties* props = app.connectionProperties;
props.serverName = @"supserver.mycompany.com";
// if you are using relay server, then use the corrct port number for the relay server
// otherwise use the port number for the SUP server, by default it is 5001
props.portNumber = 5001;
props.activationCode = @"activationcode";
// if you are connecting through relay server, then use the MBS farmId for that relay server
// other wise use the farmId from SCC Applicatin Connection
props.farmId = @"farmId";  
// if you are connecting through relay server and using auto registration,
// then you must provide the correct urlSuffix from the relay server
props.urlSuffix = @"urlSuffix";   
        
// provide user credentials
SUPLoginCredentials* login = [SUPLoginCredentials getInstance];
login.username = @"supAdmin";
login.password = @"supPwd";   
props.loginCredentials = login;
        
// Initialize generated package database class with this Application instance
[SUP101SUP101DB setApplication:app];
Related reference
Application APIs