This repository consists of a demo app for the Fleksy Predictive SDK package.
- Xcode 13
- iOS 15+
The PredictiveSDKSample project requires setting valid Fleksy Predictive SDK credentials in the info.plist
(for the keys SDKLicenseKey
and SDKLicenseSecret
).
The project uses Model-View-ViewModel (MVVM) pattern with SwiftUI.
These are the files of the demo app where the integration of the Predictive SDK occurs:
PredictiveServiceManager.swift
. ThePredictiveServiceManager
class configures and uses the APIs of thePredictiveService
object for Autocorrection and Next word prediction.LanguagesManager.swift
. TheLanguagesManager
class uses theLanguagesHelper
APIs of the Predictive SDK to have an up-to-date language file for theen-US
locale.Candidate.swift
. This file contains an extension to the Predictive SDKCandidate
type to showcase how to apply aCandidate
object to a string.