2

Using the iOS SDK, I tried to set the license token like this:

#ifndef YOUR_AFFDEX_LICENSE_STRING_GOES_HERE
#define YOUR_AFFDEX_LICENSE_STRING_GOES_HERE @"090b118356d7c6afc08b6b58763...snip...56ade05a27c71c80f221"
#endif

but when I tried to run your AffdexMe demo, it says

Detector Error. No license provided.
ahamino
  • 634
  • 1
  • 4
  • 12
caboteria
  • 80
  • 4

1 Answers1

2

When setting the macro, you need to use the contents of the SDK license file that you received from Affectiva. When you inspect the license file's contents, you see a JSON string like this:

{"token": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "licensor": "Affectiva Inc.", "expires": "2019-04-15", "developerId": "dev@mycompany.com", "software": "Affdex SDK"}

Set the macro accordingly:

#define YOUR_AFFDEX_LICENSE_STRING_GOES_HERE {\"token\": \"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\", \"licensor\": \"Affectiva Inc.\", \"expires\": \"2019-04-15\", \"developerId\": \"dev@mycompany.com\", \"software\": \"Affdex SDK\"}

Note that it is important to escape each double quote character with the backslash character so that the C preprocessor doesn't get confused.

Boisy Pitre
  • 156
  • 6
  • It means We have to purchase it if we want to use the Affectiva SDK .? Actually I am using it without buying the SDK,add the Pod file and download the demo source code from git hub and make changes in it and I am getting the same error message. So should I buy it or can I get the License key for demo purpose ..? @Boisy Piter – Shashi Ranjan Apr 18 '17 at 05:58