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
SDLShow

SDLShow Class Reference

Section Contents

Overview

Updates the application’s display text area, regardless of whether or not this text area is visible to the user at the time of the request. The application’s display text area remains unchanged until updated by subsequent calls to Show

The content of the application’s display text area is visible to the user when the application is FULL or LIMITED, and the SDLSystemContext=MAIN and no SDLAlert is in progress

The Show operation cannot be used to create an animated scrolling screen. To avoid distracting the driver, Show commands cannot be issued more than once every 4 seconds. Requests made more frequently than this will be rejected

HMILevel needs to be FULL, LIMITED or BACKGROUND

Since SmartDeviceLink 1.0 See SDLAlert SDLSetMediaClockTimer

-initWithMainField1:mainField2:alignment:

Convenience init to set template elements with the following parameters

Objective-C

- (nonnull instancetype)initWithMainField1:(nullable NSString *)mainField1
                                mainField2:(nullable NSString *)mainField2
                                 alignment:(nullable SDLTextAlignment)alignment;

Swift

init(mainField1: String?, mainField2: String?, alignment: SDLTextAlignment?)

Parameters

mainField1

The text displayed on the first display line

mainField2

The text displayed on the second display line

alignment

The alignment that specifies how the text should be aligned on display

Return Value

An SDLShow object

-initWithMainField1:mainField1Type:mainField2:mainField2Type:alignment:

Convenience init to set template elements with the following parameters

Objective-C

- (nonnull instancetype)
    initWithMainField1:(nullable NSString *)mainField1
        mainField1Type:(nullable SDLMetadataType)mainField1Type
            mainField2:(nullable NSString *)mainField2
        mainField2Type:(nullable SDLMetadataType)mainField2Type
             alignment:(nullable SDLTextAlignment)alignment;

Swift

init(mainField1: String?, mainField1Type: SDLMetadataType?, mainField2: String?, mainField2Type: SDLMetadataType?, alignment: SDLTextAlignment?)

Parameters

mainField1

The text displayed on the first display line

mainField1Type

Text field metadata types

mainField2

The text displayed on the second display line

mainField2Type

Text field metadata types

alignment

The alignment that specifies how the text should be aligned on display

Return Value

An SDLShow object

-initWithMainField1:mainField2:mainField3:mainField4:alignment:

Convenience init to set template elements with the following parameters

Objective-C

- (nonnull instancetype)initWithMainField1:(nullable NSString *)mainField1
                                mainField2:(nullable NSString *)mainField2
                                mainField3:(nullable NSString *)mainField3
                                mainField4:(nullable NSString *)mainField4
                                 alignment:(nullable SDLTextAlignment)alignment;

Swift

init(mainField1: String?, mainField2: String?, mainField3: String?, mainField4: String?, alignment: SDLTextAlignment?)

Parameters

mainField1

The text displayed on the first display line

mainField2

The text displayed on the second display line

mainField3

The text displayed on the third display line

mainField4

The text displayed on the fourth display line

alignment

The alignment that specifies how the text should be aligned on display

Return Value

An SDLShow object

-initWithMainField1:mainField1Type:mainField2:mainField2Type:mainField3:mainField3Type:mainField4:mainField4Type:alignment:

Convenience init to set template elements with the following parameters

Objective-C

- (nonnull instancetype)
    initWithMainField1:(nullable NSString *)mainField1
        mainField1Type:(nullable SDLMetadataType)mainField1Type
            mainField2:(nullable NSString *)mainField2
        mainField2Type:(nullable SDLMetadataType)mainField2Type
            mainField3:(nullable NSString *)mainField3
        mainField3Type:(nullable SDLMetadataType)mainField3Type
            mainField4:(nullable NSString *)mainField4
        mainField4Type:(nullable SDLMetadataType)mainField4Type
             alignment:(nullable SDLTextAlignment)alignment;

Swift

init(mainField1: String?, mainField1Type: SDLMetadataType?, mainField2: String?, mainField2Type: SDLMetadataType?, mainField3: String?, mainField3Type: SDLMetadataType?, mainField4: String?, mainField4Type: SDLMetadataType?, alignment: SDLTextAlignment?)

