Geolocation
MobbSign can add the location of the device to every signature, as additional evidence of where the document was signed. The location fields are added to the unsigned area of the signature, so they can be reviewed without the private key:
| Field | Description |
|---|---|
| Latitude and longitude | Coordinates of the device. |
| Accuracy | Accuracy of the location, in metres. |
| Locality and country | Name of the locality and of the country. |
| Country code | ISO code of the country. |
1. Declare the usage description
Add the usage description to Info.plist. iOS shows it when it asks the user for permission:
Info.plist
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your location is added to the signature as evidence of where the document was signed.</string>
2. Enable geolocation
NSMutableDictionary *customDict = [[NSMutableDictionary alloc] init];
[customDict setObject:@YES forKey:kMobbSign_DEVICE_ENABLED];
self.mobbSignView = [[MobbSignView alloc] initWithFrame:self.view.bounds customizationDictionary:customDict];
| Key | Description |
|---|---|
kMobbSign_DEVICE_ENABLED | Adds the location of the device to the signatures. |
kMobbSign_DEVICE_LAST_TIME | Maximum age of the location for it to be included. |
kMobbSign_DEVICE_POSITION_ACCURACY | Minimum accuracy of the location for it to be included. |
If a condition is not met, the location is not included in the signature. The onLocationRetrieved block receives the result of each location request.