iphoneSetFileDataProtection

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
iphoneSetFileDataProtection <filename>, <dataProtection>
Summary

Sets the data protection level of the given file.

Introduced5.5.1
OSios
Platformsmobile
Parameters
NameTypeDescription
filename

The full path to the file to be protected.

dataProtection

The level of protection to apply to the file

"none": No protection
"complete": The file is not accessible, for read or write, while the device is locked.
"complete unless open": The file is fully protected when the device is locked, unless it was already open
"complete until first user authentication": The file is fully protected until the user unlocks the device for this first time.
Example
iphoneSetFileDataProtection myFile, "none"
iphoneSetFileDataProtection specialFolderPath("documents") & "/appointments.txt", "complete"
RelatedCommand: iphoneSetDoNotBackupFile
Function: iphoneFileDataProtection, iphoneDoNotBackupFile
Message: protectedDataWillBecomeUnavailable, protectedDataDidBecomeAvailable
Description

Use the iphoneSetFileDataProtection command to set the data protection level of a file.

The iphoneSetFileDataProtection command sets the level of data protection applied to a file. The files protection level can be checked using the iphoneFileDataProtection function.