AppBuilder
public class AppBuilder: NSObject
App Builder provides fine grained controll over createing App instance. Private/ Dedicated Kii Cloud users will use it. Public Kii Cloud user who uses apps created on https://developer.kii.com does not need to interact with this Builder. Just use App(appID:appKey:site) constructor is fine.
-
Init the Builder.
Parameter
Parameter appID: ID of the app.Parameter
Parameter appKey: Key of the app.Parameter
Parameter hostName: Host name to which the app connectsDeclaration
Swift
public init(appID:String, appKey:String, hostName:String)
-
Set port number. This method call is optional. By default no port number is used to connect to the cloud.
Parameter
Parameter port: port number. 0 or less than 0 would be ignored.Returns
AppBuilder instance.Declaration
Swift
public func setPort(port:Int32) -> AppBuilder
-
Set the API endpoint URL schema This method call is optional. By default
https
is used. You can override the URL schema with this method.Parameter
Parameter urlSchema: API endpoit URL schemaReturns
AppBuilder instance.Declaration
Swift
public func setUrlSchema(urlSchema:String) -> AppBuilder
-
Set site name. This method call is optional. By default site name is set to
CUSTOM
. This site name should match with your Gateway Agent configuration if you interact Gateway Agent with this SDK.Parameter
Parameter siteName: site name.Returns
AppBuilder instance.Declaration
Swift
public func setSiteName(siteName:String) -> AppBuilder
-
Build App instance
Returns
App instanceDeclaration
Swift
public func build() -> App