Sample code for 30+ languages & platforms
Objective-C

Example: Crypt2.GetSignatureSigningTimeStr method

Demonstrates how to call the GetSignatureSigningTimeStr method.

Chilkat Objective-C Downloads

Objective-C
#import <CkoCrypt2.h>

BOOL success = NO;

CkoCrypt2 *crypt = [[CkoCrypt2 alloc] init];

success = [crypt VerifyP7M: @"qa_data/cades/CAdES-T/Signature-C-T-1.p7m" destPath: @"qa_output/out.dat"];
if (success == NO) {
    NSLog(@"%@",crypt.LastErrorText);
    return;
}

int numSigners = [crypt.NumSignerCerts intValue];
NSLog(@"%@%d",@"Num Signers = ",numSigners);

int i = 0;
while (i < numSigners) {
    if ([crypt HasSignatureSigningTime: [NSNumber numberWithInt: i]] == YES) {
        NSLog(@"%d%@%@",i + 1,@": ",[crypt GetSignatureSigningTimeStr: [NSNumber numberWithInt: i]]);
    }
    else {
        NSLog(@"%d%@",i + 1,@": has no signing time.");
    }

    i = i + 1;
}

// Sample output:

// Num Signers = 1
// 1: Sun, 03 Dec 2013 06:57:41 GMT