Skip to content
Get your app connected to the 🚙, make your users feel like a 🌟
Objective-C Swift Ruby HTML C C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Merge pull request #1120 from smartdevicelink/hotfix/issue_template Oct 30, 2018
Example Apps Update for v6.3.1 Jul 18, 2019
SmartDeviceLink-iOS.xcodeproj Added class Jun 25, 2019
SmartDeviceLink Update for v6.3.1 Jul 18, 2019
SmartDeviceLinkSwift Update for v6.3.1 Jul 18, 2019
SmartDeviceLinkTests Send cells after image have been uploaded if no images just send cell… Jun 24, 2019
bson_c_lib @ 5e79ef2 Update BiSON dependency to v1.2.0 May 24, 2019
docs Update for v6.3.0 Jun 27, 2019
scripts Add clean switch to generate-documentation.sh Jun 3, 2016
theme add id attribute to section headers for linking Jul 25, 2016
.clang-format
.gitattributes Merge remote-tracking branch 'origin/master' into sdl_0004_sendlocati… Nov 3, 2016
.gitignore Add Jazzy theme, scripts, initial documentation, and an updated gitig… Jun 2, 2016
.gitmodules Update to use bson library submodule Jul 27, 2017
.travis.yml Updated test deps, but it’s still broken Apr 1, 2019
CHANGELOG.md Update for v6.3.1 Jul 18, 2019
Cartfile.private Updated test deps, but it’s still broken Apr 1, 2019
Cartfile.resolved Update cartfile.resolved Apr 4, 2019
DEPENDENCIES.md Merge remote-tracking branch 'origin/master' into sdl_0004_sendlocati… Nov 3, 2016
LICENSE
Package.swift fixed pr issue May 28, 2019
README.md Updating the readme file to tell devs that SDL now supports Accio and… May 22, 2019
SmartDeviceLink-iOS.podspec Update for v6.3.1 Jul 18, 2019
SmartDeviceLink.podspec Update for v6.3.1 Jul 18, 2019
codecov.yml Fix another codecov.yml issue Jun 7, 2016

README.md

Version License Build Status codecov Documentation CocoaPods Downloads Carthage compatible Slack Status Accio supported

SmartDeviceLink (SDL)

SmartDeviceLink (SDL) is a standard set of protocols and messages that connect applications on a smartphone to a vehicle head unit. This messaging enables a consumer to interact with their application using common in-vehicle interfaces such as a touch screen display, embedded voice recognition, steering wheel controls and various vehicle knobs and buttons. There are three main components that make up the SDL ecosystem.

  • The Core component is the software which Vehicle Manufacturers (OEMs) implement in their vehicle head units. Integrating this component into their head unit and HMI based on a set of guidelines and templates enables access to various smartphone applications.
  • The optional SDL Server can be used by Vehicle OEMs to update application policies and gather usage information for connected applications.
  • The iOS and Android libraries are implemented by app developers into their applications to enable command and control via the connected head unit.
  • To suggest new features to SDL, including the iOS library, go to the SDL Evolution github project.
  • To understand if a contribution should be entered as an iOS Pull Request or Issue, or an SDL Evolution Proposal, please reference this document.

SmartDeviceLink

Mobile Proxy

The mobile library component of SDL is meant to run on the end user’s smart-device from within SDL enabled apps. The library allows the apps to connect to SDL enabled head-units and hardware through bluetooth, USB, and TCP. Once the library establishes a connection between the smart device and head-unit through the preferred method of transport, the two components are able to communicate using the SDL defined protocol. The app integrating this library project is then able to expose its functionality to the head-unit through text, media, and other interactive elements.

SDL iOS

We're still working on creating documentation for each of these individual repositories, but in the meantime, you can find more information about SmartDeviceLink on the website.

See the changelog for release notes. This project uses Semantic Versioning.

Installing

Accio

You can install this library using Accio/SwiftPM documentation page. Please follow the steps to install and initialization Accio into a current or new application.

In your Package.swift file , you want to add .package(url: "https://github.com/smartdevicelink/sdl_ios.git", .from: "6.2.3"), to the dependencies array. Then add SmartDeviceLink to the targets dependencies array.

Please see Mainifest format to specify dependencies to a specific branch / version of SDL.

Swift

If you are building a Swift app, then add this instead SmartDeviceLinkSwift to the targets dependencies array.

Cocoapods

You can install this library using Cocoapods. You can get started with Cocoapods by following their install guide, and learn how to use Cocoapods to install dependencies by following this guide.

