Sinch Class Reference

Inherits from NSObject
Declared in Sinch.h

Overview

The Sinch class is used to instantiate a SINClient.

This is the starting point for an app that wishes to use the Sinch SDK.

To construct a SINClient, the required configuration parameters are:

  • Application Key
  • Environment host (Production or Sandbox)
  • UserID

It is optional to specify:

  • Application Secret (see the specific factory methods and the User Guide for details on why and how to use the secret).

  • CLI (Calling-Line Identifier / Caller-ID) that will be used for calls terminated to PSTN (Publicly Switched Telephone Network).

+ clientWithApplicationKey:environmentHost:userId:

Instantiate a new client.

+ (id<SINClient>)clientWithApplicationKey:(NSString *)applicationKey environmentHost:(NSString *)environmentHost userId:(NSString *)userId

Parameters

applicationKey

Application key identifying the application.

environmentHost

Host for base URL for the Sinch API environment to be used. E.g. ‘sandbox.sinch.com’

userId

ID of the local user

Return Value

The newly instantiated client.

Discussion

If the client is initiated with an application key, but no application secret, starting the client the first time will require additional authorization credentials as part of registering the user. It will therefore be required of the SINClientDelegate to implement [SINClientDelegate client:requiresRegistrationCredentials:].

Declared In

Sinch.h

+ clientWithApplicationKey:applicationSecret:environmentHost:userId:

Instantiate a new client.

+ (id<SINClient>)clientWithApplicationKey:(NSString *)applicationKey applicationSecret:(NSString *)applicationSecret environmentHost:(NSString *)environmentHost userId:(NSString *)userId

Parameters

applicationKey

Application key identifying the application.

applicationSecret

Application secret bound to application key.

environmentHost

Host for base URL for the Sinch API environment to be used. E.g ‘sandbox.sinch.com’

userId

ID of the local user

Return Value

The newly instantiated client.

This method should be used if user-registration and authorization with Sinch is to be handled completely by the app (without additional involvement of a backend-service providing additional credentials to the application.)

See Also

Declared In

Sinch.h

+ clientWithApplicationKey:environmentHost:userId:cli:

Instantiate a new client with a CLI (may be used for PSTN-terminated calls).

+ (id<SINClient>)clientWithApplicationKey:(NSString *)applicationKey environmentHost:(NSString *)environmentHost userId:(NSString *)userId cli:(NSString *)cli

Parameters

applicationKey

Application key identifying the application.

environmentHost

Host for base URL for the Sinch API environment to be used. E.g. ‘sandbox.sinch.com’

userId

ID of the local user

cli

Caller-ID when terminating calls to PSTN. Must be a valid phone number.

Return Value

The newly instantiated client.

Discussion

If the client is initiated with an application key, but no application secret, starting the client the first time will require additional authorization credentials as part of registering the user. It will therefore be required of the SINClientDelegate to implement [SINClientDelegate client:requiresRegistrationCredentials:].

Declared In

Sinch.h

+ clientWithApplicationKey:applicationSecret:environmentHost:userId:cli:

Instantiate a new client with a CLI (may be used for PSTN-terminated calls).

+ (id<SINClient>)clientWithApplicationKey:(NSString *)applicationKey applicationSecret:(NSString *)applicationSecret environmentHost:(NSString *)environmentHost userId:(NSString *)userId cli:(NSString *)cli

Parameters

applicationKey

Application key identifying the application.

applicationSecret

Application secret bound to application key.

environmentHost

Host for base URL for the Sinch API environment to be used. E.g ‘sandbox.sinch.com’

userId

ID of the local user

cli

Caller-ID when terminating calls to PSTN. Must be a valid phone number.

Return Value

The newly instantiated client.

This method should be used if user-registration and authorization with Sinch is to be handled completely by the app (without additional involvement of a backend-service providing additional credentials to the application.)

See Also

Declared In

Sinch.h

+ managedPushWithAPSEnvironment:

Instantiate a new SINManagedPush instance to enable Push Notifications managed by the Sinch SDK and platform. When using managed push notifications, push notifications will be sent by the Sinch platform provided that Apple Push Notification Certificates for your application have been uploaded to Sinch.

+ (id<SINManagedPush>)managedPushWithAPSEnvironment:(SINAPSEnvironment)apsEnvironment

Parameters

apsEnvironment

Specification of which Apple Push Notification Service environment the application is bound to (via code signing and Provisioning Profile).

Declared In

Sinch.h

+ version

Returns the Sinch SDK version.

+ (NSString *)version

Declared In

Sinch.h