|ReleasedLast Release||Nov 2017|
Welcome to the Affdex SDK for iOS.
We are surrounded by highly-connected smart devices, interactive digital experiences and artificial intelligence. Yet, technology is not able to sense, analyze and adapt to human emotions. At Affectiva, we have made it our mission to bring emotional intelligence to the digital world. To make this mission a reality, we have created the Affdex SDK so that others can bring emotion sensing and analytics to their own offerings, be it digital experiences, apps, games, devices, or other technologies.
Using our SDK, developers can now enrich digital experiences and apps by detecting emotion. Devices can now instantly respond to a user’s unfiltered emotions, and apps can adjust their interfaces and flow to better suit moods. This makes for a more authentic, interactive, and unique experience.
For developer documentation, sample code, and other information, please visit our website:
The SDK License Agreement is available at:
If you do not have CocoaPods installed on your Mac, please install it using the instructions in the CocoaPods Getting Started Guide.
After you have installed CocoaPods on your Mac, create a file named "Podfile" in your project directory. This is the directory which contains the .xcodeproj and/or .xcworkspace files for your project. The Podfile is a plain-text file which describes the framework and library dependencies that your project contains. Installing the pod file will load and configure the Affdex SDK framework for use with your project.
Place the following text into your Podfile, substituting your app name for the 'MyApp' target:
source 'https://github.com/CocoaPods/Specs.git' use_frameworks! target 'MyApp' do pod 'AffdexSDK-iOS' end post_install do |installer| installer.pods_project.targets.each do |target| if (target.name == "AWSCore") || (target.name == 'AWSKinesis') target.build_configurations.each do |config| config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode' end end end end
Note: The post_install step is required in order to configure the AWS subdependencies of the Affdex SDK (the 'AWSCore' and 'AWSKinesis' targets) if your app supports bitcode. If you do not require bitcode support in your app, this section can be omitted from the Podfile.
With the Podfile created, run the following commands from the Terminal application:
pod repo update pod install
This will install the SDK and support pods into the Pods folder, and will create or update the Xcode workspace file to support building from the pods. Make sure to open the .xcworkspace file in Xcode instead of the .xcodeproj file from this point onwards. You can now build and run the project to a device or simulator from Xcode.
After you run
pod install your app will be linked to the most recent release of the Affdex SDK, although you can also configure your Podfile to install a specific version of the SDK if you choose. Your project will continue to use this version even if newer versions of the SDK are released. Use the
pod update command to update to newer SDK releases as they become available.
If you do not have Carthage installed on your Mac, please install it using the instructions in Installing Carthage
After you have installed Carthage on your Mac, create a file named "Cartfile" in your project directory. This is the directory which contains the .xcodeproj and/or .xcworkspace files for your project. The Cartfile is a plain-text file which describes the framework and library dependencies that your project contains. Carthage will use this file to fetch and build your dependencies if needed.
binary "https://download.affectiva.com/apple/ios/AffdexSDK.json" ~> 4.0.1 github "aws/aws-sdk-ios"
carthage update. This will fetch dependencies into a Carthage/Checkouts folder, then build each one or download a pre-compiled framework.
On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop the following frameworks from the Carthage/Build folder on disk:
Affdex.framework AWSCore.framework AWSKinesis.framework
$(SRCROOT)/Carthage/Build/iOS/Affdex.framework $(SRCROOT)/Carthage/Build/iOS/AWSCore.framework $(SRCROOT)/Carthage/Build/iOS/AWSKinesis.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Affdex.framework $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AWSCore.framework $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AWSKinesis.framework