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
SDLPerformAppServiceInteraction

SDLPerformAppServiceInteraction Class Reference

Section Contents

Overview

App service providers will likely have different actions exposed to the module and app service consumers. It will be difficult to standardize these actions by RPC versions and can easily become stale. Therefore, we introduce a best-effort attempt to take actions on a service.

The PerformAppServiceInteraction request will be sent to the service that has the matching appServiceId. The serviceUri should be the fully qualified URI with all parameters that are necessary for the given action. The URI prefix and actions list will be contained in the app service provider’s manifest. SDL takes no steps to validate an app service provider’s action sheet JSON object. In the future, plug in libraries could be added to handle these sheets on a provider by provider basis.

An app service consumer can also request for this service to become the active service of its respective type. If the app service consumer currently has an HMI state of HMI_FULL this request can be performed without user interaction. If the app is currently not in that state, the HMI should present the user with a choice to allow this app service provider to become the active service of its specified type. If the app service provider is not allowed to become active, the request will not be sent to it and an unsuccessful response will be sent to the requester.

SDL should make no guarantees that: 1. App service providers offer URI prefix and URI Schema 2. App service providers will correctly respond to the requests 3. The requested app service provider will become the active service of that type 4. The serviceUri will be a correctly formatted URI from the app service consumer

-initWithServiceUri:serviceID:originApp:

Convenience init for required parameters.

Objective-C

- (nonnull instancetype)initWithServiceUri:(nonnull NSString *)serviceUri
                                 serviceID:(nonnull NSString *)serviceID
                                 originApp:(nonnull NSString *)originApp;

Swift

init(serviceUri: String, serviceID: String, originApp: String)

Parameters

serviceUri

The service URI

serviceID

The app service ID

originApp

The origin app

Return Value

A SDLPerformAppServiceInteraction object

-initWithServiceUri:serviceID:originApp:requestServiceActive:

Convenience init for all parameters.

Objective-C

- (nonnull instancetype)initWithServiceUri:(nonnull NSString *)serviceUri
                                 serviceID:(nonnull NSString *)serviceID
                                 originApp:(nonnull NSString *)originApp
                      requestServiceActive:(BOOL)requestServiceActive;

Swift

init(serviceUri: String, serviceID: String, originApp: String, requestServiceActive: Bool)

Parameters

serviceUri

The service URI

serviceID

The app service ID

originApp

The origin app

requestServiceActive

Whether or not the service is active

Return Value

A SDLPerformAppServiceInteraction object

serviceUri

Fully qualified URI based on a predetermined scheme provided by the app service. SDL makes no guarantee that this URI is correct.

String, Required

Objective-C

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

Swift

var serviceUri: String { get set }

serviceID

The service ID that the app consumer wishes to send this URI.

String, Required

Objective-C

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

Swift

var serviceID: String { get set }

originApp

This string is the appID of the app requesting the app service provider take the specific action.

String, Required

Objective-C

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

Swift

var originApp: String { get set }

requestServiceActive

This flag signals the requesting consumer would like this service to become the active primary service of the destination’s type.

Boolean, Optional

Objective-C

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

Swift

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