KeenASR SDK for iOS is an Objective C framework. If you are integrating the SDK into Swift iOS projects, you will need to perform the additional steps outlined below, after completing the Installation steps for Objective C.
1. Enable the Swift-ObjectiveC Bridge
-
Select your project in the left-hand navigation tree.
-
Choose the target under TARGETS.
-
Under the Build Settings tab, locate the row for the Objective C Bridging Header and specify the header
$(PROJECT_NAME)/KeenASR-Bridging-Header.h
-
Create an empty file $(PROJECT_NAME)/KeenASR-Bridging-Header.h in your project directory where other source files are located. Add the following statement in this file:
#import <KeenASR/KeenASR.h>
-
Alternatively, you can download this file. Make sure it’s stored in your
$(PROJECT_DIR}/${PROJECT_NAME}/
directory and matches the path you specified in the setting above.
2. Set the Framework Search Path
-
Click on project in the left-side navigation
-
Choose the appropriate target from the TARGETS list.
-
Under the Build Settings tab, locate the row called ‘Framework Search Paths’ and set its value to
$(PROJECT_DIR)
. Once set, this value displays as a project directory in your file system.
For more information, review the Objective C API Reference to familiarize yourself with with classes and methods. Keen Research will provide full Swift documentation in the future.