SYCustomPlacesManager Class Reference

Provides custom places operations. The purpose is to manage custom places: usiing of offline places or online places mode, installation and unistallation of offline places. Online places are stored in online services and loaded when they are shown on a map view. Offline places are downloaded from online services and stored in device in advance, so they can be shown also when device is offline. More...

#import <SYCustomPlacesManager.h>

Inheritance diagram for SYCustomPlacesManager:
Collaboration diagram for SYCustomPlacesManager:

Instance Methods

((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") - __attribute__
 SYCustomPlacesManager is singleton, use [SYCustomPlacesManager sharedManager] to access singleton instance. More...
 
(void) - getInstalledCountriesWithCompletion:
 Provides list of countries with installed offline places. When finished, it calls the callback with the list of available country ISO codes. More...
 
(void) - getCategoriesWithCompletion:
 Provides list of categories of custom places. When finished, it calls the callback with the list of categories identifications. More...
 
(nonnull SYTask *) - installOfflinePlacesForCountry:progress:completion:
 Downloads and installs offline places of the requested country. More...
 
(void) - installOfflinePlacesFromJson:completion:
 Installs Offline Places from provided JSON string. More...
 
(void) - uninstallOfflinePlacesForCountry:completion:
 Uninstalls offline places of the requested country. More...
 
(nonnull SYTask *) - updateInstalledPlacesWithProgress:completion:
 Downloads and installs updates for offline places of all installed countries. More...
 

Class Methods

(nonnull SYCustomPlacesManager *) + sharedManager
 Returns SYCustomPlacesManager singleton instance. More...
 
((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") + __attribute__
 

Properties

SYCustomPlacesMode mode
 Custom places mode: Online or Offline. More...
 

Detailed Description

Provides custom places operations. The purpose is to manage custom places: usiing of offline places or online places mode, installation and unistallation of offline places. Online places are stored in online services and loaded when they are shown on a map view. Offline places are downloaded from online services and stored in device in advance, so they can be shown also when device is offline.

Method Documentation

◆ sharedManager

+ (nonnull SYCustomPlacesManager*) sharedManager

Returns SYCustomPlacesManager singleton instance.

◆ __attribute__ [1/2]

- ((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") __attribute__

SYCustomPlacesManager is singleton, use [SYCustomPlacesManager sharedManager] to access singleton instance.

◆ __attribute__ [2/2]

+ ((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") __attribute__

◆ getInstalledCountriesWithCompletion:

- (void) getInstalledCountriesWithCompletion: (nonnull SYCustomPlacesInstalledCountriesCompletionBlock)  completion

Provides list of countries with installed offline places. When finished, it calls the callback with the list of available country ISO codes.

Parameters
completionblock used as a callback for this function

◆ getCategoriesWithCompletion:

- (void) getCategoriesWithCompletion: (nonnull SYCustomPlacesCategoriesCompletionBlock)  completion

Provides list of categories of custom places. When finished, it calls the callback with the list of categories identifications.

Parameters
completionblock used as a callback for this function

◆ installOfflinePlacesForCountry:progress:completion:

- (nonnull SYTask*) installOfflinePlacesForCountry: (nonnull SYCountryIso *)  countryIso
progress: (nullable SYCustomPlacesInstallProgressBlock)  progress
completion: (nonnull SYCustomPlacesInstallCompletionBlock)  completion 

Downloads and installs offline places of the requested country.

Parameters
countryIsocountry ISO of installed offline places
progressblock used as an optional callback for the progress of this function
completionblock used as a callback for the result of this function
Returns
SYTask cancelation object

◆ installOfflinePlacesFromJson:completion:

- (void) installOfflinePlacesFromJson: (nonnull NSString *)  json
completion: (nonnull SYCustomPlacesInstallCompletionBlock)  completion 

Installs Offline Places from provided JSON string.

TODO: Link schema from SDK Documentation (SDC-6480)

Parameters
jsonSerialized offline places which are to be installed, according to the schema above
completionblock used as a callback for the result of this function

◆ uninstallOfflinePlacesForCountry:completion:

- (void) uninstallOfflinePlacesForCountry: (nonnull SYCountryIso *)  countryIso
completion: (nonnull SYCustomPlacesInstallCompletionBlock)  completion 

Uninstalls offline places of the requested country.

Parameters
countryIsocountry ISO of installed offline places
completionblock used as a callback for this function

◆ updateInstalledPlacesWithProgress:completion:

- (nonnull SYTask*) updateInstalledPlacesWithProgress: (nullable SYCustomPlacesInstallProgressBlock)  progress
completion: (nonnull SYCustomPlacesInstallCompletionBlock)  completion 

Downloads and installs updates for offline places of all installed countries.

Parameters
progressblock used as an optional callback for the progress of this function
completionblock used as a callback for the result of this function
Returns
SYTask cancelation object

Property Documentation

◆ mode

- (SYCustomPlacesMode) mode
readwritenonatomicassign

Custom places mode: Online or Offline.


The documentation for this class was generated from the following file: