SDK
1. General information about SDK
When using the SDK solution, there is no need to take care of the mapping part, all that is handled within the SDK. Your predefined content producer will provide the risk assessment data. If you subscribe to multiple content producers for risk information, your predefined one is the one that will be sent to the SDK for processing.
The head of files of the IOS SDK will be shown below.
To get the new risk assessment data for a country, you now have a new property risk assessment available in the region information object.
2. SDK Risk Assessment Structure
This new object contains the following and will replace the threatassessment property that will now be deprecated in the future version of the SDK.
@interface RiskAssessment : NSObject
/**
* The Content producer that created the risk assessment data
*/
@property(readonly, nullable) ContentProducer* contentProducer;
/**
* The summary risk assessment for the region it describes
*/
@property(readonly, nullable) SummaryAssessment* summaryAssessment;
/**
* All the risk categories, risk levels and description about the region
*/
@property(readonly, nullable) NSArray<Assessment*>* assessmnets;
@end
Copy
Let’s go thought each one of them and see what they contain.
Content Producer
The property content producer contains the following:
@interface ContentProducer : NSObject
/**
The unique id for this content producer
*/
@property (readonly, nonnull) NSString* contentProducerUniqueId;
/**
The id of the content producer
*/
@property (readonly, nonnull) NSString* contentProducerId;
/**
The name of the content producer
*/
@property (readonly, nonnull) NSString* contentProducerName;
/**
The description about the content producer
*/
@property (readonly, nonnull) NSString* contentProducerDescription;
/**
The icon/ logo for the content producers
*/
@property (readonly, nonnull) UIImage* icon;
/**
Contains all the permissions of the content that the contnent producer allows of its content
*/
@property(readonly, nullable) NSArray<ContentProducerPermission*>* contentPermissions;
@end
Copy
This is useful if you want to showcase who the content is created by. The “contentPermission” contains info on how you are allowed to use their content. As for now it only contains what content type is brandable or not. i.e., If they allow you to rebrand its content or not.
Summary Assessment
This property contains the summary risk information about the country. This property contains the following:
@interface SummaryAssessment : NSObject
/**
Get the risk level for this summary of the assessment
*/
@property(readonly, nonnull) RiskLevel* riskLevel;
/**
Get a summary description about the regions risk assessment.
*/
@property(readonly, nonnull) NSString* summaryDescription;
/**
Get a general direction or trend in which a risk develops or changes over time. defined by the content producer.
*/
@property(readonly) NSInteger trend;
/**
Get a projected trend, that is a prediction of future change. defined by the content producer.
*/
@property(readonly) NSInteger trendProjection;
@end
Copy
Additional information:
Risk level property will be described further down in this document.
The summary description will be in the language that the SDK has set as used language and machine translation is active. Otherwise, English / the default language that the content producer has written the text in.
Trend and trend projection are defined by the content producer and not always used and have a default value of 0.
Assessments
The assessment property contains all the risks that a country has. The property looks as follows:
@interface Assessment : NSObject
/**
Get the risk level for this Category assessment
*/
@property(readonly, nonnull) RiskLevel* riskLevel;
/**
Get the Category for this assessment
*/
@property(readonly, nonnull) RiskCategory* riskCategory;
/**
Get the description about this assessment
*/
@property(readonly,nonnull) NSString* assessmentDescription;
/**
Get a general direction or trend in which a risk develops or changes over time. defined by the content producer.
*/
@property(readonly) NSInteger trend;
/**
Get a projected trend, that is a prediction of future change. defined by the content producer.
*/
@property(readonly) NSInteger trendProjection;
@end
Copy
Additional information:
Risk category property will be described further down in this document
The assessment description will be in the language that the SDK has set as used language and machine translation is active. Otherwise, English / the default language the content producer has written the text in.
The trend and trend projection are defined by the content producer and not always used and have a default value of 0.
Risk Level
This property contains the following:
@interface RiskLevel : NSObject
/**
The uniqe id for the risk level.
*/
@property (readonly, nonnull) NSString* riskLevelUniqueId;
/**
The ID for the risk level name
*/
@property (readonly, nonnull) NSString* riskLevelId;
/**
The name of the risk level in the language specified
*/
@property (readonly, nonnull) NSString* riskLevelName;
/**
The color of the risk level.
*/
@property (readonly, nonnull) UIColor* riskLevelColor;
/**
A number descibing the risk level to others
*/
@property (readonly) NSInteger riskLevelValue;
@end
Copy
Risk Category
This property contains the following:
@interface RiskCategory : NSObject
/**
The uniqe id for the risk category
*/
@property (readonly, nonnull) NSString* categoryUniqueId;
/**
The ID for the risk category name
*/
@property (readonly, nonnull) NSString* categoryId;
/**
The risk category name, in the language specified
*/
@property (readonly, nonnull) NSString* categoryName;
/**
The description of the risk category, in the language specified
*/
@property (readonly, nonnull) NSString* categoryDescription;
/**
A number descibing the priority of this type compared to others
*/
@property (readonly) NSInteger weight;
/**
An image representing the risk category
*/
@property (readonly, nonnull) UIImage* icon;
@end