Parameters

mainField1

The text displayed on the first display line

mainField1Type

Text field metadata types

mainField2

The text displayed on the second display line

mainField2Type

Text field metadata types

mainField3

The text displayed on the third display line

mainField3Type

Text field metadata types

mainField4

The text displayed on the fourth display line

mainField4Type

Text field metadata types

alignment

The alignment that specifies how the text should be aligned on display

Return Value

An SDLShow object

-initWithMainField1:mainField2:alignment:statusBar:mediaClock:mediaTrack:

Convenience init to set template elements with the following parameters

Objective-C

- (nonnull instancetype)initWithMainField1:(nullable NSString *)mainField1
                                mainField2:(nullable NSString *)mainField2
                                 alignment:(nullable SDLTextAlignment)alignment
                                 statusBar:(nullable NSString *)statusBar
                                mediaClock:(nullable NSString *)mediaClock
                                mediaTrack:(nullable NSString *)mediaTrack;

Swift

init(mainField1: String?, mainField2: String?, alignment: SDLTextAlignment?, statusBar: String?, mediaClock: String?, mediaTrack: String?)

Parameters

mainField1

The text displayed on the first display line

mainField2

The text displayed on the second display line

alignment

The alignment that specifies how the text should be aligned on display

statusBar

Text in the status Bar

mediaClock

The value for the mediaClock field

mediaTrack

The text in the track field

Return Value

An SDLShow object

-initWithMainField1:mainField2:mainField3:mainField4:alignment:statusBar:mediaClock:mediaTrack:graphic:softButtons:customPresets:textFieldMetadata:

Convenience init to set template elements with the following parameters

Objective-C

- (nonnull instancetype)
    initWithMainField1:(nullable NSString *)mainField1
            mainField2:(nullable NSString *)mainField2
            mainField3:(nullable NSString *)mainField3
            mainField4:(nullable NSString *)mainField4
             alignment:(nullable SDLTextAlignment)alignment
             statusBar:(nullable NSString *)statusBar
            mediaClock:(nullable NSString *)mediaClock
            mediaTrack:(nullable NSString *)mediaTrack
               graphic:(nullable SDLImage *)graphic
           softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons
         customPresets:(nullable NSArray<NSString *> *)customPresets
     textFieldMetadata:(nullable SDLMetadataTags *)metadata;

Swift

init(mainField1: String?, mainField2: String?, mainField3: String?, mainField4: String?, alignment: SDLTextAlignment?, statusBar: String?, mediaClock: String?, mediaTrack: String?, graphic: SDLImage?, softButtons: [SDLSoftButton]?, customPresets: [String]?, textFieldMetadata metadata: SDLMetadataTags?)

Parameters

mainField1

The text displayed on the first display line

mainField2

The text displayed on the second display line

mainField3

The text displayed on the third display line

mainField4

The text displayed on the fourth display line

alignment

The alignment that specifies how the text should be aligned on display

statusBar

Text in the status bar

mediaClock

The value for the mediaClock field

mediaTrack

The text in the track field

graphic

An image to be shown on supported displays

softButtons

The the Soft buttons defined by the app

customPresets

The custom presets defined by the App

metadata

Text field metadata

Return Value

An SDLShow object

-initWithMainField1:mainField2:mainField3:mainField4:alignment:statusBar:mediaTrack:graphic:secondaryGraphic:softButtons:customPresets:metadataTags:templateTitle:windowID:templateConfiguration:

Objective-C

