                 let next = str.character(at:i + 1)
                 
                 if next == ("u" as NSString).character(at: 0) {
-                    var size = ((i - 1) + 12)
+                    let size = ((i - 1) + 12)
                     if (size < len && str.character(at: i + 6) == ("u" as NSString).character(at: 0)){
                         var emoji: NSString? = str.substring(with: NSMakeRange((i), 12)) as NSString?
                         let pos: Data? = emoji?.data(using: String.Encoding.utf8.rawValue)

                        }
                    }
                    
                    var t:AnyObject? = messagesBuffer?.object(forKey: messageId) as AnyObject!
                    if messagesBuffer?.object(forKey: messageId) != nil &&
                        ((messagesBuffer?.object(forKey: messageId) as! NSDictionary).object(forKey: "isMsgSent") as! Bool) == true {
                        messagesBuffer?.removeObject(forKey: messageId)

     - parameter callback: Callback with error (NSError) and result (NSString) parameters
     */
    open func enablePresence(_ aUrl:String, isCluster:Bool,
                               applicationKey:String,
                               privateKey:String,
                               channel:String,
                               metadata:Bool,
                               callback:@escaping (_ error:NSError?, _ result:NSString?)->Void){
        self.setPresence(true, aUrl: aUrl, isCluster: isCluster, applicationKey: applicationKey, privateKey: privateKey, channel: channel, metadata: metadata, callback: callback)
    }
    
