Поделиться через


MSUserPolicy registerForDocTracking:userId:authenticationCallback:completionBlock method

Registers this policy with the document tracking service. See Remarks section for further details.

For more information, see How to: Use document tracking.

Signature

- (MSAsyncControl *)
    registerForDocTracking:(BOOL) sendRegistrationNotificationMail 
                                   userId:(NSString *)userId
                   authenticationCallback:(id<MSAuthenticationCallback>)authenticationCallback                                                    
                          completionBlock:(void(^)(BOOL success, NSError *error))completionBlock;

Parameters

Name Datatype Notes
sendRegistrationNotificationMail
BOOL
True or False
userId
NSString *
The id of the registering user in the form - userid@domain.ext
authenticationCallback
id<MSAuthenticationCallback>
completionBlock
void(^)(BOOL success, NSError *error)

Returns

A pointer to an MSAsyncControl object.

Defined in

MSUserPolicy.h

Supported Platforms

Minimum supported OS versions
iOS 7.0 and OS X 10.8

Remarks

Document tracking is currently only supported for Rights Management Services On-line scenarios. In order to conditionally register licenses based on this, we will use service discovery to determine whether or not registration is supported.

  • In the case of a MSMutableProtectedData object, obtained after binding the user policy to a file, will have the MSUserPolicy object within, we will not be able to register for on premises scenarios.
  • In the case of Microsoft Office using the MSProtector class for buffer based protection, the MSUserPolicy object in that class will be used to register the license.

If this method is called without setting up the corresponding MSLicenseMetadata or there is a registration error with the service, there is no adverse effect and an SDK error will be produced.

Because this method is asynchronous, the returned MSAsyncControl object can be used to cancel the request if needed.