- (nonnull instancetype)
       initWithMainField1:(nullable NSString *)mainField1
               mainField2:(nullable NSString *)mainField2
               mainField3:(nullable NSString *)mainField3
               mainField4:(nullable NSString *)mainField4
                alignment:(nullable SDLTextAlignment)alignment
                statusBar:(nullable NSString *)statusBar
               mediaTrack:(nullable NSString *)mediaTrack
                  graphic:(nullable SDLImage *)graphic
         secondaryGraphic:(nullable SDLImage *)secondaryGraphic
              softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons
            customPresets:(nullable NSArray<NSString *> *)customPresets
             metadataTags:(nullable SDLMetadataTags *)metadataTags
            templateTitle:(nullable NSString *)templateTitle
                 windowID:(nullable NSNumber<SDLInt> *)windowID
    templateConfiguration:
        (nullable SDLTemplateConfiguration *)templateConfiguration;

Swift

init(mainField1: String?, mainField2: String?, mainField3: String?, mainField4: String?, alignment: SDLTextAlignment?, statusBar: String?, mediaTrack: String?, graphic: SDLImage?, secondaryGraphic: SDLImage?, softButtons: [SDLSoftButton]?, customPresets: [String]?, metadataTags: SDLMetadataTags?, templateTitle: String?, windowID: (NSNumber & SDLInt)?, templateConfiguration: SDLTemplateConfiguration?)

Parameters

mainField1

- mainField1

mainField2

- mainField2

mainField3

- mainField3

mainField4

- mainField4

alignment

- alignment

statusBar

- statusBar

mediaTrack

- mediaTrack

graphic

- graphic

secondaryGraphic

- secondaryGraphic

softButtons

- softButtons

customPresets

- customPresets

metadataTags

- metadataTags

templateTitle

- templateTitle

windowID

- windowID

templateConfiguration

- templateConfiguration

Return Value

A SDLShow object

mainField1

The text displayed in a single-line display, or in the upper display line in a two-line display @discussion The String value representing the text displayed in a single-line display, or in the upper display line in a two-line display

Notes:

  • If this parameter is omitted, the text of mainField1 does not change
  • If this parameter is an empty string, the field will be cleared

Objective-C

@property (nonatomic, strong, nullable) NSString *mainField1;

Swift

var mainField1: String? { get set }

mainField2

The text displayed on the second display line of a two-line display

@discussion The String value representing the text displayed on the second display line of a two-line display

Notes:

  • If this parameter is omitted, the text of mainField2 does not change
  • If this parameter is an empty string, the field will be cleared
  • If provided and the display is a single-line display, the parameter is ignored
  • Maxlength = 500

Objective-C

@property (nonatomic, strong, nullable) NSString *mainField2;

Swift

var mainField2: String? { get set }

mainField3

The text displayed on the first display line of the second page

@discussion The String value representing the text displayed on the first display line of the second page

Notes:

  • If this parameter is omitted, the text of mainField3 does not change
  • If this parameter is an empty string, the field will be cleared
  • If provided and the display is a single-line display, the parameter is ignored
  • Maxlength = 500
@since SmartDeviceLink 2.0

Objective-C

@property (nonatomic, strong, nullable) NSString *mainField3;

Swift

var mainField3: String? { get set }

mainField4

The text displayed on the second display line of the second page

@discussion The String value representing the text displayed on the second display line of the second page

Notes:

  • If this parameter is omitted, the text of mainField4 does not change
  • If this parameter is an empty string, the field will be cleared
  • If provided and the display is a single-line display, the parameter is ignored
  • Maxlength = 500
@since SmartDeviceLink 2.0

Objective-C

@property (nonatomic, strong, nullable) NSString *mainField4;

Swift

var mainField4: String? { get set }

alignment

The alignment that Specifies how mainField1 and mainField2 text should be aligned on display

@discussion An Enumeration value

Notes:

  • Applies only to mainField1 and mainField2 provided on this call, not to what is already showing in display
  • If this parameter is omitted, text in both mainField1 and mainField2 will be centered
  • Has no effect with navigation display

Objective-C

@property (nonatomic, strong, nullable) SDLTextAlignment alignment;

Swift

var alignment: SDLTextAlignment? { get set }

statusBar

Text in the Status Bar

@discussion A String representing the text you want to add in the Status Bar

Notes: The status bar only exists on navigation displays

  • If this parameter is omitted, the status bar text will remain unchanged
  • If this parameter is an empty string, the field will be cleared
  • If provided and the display has no status bar, this parameter is ignored

