Getting Started iOS

This tutorial will help you get the SDK up and running in Xcode.
 

Requirements:

  • iOS 13+
  • XCode 11+
  • Git
  • Cocoapods
  • iOS device or simulator running iOS 13 +

Project steps

  • Step 1: Request your Speebly Client ID
  • Step 2: Get the sample app from github
  • Step 3: Add Speebly Client SDK to the sample app using CocoaPods
  • Step 4: Use Xcode and configure the Speebly Client SDK
  • Step 5: Run app and wait for voice response

Step 1: Request a Client ID from Speebly

  • Get a Client ID from the form at the top of the page

Step 2: Get the sample app from github

  • In Terminal clone the ios-basic-voice-app
  • Open a new Terminal window (root directory). When you open a new Terminal window it opens to the root directory
  • In your root make a folder called speebly by typing the following:
    • mkdir speebly
  • Change directory to speebly by typing the following:
    • cd speebly
  • Clone sample app. In the speebly directory run the following git command to clone the repo by typing the following:
    • git clone https://github.com/speebly/ios-basic-voice-app.git
    • This will create a directory called ios-basic-voice-app
  • Change directory by typing the following:
    • cd ios-basic-voice-app/begin/BasicVoiceApp 
  • Your ios-basic-voice-app/begin/BasicVoiceApp directory should look like this:

Step 3: Add Speebly Client SDK to the BasicVoiceApp using CocoaPods

  • Using the same terminal as above. (if you have closed the above terminal window open a new terminal window and navigate to speebly/ios-basic-voice-app/begin/BasicVoiceApp)
  • Speebly uses CocoaPods to install and manage dependencies. 
  • Create a Podfile 
  • In speebly/ios-basic-voice-app/begin/BasicVoiceApp type:
    • Pod init
  • After running pod init your BasicVoiceApp directory should look like this

  • In Finder navigate to speebly/ios-basic-voice-app/begin/BasicVoiceApp (you are probably already there)
  • Open the Podfile with your favourite text editor. (We use Visual Studio Code)
  • When you open the podfile it should look like this:

  • Copy the following text and paste under # use_frameworks

pod 'speeblyclientsdk', '0.2.1', :source => "https://github.com/speebly/ios-client-framework-podspec.git"
pod 'SwiftGRPC'

  • In line 2,  # platform : ios, ‘9.0’, replace with platform: ios, ‘13.2’
  • Save the file 
  • Your Podfile should now look like this

  • In the Terminal window type:
    • Pod repo update
    • This will update all local spec-repos
  • Then type:
    • Pod install
    • This creates an Xcode workspace project file called BasicVoiceApp.xcworkspace. 
  • After you run pod install your Terminal window should look like this:

Step 4: Use Xcode to configure the Speebly Client SDK

  • In Finder navigate to speebly/ios-basic-voice-app/begin/BasicVoiceApp directory
  • Your BasicVoiceApp directory should look like this

  • Click on BasicVoiceApp.xcworkspace and Xcode will open with the SpeeblyClientSDK added to the project
  • Open AppDelegate.swift
  • Add your client Id and client key 

Step 5: Run app and wait for voice response

  • The simulator should look like the below:

You are done! Now set up the Voice Kit with your own Dialogflow agent

 

Speebly Voice  Terms of Service   Privacy