Requirement :
Supports iOS version 8.0 or above.
Download package and include framework into project.
First adopt YalgaarClientDelegate and implement the instance methods of it. Now, create an object of YalgaarClient class and assign delegate object to it.
var objYalgaarClient = YalgaarClient.sharedInstance
objYalgaarClient.delegate = delegate_object
To connect to a Yalgaar client, use following method. It must have valid Client Key.
func connectWithClientKey(_ clientKey: String, isSecure: Bool, error: inout NSError?)
func connectWithClientKey(_ clientKey: String, isSecure: Bool, uuid: String?, error: inout NSError?)
func connectWithClientKey(_ clientKey: String, isSecure: Bool, aesSecretKey: String, aesKeyType: AESKeyType, error: inout NSError?)
func connectWithClientKey(_ clientKey: String, isSecure: Bool, uuid: String?, aesSecretKey: String?, aesKeyType: AESKeyType?, error: inout NSError?)
To publish message, use following method.
func publishWithChannel(_ channel: String, message: String, error: inout NSError?)
To subscribe message, use following method.
func subscribeWithChannel(_ channel:String, error:inout NSError?)
func subscribeWithChannels(_ channels: [String], error:inout NSError?)
To unsubscribe message,use following method.
func unsubscribeWithChannel(_ channel: String, error: inout NSError?)
func unsubscribeWithChannels(_ channels: [String], error: inout NSError?)
Get data when some one subscribe Channel(s) that you have already subscribed. Below delegate function called when someone subscribe to Channel that is common into your subscribed Channel(s).
func dataReceivedOfPresenceForAction(_ action: PresenceAction, channel: String, uuid: String, dateTime: Date)
To get list of all user subscribe with specified channel name, use following method.
func getUUIDListForChannel(_ channel: String, error: inout NSError?)
To get list of all channels subscribed by specified user, use following method.
func getChannelListForUUID(_ uuid: String, error: inout NSError?)
To get the already published messages, use following method.
func messageHistoryWithChannel(_ channel: String, messageCount: Int, error: inout NSError?)
To register deviceToken for push notification, use following method.
func addChannelsForPushNotification(_ pushNotificationTokenString: String, arrChanel: [String]){
}
To remove push notification on registered channels, use following method.
func removeChannelsForPushNotification(_ pushNotificationTokenString: String, arrChanel: [String]){
}
To unregister deviceToken for push notification, use following method.
func removeAllChannelsForPushNotification(_ pushNotificationTokenString: String){
}
To disconnect connection with Yalgaar Client, use following method.
func disconnect()
Below is header file of ViewController class, which adopt YalgaarClientDelegate and implement it.
import YalgaarSwiftSDK
class ViewController: UIViewController, YalgaarClientDelegate {
var objYalgaarClient : YalgaarClient?
override func viewDidLoad() {
...
objYalgaarClient = YalgaarClient.sharedInstance
objYalgaarClient!.delegate = self
var errorClientID : NSError?
objYalgaarClient!.connectWithClientKey("ClientID", isSecure:true, error:&errorClientID)
if errorClientID != nil {
print("Connection Error: \(errorClientIDValidation!.code), \(errorClientIDValidation!.userInfo["reason"] as! String)")
}
var errorSub : NSError?
objYalgaarClient!.subscribeWithChannel("YourChannel", error: &errorSub)
if errorSub != nil {
print("Subscribe Error: \(errorSub!.code), \(errorSub!.userInfo["reason"] as! String)")
}
var errorPubData : NSError?
objYalgaarClient!.publishWithChannel("YourChannel", message: "This is iOS Swift SDK Example", error: &errorPubData)
if errorPubData != nil {
print("Publish Error: \(errorPubData!.code), \(errorPubData!.userInfo["reason"] as! String)")
}
objYalgaarClient!.disconnect()
...
}
// YalgaarClient delegate methods
...
func dataReceivedForSubscription(_ data: String, channels:[String]){
print("Data received: \(data)")
}
...
}
At SYSTEM LEVEL SOLUTIONS, we understand that privacy is an important issue for visitors to the SYSTEM LEVEL SOLUTIONS Web site www.slscorp.com. The following information is designed to help visitors understand what information we gather from our site, and how we handle the information once we gather it.
SYSTEM LEVEL SOLUTIONS is the sole owner of any information collected on this site. We will not sell, share, or rent this information to others in ways different from what is disclosed in this statement. SYSTEM LEVEL SOLUTIONS may collect information from users at several different points on our website. SYSTEM LEVEL SOLUTIONS may transfer the information collected to any relevant unit within SYSTEM LEVEL SOLUTIONS located anywhere in the world.
If a user contacts SYSTEM LEVEL SOLUTIONS with a general enquiry, the user may provide SYSTEM LEVEL SOLUTIONS with personal information (for example contact details). SYSTEM LEVEL SOLUTIONS will use this personal information to respond to the enquiry and track further correspondence. Information is also used to compile statistics on response handling, etc. This is done in aggregate, and no individual names or other personal information are retained. Personal information collected is not used for any other purpose.
Cookies are small text files that a Web site transfers to a site visitor's hard disk or browser for added functionality, or for tracking Web site usage. We do not use cookies to gather personal information such as a person's name or e-mail address. In order to measure the effectiveness of our online presence, SYSTEM LEVEL SOLUTIONS may use cookies to identify repeat visitors to our Web site, and to determine the path visitors take on our site. Any information gathered by the use of cookies is compiled on an aggregate, anonymous basis. Examples include:
We request information from the user on our feedback/grievance form. Here a user must provide contact information (like name and address) as well as the details as requested in the form. This information is used for studying the feedback/grievance provided by the customer/visitor and passing on the information to the concerned division/department for appropriate action at their end. If we have trouble processing the data, the contact information provided is used to get in touch with the user.
We may partner with another party to provide specific services. When the user signs up for these services, we will share names, or other contact information that is necessary for the third party to provide these services. These parties are not allowed to use personally identifiable information except for the purpose of providing these services.
This web site may contain links to other sites. Please be aware that SYSTEM LEVEL SOLUTIONS is not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects personally identifiable information. This privacy statement applies solely to information collected by this Web site.
SYSTEM LEVEL SOLUTIONS may, from time to time, make changes to this policy. We recommend that visitors to this site re-visit this privacy policy on every occasion to learn of new privacy practices or changes to our policy.
It is important to us at SYSTEM LEVEL SOLUTIONS to hear what visitors have to say about our services and our policies. If site visitors have any questions, concerns, or complaints about this Privacy Policy, or want to let us know what they think about any of our off-line and on-line products and services, they can goto contact us.