Developer

FeatureVectorPolicy Handling and Compatibilty with v2 Registration Service for iOS

mobile service for development and operations and SAP Mobile Platform Server version 3.0 SP08 and later provides a registration service and Application Settings structure named v2, that is compatible with SAP Mobile Platform SDK version 3.0 SP09 and later.

The SAP Mobile Platform SDK Logon component attempts to connect to the v2 registration service and if it is not available (for example, an older server version) it falls back to the v1 registration service. The ApplicationSettings subcomponent uses the service version for which the registration succeeded to get the application settings. The ApplicationSettings provides access to feature vector policy settings from SP09 on all platforms, which can be accessed through the ApplicationSettings class. The policy is provided as a dictionary (platform dependent) of a string and FeatureVectorPolicy key value pairs.

The properties of a FeatureVectorPolicy are:
  • Properties:
    • AdditionalParameters : IReadOnlyDictionary<string, IReadOnlyProperty>
    • Description : string
    • DisplayName : string
    • Id : string
    • JsModule : string
    • Name : string
    • PluginName : string
    • Version : string
    • Whitelist : string
  • Methods: FeatureVectorPolicy()
ApplicationSettings also provides a simple property to get all Usage related Settings from the IUsageSettings object. Properties are:
  • IsAppSpecificClientUsageKeysEnabled : bool?
  • ShouldCollectClientUsageReports : bool?
  • Usage3GUploadTime : uint?

iOS FeatureVectorPolicy API Usage

ApplicationSettings API:
/*
 * Readonly dictionary for the FeatureVectorPolicy entries
 * Keys are the id-s of the FeatureVectors
 * Values are MAFApplicationSettingsFeatureVectorPolicy class istances
 */
@property (nonatomic, readonly) NSDictionary *featureVectorPolicies;

/*
 * Usage concerned values from the settings
 */
@property(nonatomic, readonly) MAFUsageSettings *usageSettings;
FeatureVectorPolicy:
@interface MAFApplicationSettingsFeatureVectorPolicy : NSObject <NSCoding, NSCopying>

// Specific properties of the FeatureVectorPolicy

/*
 * Name attribute of the FeatureVectorPolicy
 */
@property (nonatomic, readonly) NSString *name;
/*
 * The description attribute of the FeatureVectorPolicy
 */
@property (nonatomic, readonly) NSString *description;
/*
 * The name of the plugin
 */
@property (nonatomic, readonly) NSString *pluginName;
/*
 * The ID of the FeatureVectorPolicy
 */
@property (nonatomic, readonly) NSString *Id;
/*
 * The used JS module
 */
@property (nonatomic, readonly) NSString *jsModule;
/*
 * The version of the FeatureVectorPolicy
 */
@property (nonatomic, readonly) NSString *version;
/*
 * The displaying name of the FeatureVectorPolicy
 */
@property (nonatomic, readonly) NSString *displayName;
/*
 * The whitelist
 */
@property (nonatomic, readonly) NSString *whitelist;


/*
 * Any other properties that might come on the top of the ones listed above
 * The values of the dictionary are MAFApplicationSettingsReadOnlyProperties.
 */
@property (nonatomic, readonly) NSDictionary *additionalProperties;

@end
Usage configuration Settings provided by ApplicationSettings:
@interface MAFUsageSettings : NSObject

/*
 * Indicates whether the application sepcific client usage keys are enabled or not
 */
@property BOOL isAppSpecificClientUsageKeysEnabled;

/*
 * Shows if the client usage reports should be collected or not
 */
@property BOOL shouldCollectClientUsageReports;

/*
 * Indicates how many days Usage should wait before trying to send data on 3G.
 */
@property NSUInteger usage3GUploadTime;

@end