Retrieves information about the data names stored in the vault.
- (NSArray *)getDataNames;
Returns a list of objects of type DVDataName.
// Call getDataNames to retrieve all stored element names from our data vault
NSArray *dataNames = [dataVault getDataNames];
if (dataNames != nil) {
DVDataName *dataName;
for (NSInteger iIdx = 0; iIdx < [dataNames count]; iIdx++) {
dataName = [dataNames objectAtIndex:iIdx];
if (dataName.type == kDVDataTypeString) {
// Stored value is of string type
NSString *thisStringValue = [dataVault getString:dataName.name];
}
else if (dataName.type == kDVDataTypeBinary) {
// Stored value is of binary type
NSData *thisBinaryValue = [dataVault getValue:dataName.name];
}
else {
// Unknown type. Possibly stored using previous version of dataVault
// Try as string first and then as binary
NSString *thisStringValue = [dataVault getString:dataName.name];
if (thisStringValue == nil) {
NSData *thisBinaryValue = [dataVault getValue:dataName.name];
}
}
}
}