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
SDLGetFile

SDLGetFile Class Reference

Section Contents

Overview

This request is sent to the module to retrieve a file.

-initWithFileName:

Convenience init for required parameters.

Objective-C

- (nonnull instancetype)initWithFileName:(nonnull NSString *)fileName;

Swift

init(fileName: String)

Parameters

fileName

File name that should be retrieved.

Return Value

A SDLGetFile object

-initWithFileName:appServiceId:fileType:

Convenience init for sending a small file.

Objective-C

- (nonnull instancetype)initWithFileName:(nonnull NSString *)fileName
                            appServiceId:(nullable NSString *)appServiceId
                                fileType:(nullable SDLFileType)fileType;

Swift

init(fileName: String, appServiceId: String?, fileType: SDLFileType?)

Parameters

fileName

File name that should be retrieved.

appServiceId

ID of the service that should have uploaded the requested file

fileType

Selected file type

Return Value

A SDLGetFile object

-initWithFileName:appServiceId:fileType:offset:length:

Convenience init for sending a large file in multiple data chunks.

Objective-C

- (nonnull instancetype)initWithFileName:(nonnull NSString *)fileName
                            appServiceId:(nullable NSString *)appServiceId
                                fileType:(nullable SDLFileType)fileType
                                  offset:(UInt32)offset
                                  length:(UInt32)length;

Swift

init(fileName: String, appServiceId: String?, fileType: SDLFileType?, offset: UInt32, length: UInt32)

Parameters

fileName

File name that should be retrieved.

appServiceId

ID of the service that should have uploaded the requested file

fileType

Selected file type

offset

Offset in bytes for resuming partial data chunks

length

Length in bytes for resuming partial data chunks

Return Value

A SDLGetFile object

fileName

File name that should be retrieved.

String, Required, Max string length 255 chars

Objective-C

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

Swift

var fileName: String { get set }

appServiceId

ID of the service that should have uploaded the requested file.

String, Optional

Objective-C

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

Swift

var appServiceId: String? { get set }

fileType

Selected file type.

SDLFileType, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLFileType fileType;

Swift

var fileType: SDLFileType? { get set }

offset

Optional offset in bytes for resuming partial data chunks.

Integer, Optional, minvalue=“0” maxvalue=“2000000000”

Objective-C

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

Swift

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

length

Optional length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded.

Integer, Optional, minvalue=“0” maxvalue=“2000000000”

Objective-C

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

Swift

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