Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 43 | Rev 45 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 43 Rev 44
Línea 167... Línea 167...
167
        guard let alertDict = apsDict["alert"]as?[String:Any]else {return}
167
        guard let alertDict = apsDict["alert"]as?[String:Any]else {return}
Línea 168... Línea 168...
168
        
168
        
169
        
169
        
170
        let title = alertDict["title"]  as? String ?? ""
-
 
171
        let body = alertDict["body"]  as? String ?? ""
-
 
172
        let url = userInfo["url"] as? String ?? ""
170
        let title = alertDict["title"]  as? String ?? ""
173
        
171
        let body = alertDict["body"]  as? String ?? ""
-
 
172
        let url = userInfo.index(forKey: "url")  == nil ?  "" : userInfo["url"] as? String ?? ""
174
        let newCapsules = userInfo.index(forKey: "new_capsules") == nil ? 0 : Int(userInfo["new_capsules"] as? String ?? "") ?? 0
173
        let command = userInfo.index(forKey: "command") == nil ? "" : userInfo["command"] as? String ?? ""
-
 
174
        let newCapsules = userInfo.index(forKey: "new_capsules") == nil ? 0 : Int(userInfo["new_capsules"] as? String ?? "") ?? 0
175
        let command = userInfo.index(forKey: "command") == nil ? "" : userInfo["command"] as? String ?? ""
175
 
176
        
176
    
177
        if command == "signout" {
177
        if command == "signout" {
178
            NotificationCenter.default.post(name: Constants.NOTIFICATION_NAME_COMMAND_EXIT , object: self, userInfo: nil)
178
            NotificationCenter.default.post(name: Constants.NOTIFICATION_NAME_COMMAND_EXIT , object: self, userInfo: nil)
179
        }
179
        }
180
        else if command == "content-refresh" && newCapsules > 0 {
180
        else if command == "content-refresh" {
181
            let userinfo = [
181
            let userinfo = [
182
                "title" : title,
182
                "title" : title,
183
                "body" : body,
183
                "body" : body,