Skip Navigation

BlackBerry Dynamics
and the
Swift
programming language

The
BlackBerry Dynamics SDK for iOS
is compatible with the
Swift
programming language from
Apple
(for supported versions, see Software requirements).
Note the following limitations and best practices:
Item
Description
Xcode
template
The easiest way to use
Swift
with the
BlackBerry Dynamics SDK
is to create a new
Xcode
project with the Single View template that includes all necessary frameworks and compile-time directives. For more information about creating the template, see Create an Objective-C or Swift project with the Xcode template.
You can include your
Swift
source files into the project and build with
Xcode
.
Sample apps
The
BlackBerry Dynamics SDK
includes the following sample apps in
Swift
. The sample apps are stored in ~/Library/Application Support/BlackBerry/Good.platform/iOS/Examples/. The
Swift
3 versions are located in the "swift" folder, and the
Swift
4 versions are located in the "swift4" folder.
iPhone
X is the default device for the
Swift
4.0 sample applications.
  • RSSReaderSwift: Demonstrates how to use the
    BlackBerry Dynamics
    Secure Communication APIs for basic networking. The sample shows how to use
    GET
    with the
    GDHttpRequest
    API (with and without authentication) and the
    GDNSURLSesssion
    API. For session management, only
    GDNSURLSesssion
    sharedSession is supported.
  • ServicesServerSwift and ServicesClientSwift: Provides a complete client/server app that demonstrates how to implement a service with the
    BlackBerry Dynamics
    Shared Services Framework
    . The service enables secure communication between two apps. The ServicesServerSwift app provides the service and works in conjunction with the ServicesСlientSwift app, which calls the service. The samples also demonstrate how the file transfer service is used with the ServicesServeSwift app.