         
         if let userInfoArray = getUserInfoArray()
         {
-            let filteredArray = userInfoArray.filtered(using: NSPredicate(format: "userId == %@", userId))
+            
+            
+            let filteredArray = userInfoArray.filter
+            {
+                if $0["userId"] as? String == userId
+                {
+                    return true
+                }
+                
+                return false
+
+            }
+            
+            
+            //(NSPredicate(format: "userId == %@", userId))
             
             
             for(_, object) in filteredArray.enumerated()

    {
        if let userInfoArray = getUserInfoArray()
        {
            var filteredArray = userInfoArray.filtered(using: NSPredicate(format: "(userId == %@) AND (appId == %@)", userId, appId))
            print("Numnber of users in app \(filteredArray.count)")
            if filteredArray.count > 0
            {

    }
    
    
    class func getUserInfoArray() -> [[String : Any]]?
    {
        if let data = UICKeyChainStore.data(forKey: keyChainKey, service: keyChainService)
        {
            return NSKeyedUnarchiver.unarchiveObject(with: data) as? [[String : Any]]

        }
    
