Quick Start Guide

  1. Prerequisites
  2. Get the SDK using CocoaPods
  3. Configure the SDK using CocoaPods
  4. Get the SDK as a zip file from CocoaPods
  5. Get the SDK as a zip file
  6. Configure the SDK as a zip file
  7. Initialize and launch

Get the SDK using CocoaPods

Contact your Nuance Client Services Manager to get the CocoaPods Artifactory Personal Access Token (PAT).

  • 1. Configure CocoaPods Azure Universal Packages plugin
    The CocoaPods plugin is used to download pods published as Universal Packages in Azure Artifacts feeds.

    • Install the CocoaPods packages.
      gem install ”cocoapods-azure-universal-packages”
  • 2. Configure Azure CLI
    The Azure CLI (Command-Line Interface) is a set of commands used to create and manage Azure resources.

    • Open a Powershell terminal instance.
    • Install homebrew, if not already installed.
      install homebrew
    • Execute command:
      brew update && brew install azure-cli
    • Execute command:
      az devops login
    • Enter the PAT provided by Nuance Client Services Manager.
  • 3. Enable the pod in your application
    Note: This step can be ignored if your application is already pod enabled.

    • Navigate to your application's source code folder.
    • Execute command
      pod init

Configure the SDK using CocoaPods

  • 1. Configure the pod file

    • Add the following line at the start of the podfile:
      plugin 'cocoapods-azure-universal-packages', {
          :organization => 'https://dev.azure.com/nuance-ent-rd-fe'
      }
                                              
    • Add the following as a pod dependency:
      $nuanceVersion = '10.4.0'
      pod 'NuanceMessagingSDK', :http => 'https://dev.azure.com/nuance-ent-rd-fe/sdk-ios/_apis/packaging/feeds/nuance-sdk-ios/upack/packages/nuancemessagingsdk/versions/'+$nuanceVersion
                                              
  • 2. Install third-party dependencies
    • pod 'Alamofire'
    • pod ‘AFNetworking’, ‘~>4.0.1’
    • pod ‘JSONModel’
    • pod ‘SVProgressHUD’
  • 3. Execute command
    pod install

Get the SDK as a zip from CocoaPods

Nuance recommends using the Dependency Manager to manage Nuance Messaging SDK dependencies in your project. However, the SDK can be downloaded as a zip file from CocoaPods using a homebrew CLI tool, AAD- Azure artifact downloader.

The homebrew CLI tool can be downloaded here:

To download artifacts as a zip file, ensure that the gem version on the system is greater than 3.3.6.

Arguments:
-v      artifact version (mandatory)
-f      feed name (optional) (default value: nuance-sdk-ios)
-d      download folder path (optional) (default value: Tool directory)
-p      Azure devops PAT (optional) (default value: Tool will prompt for PAT at runtime, if not found)

Examples:
Navigate to downloaded directory in a terminal

1. To download SDK version "10.0.0" from Prod.
   ./aad.sh -v "10.0.0"

Note: Tool will prompt for PAT at runtime, if not found.

2. To download SDK version "10.0.0" from different feed for example "nuance-sdk-ios-beta".
   ./aad.sh -v "10.0.0-beta.3" -f "nuance-sdk-ios-beta"

Note: Tool will prompt for PAT at runtime, if not found.

3. To download SDK version "10.0.0" from different feed for example "nuance-sdk-ios-beta" and save it some other directory.
   ./aad.sh -v "10.0.0-beta.3" -f "nuance-sdk-ios-beta" -d "/path/to/download/folder"

Note: Tool will prompt for PAT at runtime, if not found.

4. To download SDK version "10.0.0" using different PAT.
   ./aad.sh -v "10.0.0" -p "YOUR_PAT"
                    
  • NuanceGuide.Framework

    NuanceGuide.Framework adds support for rich media capabilities to Nuance Message.

Note: This distribution mechanism will not be supported in the future. Nuance recommends the use of CocoaPods artifactory, instead.

Get Nuance Messaging iOS SDK

Contact Nuance support to get the iOS SDK package.

Note: This distribution mechanism will not be supported in the future. Nuance recommends the use of CocoaPods artifactory, instead.

The package is comprised of the following items:

  • NuanceMessagingCore: This framework comprises the Core Messaging APIs mentioned in this document.

    NuanceMessagingUI: This Framework exposes Messaging and Call UI. Also exposes properties to brand the UI layer.

    NinaCobra:ASR/TTS engine to recognize user speach input and provide Text to Speach functionality in your Messaging UI.

Configure Xcode project settings to add Nuance Messaging Frameworks

Follow the following steps to configure the Xcode project settings to use the NuanceMessaging frameworks.

Note: This distribution mechanism will not be supported in the future. Nuance recommends the use of CocoaPods artifactory, instead.

Configure Xcode project settings to add Nuance Guide

First, follow the steps in the previous section to add NuanceGuide.framework to your workspace.

Note: This distribution mechanism will not be supported in the future. Nuance recommends the use of CocoaPods artifactory, instead.
  • Import framework to your workspace
    • import NuanceGuide
  • Add SDK dependencies
    • Alamofire.framework
    • AlamofireImage.framework
    • SVProgressHUD.framework
    • JSONModel.framework

Third-party licenses

AFNetworking
Note: This dependency was removed from v10.0.3.
LICENSE
Alamofire
Note: This dependency was removed from v10.0.3.
LICENSE
jsonmodel
Note: This dependency was removed from v10.0.4.
LICENSE
SVProgressHUD
Note: This dependency was removed from v10.0.4.
LICENSE
masonry
Note: This dependency was removed from v9.4.1.
LICENSE LICENSE
Toast
Note: This dependency was removed from v9.4.1.
LICENSE
AlamofireImage
Note: This dependency was removed from v10.0.3.
LICENSE
SwiftSoup
Note: This dependency was removed from v10.0.3.
LICENSE
SwiftLinkPreview
Note: This dependency was removed from v10.0.3.
LICENSE

Initialize messaging SDK module

You need to initialize the SDK before doing any operation with it. Either at startup, or at the desired point in your application flow, initialize the SDK with necessary parameters.

To initialize the module, invoke the initialize method in the NuanceMessaging class.

NuanceMessaging
  • initialize:(NSString *) dataCenter andClientID:(NSString*) clientID andClientSecret:(NSString*) clientSecret
  • initialize:(NSString *) dataCenter andClientID:(NSString*) clientID andClientSecret:(NSString*) clientSecret andTagServerName:(NSString*) tagServerName
  • initialize:(NSString *) dataCenter andClientID:(NSString*) clientID andClientSecret:(NSString*) clientSecret andTagServerName:(NSString*) tagServerName andFCMToken:(NSString*) fcmToken
dc Name of the data center where your messaging session is processed.
clientID Pass the Nuance provided clientID which will be used identify your messaging Instance.
clientSecret Pass the Nuance provided clientSecret code.
tagServerName Request Nuance to provide the tagserver used for handling your messages.
fcmToken If a device registration token is provided, the SDK can register to receive Push Messages from Nuance Messaging System.
class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. let clientID = "Your client Id"; let cientSecret = "your client secret" let nuanMessaging = NuanMessaging.getInstance(); nuanMessaging?.initialize("west", andClientID:clientID, andClientSecret:clientSecret, andTagServerName:"bestbrands") return true } }

Messaging window launch/restore flow diagram

Your application needs to follow the code path below when a user launches or navigates to different screens within the app.

shadowed image