It is fully allowed to use CLLocation as keys for a dictionary, no problem. The reason you get nil is because no value is associated with the key, check where you populate the dictionary.
About your multiple CLLocation keys, every time you set an object for a key that already exists in the dictionary, the previous value will be sent to the release message, and the new one will take its place. Therefore, if you have several storage locations, and some are equal, you should find another type as the key for the dictionary.
user756245
source share