     {
         if let userInfoArray = getUserInfoArray()
         {
-            var filteredArray = userInfoArray.filtered(using: NSPredicate(format: "(userId == %@) AND (appId == %@)", userId, appId))
+           // var filteredArray = userInfoArray.filtered(using: NSPredicate(format: "(userId == %@) AND (appId == %@)", userId, appId))
+            
+            var filteredArray = userInfoArray.filter{
+                if $0["userId"] as? String == userId && $0["appId"] as? String == appId
+                {
+                    return true
+                }
+                return false
+
+            }
+
+            
             print("Numnber of users in app \(filteredArray.count)")
             if filteredArray.count > 0
             {

    }
    
    
    class func getUserInfoArray() -> NSMutableArray?
    {
        if let data = UICKeyChainStore.data(forKey: keyChainKey, service: keyChainService)
        {
             return NSKeyedUnarchiver.unarchiveObject(with: data) as? NSArray as! NSMutableArray?

        }
    


        if let userInfoArray = getUserInfoArray()
        {
           // let filteredArray = userInfoArray.filtered(using: NSPredicate(format: "appId == %@", appId))
            let filteredArray = userInfoArray.filter{
                if $0["appId"] as? String == appId
                {
                    return true
                }
                return false

            }
            
            for(_, object) in filteredArray.enumerated()
            {
