TTSearch
Objective-C
@interface TTSearch
Swift
class TTSearch
TomTom Search API main object. Contains methods to use Tomtom’s online search engine and provides support for both async and sync calls.
-
DEPRECATED
- This method is deprecated. Use the ‘initWithKey’ method to init with Key.
- The planned withdrawal date is 15.06.2021.
Initializer with info.plist Key.
Declaration
Objective-C
- (instancetype _Nonnull)init;Swift
init() -
Initializer with key for the TomTom Search API Service.
Declaration
Objective-C
- (instancetype _Nonnull)initWithKey:(NSString *_Nonnull)key;Swift
init(key: String) -
DEPRECATED
- This method is deprecated. Use the TTHTTPHeaders to add a tracking ID to your queries.
- The planned withdrawal date is 23.12.2020.
Initializer with tracking ID.
Declaration
Objective-C
- (instancetype _Nonnull)initWithTrackingID:(NSString *_Nonnull)trackingID;Swift
init(trackingID: String) -
Delegate that informs the subscriber when a search result is available. It contains a TTSearchResponse object.
Declaration
Objective-C
@property (nonatomic, weak) id<TTSearchDelegate> _Nullable delegate;Swift
weak var delegate: TTSearchDelegate? { get set } -
Search with async callback
Declaration
Objective-C
- (void)searchWithQuery:(TTSearchQuery *_Nonnull)query;Swift
func search(with query: TTSearchQuery)Parameters
queryObject containing the data needed to perform a search.
-
Search with async block
Declaration
Objective-C
- (void)searchWithQuery:(TTSearchQuery *_Nonnull)query completionHandle: (void (^_Nonnull)(TTSearchResponse *_Nullable, TTResponseError *_Nullable))completionHandler;Swift
func search(with query: TTSearchQuery, completionHandle completionHandler: @escaping (TTSearchResponse?, TTResponseError?) -> Void)Parameters
queryObject containing the data needed to perform a search.
completionHandleCompletionHandler that informs the subscriber when a search Response is available. It contains a TTSearchResponse object.
TTSearch Class Reference