Objective-C

@property (nonatomic, strong, nullable) NSString *statusBar;

Swift

var statusBar: String? { get set }

mediaClock

Text value for MediaClock field. Has to be properly formatted by Mobile App according to the module’s capabilities. If this text is set, any automatic media clock updates previously set with SetMediaClockTimer will be stopped. {“string_min_length”: 0, “string_max_length”: 500}

@deprecated in SmartDeviceLink 7.1.0 @added in SmartDeviceLink 1.0.0

Objective-C

@property (nonatomic, strong, nullable) NSString *mediaClock;

Swift

var mediaClock: String? { get set }

mediaTrack

The text in the track field

@discussion A String value disaplayed in the track field

Notes:

  • If parameter is omitted, the track field remains unchanged
  • If an empty string is provided, the field will be cleared
  • This field is only valid for media applications on navigation displays

Objective-C

@property (nonatomic, strong, nullable) NSString *mediaTrack;

Swift

var mediaTrack: String? { get set }

graphic

An image to be shown on supported displays

@discussion The value representing the image shown on supported displays

Notes: If omitted on supported displays, the displayed graphic shall not change
@since SmartDeviceLink 2.0

Objective-C

@property (nonatomic, strong, nullable) SDLImage *graphic;

Swift

var graphic: SDLImage? { get set }

secondaryGraphic

An image to be shown on supported displays

@discussion The value representing the image shown on supported displays

Notes: If omitted on supported displays, the displayed graphic shall not change
@since SmartDeviceLink 2.0

Objective-C

@property (nonatomic, strong, nullable) SDLImage *secondaryGraphic;

Swift

var secondaryGraphic: SDLImage? { get set }

softButtons

The the Soft buttons defined by the App

@discussion A Vector value represemting the Soft buttons defined by the App

Notes:

  • If omitted on supported displays, the currently displayed SoftButton values will not change
  • Array Minsize: 0
  • Array Maxsize: 8

@since SmartDeviceLink 2.0

Objective-C

@property (nonatomic, strong, nullable) NSArray<SDLSoftButton *> *softButtons;

Swift

var softButtons: [SDLSoftButton]? { get set }

customPresets

The Custom Presets defined by the App

@discussion A Vector value representing the Custom Presets defined by the App

  • If omitted on supported displays, the presets will be shown as not defined
  • Array Minsize: 0
  • Array Maxsize: 6
@since SmartDeviceLink 2.0

Objective-C

@property (nonatomic, strong, nullable) NSArray<NSString *> *customPresets;

Swift

var customPresets: [String]? { get set }

metadataTags

Text Field Metadata

App defined metadata information. See MetadataStruct. Uses mainField1, mainField2, mainField3, mainField4. If omitted on supported displays, the currently set metadata tags will not change. If any text field contains no tags or the none tag, the metadata tag for that textfield should be removed.

@since SmartDeviceLink 2.0

Objective-C

@property (nonatomic, strong, nullable) SDLMetadataTags *metadataTags;

Swift

var metadataTags: SDLMetadataTags? { get set }

windowID

This is the unique ID assigned to the window that this RPC is intended. If this param is not included, it will be assumed that this request is specifically for the main window on the main display. - see: PredefinedWindows enum.

@since SDL 6.0

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLUInt> *windowID;

Swift

var windowID: (NSNumber & SDLUInt)? { get set }

templateConfiguration

Used to set an alternate template layout to a window.

@since SDL 6.0

Objective-C

@property (nonatomic, strong, nullable) SDLTemplateConfiguration *templateConfiguration;

Swift

var templateConfiguration: SDLTemplateConfiguration? { get set }

templateTitle

The title of the current template.

How this will be displayed is dependent on the OEM design and implementation of the template.

Optional, since SmartDeviceLink 6.0

Objective-C

@property (nonatomic, strong, nullable) NSString *templateTitle;

Swift

var templateTitle: String? { get set }
View on GitHub.com
Previous Section Next Section