In your podfile, you want to add pod 'SmartDeviceLink', '~> 6.2'. Then run pod install inside your terminal. With Cocoapods, we support iOS 8.0+.

Swift

If you are building a Swift app, then add this instead pod 'SmartDeviceLink/Swift', '~> 6.2'. Then run pod install in your terminal.

Carthage

SDL iOS supports Carthage! Install using Carthage by following this guide. Carthage supports iOS 8+.

Swift

If you are building a Swift app, then include both packaged frameworks for expanded logging support.

Dynamic Framework

Tagged to our releases is a dynamic framework file that can be drag-and-dropped into the application. Dynamic frameworks are supported on iOS 8+. WARNING: You cannot submit your app to the app store with the framework as is. You MUST strip the simulator part of the framework first. Strip the x64 and i386 portions first like so:

lipo -remove i386 -remove x86_64 -o SmartDeviceLink.framework/SmartDeviceLink SmartDeviceLink.framework/SmartDeviceLink`

You can check the current architectures like so:

lipo -info SmartDeviceLink.framework/SmartDeviceLink

Reference Documentation

You can find the latest reference documentation on SmartDeviceLink.com Documentation, and view guides on SmartDeviceLink.com Guides.

Getting Help

First, view our guides on SmartDeviceLink.com.

If you see a bug, please post an issue on the appropriate repository. Please see the contribution guidelines before proceeding. If you need general assistance, or have other questions, you can sign up for the SDL Slack and chat with other developers and the maintainers of the project.

SDL iOS Getting Started

Example Apps

To use the example apps, you can use pod try SmartDeviceLink, alternately, you can clone or download the project, but you must then also retrieve the submodules by running git submodule init and git submodule update in your terminal while in the main directory of the project.

Other Installation Requirements

You can connect your application with manticore while running in TCP debug mode in order to test. For more information, see the guildes.

Enabling Background Capabilities

iOS 5 introduced the capability for an iOS application to maintain a connection to an external accessory while the application is in the background. This capability must be explicitly enabled for your application.

To enable the feature for your application, select your application's build target, go to Capabilities, enable Background Modes, and select the External accessory communication mode.

Enable External Accessory Background Mode

SDL protocol strings

Your application must support a set of smartdevicelink protocol strings in order to be connected to smartdevicelink enabled head units. Go to your application's .plist, look at the source, and add the following code under the top level dict. Note: This is not required if you're only testing by connected to a wifi enabled head unit, but is required for USB and Bluetooth enabled head units.

<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.smartdevicelink.prot29</string>
<string>com.smartdevicelink.prot28</string>
<string>com.smartdevicelink.prot27</string>
<string>com.smartdevicelink.prot26</string>
<string>com.smartdevicelink.prot25</string>
<string>com.smartdevicelink.prot24</string>
<string>com.smartdevicelink.prot23</string>
<string>com.smartdevicelink.prot22</string>
<string>com.smartdevicelink.prot21</string>
<string>com.smartdevicelink.prot20</string>
<string>com.smartdevicelink.prot19</string>
<string>com.smartdevicelink.prot18</string>
<string>com.smartdevicelink.prot17</string>
<string>com.smartdevicelink.prot16</string>
<string>com.smartdevicelink.prot15</string>
<string>com.smartdevicelink.prot14</string>
<string>com.smartdevicelink.prot13</string>
<string>com.smartdevicelink.prot12</string>
<string>com.smartdevicelink.prot11</string>
<string>com.smartdevicelink.prot10</string>
<string>com.smartdevicelink.prot9</string>
<string>com.smartdevicelink.prot8</string>
<string>com.smartdevicelink.prot7</string>
<string>com.smartdevicelink.prot6</string>
<string>com.smartdevicelink.prot5</string>
<string>com.smartdevicelink.prot4</string>
<string>com.smartdevicelink.prot3</string>
<string>com.smartdevicelink.prot2</string>
<string>com.smartdevicelink.prot1</string>
<string>com.smartdevicelink.prot0</string>
<string>com.ford.sync.prot0</string>
<string>com.smartdevicelink.multisession</string>
</array>

Continue Integrating

Go through the guide documentation to get started setting up your app to work with SDL!

Running Tests

To run tests, you will need to bootstrap the Carthage testing libraries. To do so, first install Carthage.

Then, from the root project directory, run:

carthage bootstrap --platform ios
cd ../

At this point, you can run tests from Xcode, or, if you wish to run the tests exactly as they will be run on the CI server, run:

xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -sdk "iphonesimulator10.0" -destination "OS=10.0,name=iPhone 7" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test

You can optionally pipe the result to xcpretty.

You can’t perform that action at this time.