Tailormade Mobile apps SDK
Create a ‘libs’ directory under your project main directory (same level as your src directory)
Copy the TailormadeSDK.aar to that libs directory
In Android Studio, open your app build.gradle file and add the new dependencies:
implementation(name:'TailormadeSDK', ext:'aar')
implementation 'com.google.android.gms:play-services-analytics:16.0.6'
Now open your top leven build.gradle and add a new repository:
flatDir {
dirs 'libs'
}
This is an example of the final result:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
}
To use the SDK you just need to call one method:
JSONObject response = Tailormade.getInfo(context, "your_license_string", Tailormade.ServerType.PROD,
false, true, true, true, true);
This will make the required network calls to our servers, so you need to do this in a background thread.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>webservices.telefonica.es</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
Import the TailormadeSDK framework:
import TailormadeSDK
To use the SDK you just need to call one method:
[Tailormade getInfoWithLicense:@"your_license_string"
endpoint:PREPROD
getNavigationSegments:YES
withPercentiles:YES
withOwn:YES
groupByCategory:YES
getSocialSegments:YES
andCompletionHandler:^(NSDictionary *response, NSError *error) {
NSLog(@"Response: %@", response);
}];