Contents

remediationMap

A dictionary containing sets of strings used to customize the remediation portion of the block page.

Declaration

var remediationMap: [String : [String : NSObject]]? { get set }

Discussion

Each key in this dictionary corresponds to a string in the remediation portion of the block page. The value of each key is a dictionary that maps keys to the custom strings to be inserted into the block page. The keys for the sub-dictionaries are defined by the Filter Control Provider. When the Filter Data Provider creates a “remediate” verdict using [NEFilterDataVerdict remediateVerdictWithRemediationURLMapKey:remediationButtonTextMapKey:], it specifies the keys corresponding to the desired custom strings to be inserted into the block page. The system then uses these keys to fetch the custom strings from this dictionary and inserts them into the block page.

Here is an example remediationMap dictionary:

self.remediationMap = @{
    NEFilterProviderRemediationMapRemediationURLs :
        @{
            @"RemediateKey1" : @"http://www.remediation_url_1.com",
            @"RemediateKey2" : @"http://www.remediation_url_2.com"
        },
    NEFilterProviderRemediationMapRemediationButtonTexts :
        @{
            @"RemediationButtonText1" : @"Give me access"
        }
};

With this example remediationMap dictionary, suppose that the Filter Data Provider wanted to present the user with a block page containing a link to http://www.remediation_url_2.com titled “Give me access”. In this case the Filter Data Provider would create a NEFilterDataVerdict object like so:

NEFilterDataVerdict *newVerdict = [NEFilterDataVerdict remediateVerdictWithRemediationURLMapKey:@"RemediateKey2" 
                                                                    remediationButtonTextMapKey:@"RemediationButtonText1"];

See Also

Handling remediation