complete iOS implementation of getMetadataForURL() method