         default: break
         }
         
+        Logger.verbose("\(keyValueStore.dictionaryRepresentation)")
     }
 }
 

    }
}

public protocol UserDefaults {
    func dictionaryForKey(aKey: String) -> [String : AnyObject]?
    func setDictionary(aDictionary: [String : AnyObject]?, forKey aKey: String)

    public static var ubiquityUserDefaults: KeyValueUbiquityContainer = KeyValueUbiquityContainer()
    
    public static func setUserDefault(userDefault: UserDefault, forKey key: String) {
        if let keyValueStore = NSUserDefaults.ubiquityUserDefaults.keyValueStore {
            keyValueStore.setUserDefault(userDefault, forKey: key)
        } else {
            NSUserDefaults.standardUserDefaults().setUserDefault(userDefault, forKey: key)
        }
    }
    
    public static func userDefaultForKey(key: String) -> UserDefault? {
        if let userDefault = NSUserDefaults.ubiquityUserDefaults.keyValueStore?.userDefaultForKey(key) {
            return userDefault
        }
        
        return NSUserDefaults.standardUserDefaults().userDefaultForKey(key)
    }
}
