Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLGetAppServiceData

SDLGetAppServiceData Class Reference

Section Contents

Overview

This request asks the module for current data related to the specific service. It also includes an option to subscribe to that service for future updates.

-initWithAppServiceType:

Convenience init for service type.

Objective-C

- (nonnull instancetype)initWithAppServiceType:
    (nonnull SDLAppServiceType)serviceType;

Swift

init(appServiceType serviceType: SDLAppServiceType)

Parameters

serviceType

The app service type

Return Value

A SDLGetAppServiceData object

-initAndSubscribeToAppServiceType:

Convenience init for subscribing to a service type.

Objective-C

- (nonnull instancetype)initAndSubscribeToAppServiceType:
    (nonnull SDLAppServiceType)serviceType;

Swift

init(andSubscribeToAppServiceType serviceType: SDLAppServiceType)

Parameters

serviceType

The app service type

Return Value

A SDLGetAppServiceData object

-initAndUnsubscribeToAppServiceType:

Convenience init for unsubscribing to a service type

Objective-C

- (nonnull instancetype)initAndUnsubscribeToAppServiceType:
    (nonnull SDLAppServiceType)serviceType;

Swift

init(andUnsubscribeToAppServiceType serviceType: SDLAppServiceType)

Parameters

serviceType

The app service type

Return Value

A SDLGetAppServiceData object

serviceType

The type of service that is to be offered by this app. See AppServiceType for known enum equivalent types. Parameter is a string to allow for new service types to be used by apps on older versions of SDL Core.

String, See SDLAppServiceType, Required

Objective-C

@property (nonatomic, strong) NSString *_Nonnull serviceType;

Swift

var serviceType: String { get set }

subscribe

If true, the consumer is requesting to subscribe to all future updates from the service publisher. If false, the consumer doesn’t wish to subscribe and should be unsubscribed if it was previously subscribed.

Boolean, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLBool> *subscribe;

Swift

var subscribe: (NSNumber & SDLBool)? { get set }
View on GitHub.com
Previous Section Next Section