简体   繁体   中英

Affdex iOS SDK "set the licensePath property with a valid file path" error

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM