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
SDLAppServiceData

SDLAppServiceData Class Reference

Section Contents

Overview

Contains all the current data of the app service. The serviceType will link to which of the service data objects are included in this object (e.g. if the service type is MEDIA, the mediaServiceData param should be included).

@since RPC 5.1

-initWithAppServiceType:serviceId:

Convenience init for service type and service id.

Objective-C

- (nonnull instancetype)initWithAppServiceType:
                            (nonnull SDLAppServiceType)serviceType
                                     serviceId:(nonnull NSString *)serviceId;

Swift

init(appServiceType serviceType: SDLAppServiceType, serviceId: String)

Parameters

serviceType

The type of service that is to be offered by this app.

serviceId

A unique ID tied to this specific service record.

Return Value

A SDLAppServiceData object

-initWithMediaServiceData:serviceId:

Convenience init for media service data.

Objective-C

- (nonnull instancetype)initWithMediaServiceData:
                            (nonnull SDLMediaServiceData *)mediaServiceData
                                       serviceId:(nonnull NSString *)serviceId;

Swift

convenience init(mediaServiceData: SDLMediaServiceData, serviceId: String)

Parameters

mediaServiceData

The media service data

serviceId

A unique ID tied to this specific service record.

Return Value

A SDLAppServiceData object

-initWithWeatherServiceData:serviceId:

Convenience init for weather service data.

Objective-C

- (nonnull instancetype)initWithWeatherServiceData:
                            (nonnull SDLWeatherServiceData *)weatherServiceData
                                         serviceId:
                                             (nonnull NSString *)serviceId;

Swift

convenience init(weatherServiceData: SDLWeatherServiceData, serviceId: String)

Parameters

weatherServiceData

The weather service data

serviceId

A unique ID tied to this specific service record.

Return Value

A SDLAppServiceData object

-initWithNavigationServiceData:serviceId:

Convenience init for navigation service data.

Objective-C

- (nonnull instancetype)
    initWithNavigationServiceData:
        (nonnull SDLNavigationServiceData *)navigationServiceData
                        serviceId:(nonnull NSString *)serviceId;

Swift

convenience init(navigationServiceData: SDLNavigationServiceData, serviceId: String)

Parameters

navigationServiceData

The navigation service data

serviceId

A unique ID tied to this specific service record.

Return Value

A SDLAppServiceData object

-initWithAppServiceType:serviceId:mediaServiceData:weatherServiceData:navigationServiceData:

Convenience init for all parameters.

Objective-C

- (nonnull instancetype)
    initWithAppServiceType:(nonnull SDLAppServiceType)serviceType
                 serviceId:(nonnull NSString *)serviceId
          mediaServiceData:(nullable SDLMediaServiceData *)mediaServiceData
        weatherServiceData:(nullable SDLWeatherServiceData *)weatherServiceData
     navigationServiceData:
         (nullable SDLNavigationServiceData *)navigationServiceData;

Swift

convenience init(appServiceType serviceType: SDLAppServiceType, serviceId: String, mediaServiceData: SDLMediaServiceData?, weatherServiceData: SDLWeatherServiceData?, navigationServiceData: SDLNavigationServiceData?)

Parameters

serviceType

The type of service that is to be offered by this app.

serviceId

A unique ID tied to this specific service record.

mediaServiceData

The media service data

weatherServiceData

The weather service data

navigationServiceData

The navigation service data

Return Value

A SDLAppServiceData 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 }

serviceId

A unique ID tied to this specific service record. The ID is supplied by the module that services publish themselves.

String, Required

Objective-C

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

Swift

var serviceId: String { get set }

mediaServiceData

The media service data.

SDLMediaServiceData, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLMediaServiceData *mediaServiceData;

Swift

var mediaServiceData: SDLMediaServiceData? { get set }

weatherServiceData

The weather service data.

SDLWeatherServiceData, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLWeatherServiceData *weatherServiceData;

Swift

var weatherServiceData: SDLWeatherServiceData? { get set }

navigationServiceData

The navigation service data.

SDLNavigationServiceData, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLNavigationServiceData *navigationServiceData;

Swift

var navigationServiceData: SDLNavigationServiceData? { get set }
View on GitHub.com
Previous Section Next Section