Sample code for 30+ languages & platforms
Objective-C

Transition from Zip.GetEntryByID to Zip.EntryById

Provides instructions for replacing deprecated GetEntryByID method calls with EntryById.

Chilkat Objective-C Downloads

Objective-C
#import <CkoZip.h>
#import <CkoZipEntry.h>

BOOL success = NO;

CkoZip *zip = [[CkoZip alloc] init];

//  ...
//  ...
int id = 123;

//  ------------------------------------------------------------------------
//  The GetEntryByID method is deprecated:

CkoZipEntry *entryObj = [zip GetEntryByID: [NSNumber numberWithInt: id]];
if (zip.LastMethodSuccess == NO) {
    NSLog(@"%@",zip.LastErrorText);
    return;
}

//  ...
//  ...

//  ------------------------------------------------------------------------
//  Do the equivalent using EntryById.
//  Your application creates a new, empty ZipEntry object which is passed 
//  in the last argument and filled upon success.

CkoZipEntry *ze = [[CkoZipEntry alloc] init];
success = [zip EntryById: [NSNumber numberWithInt: id] entry: ze];
if (success == NO) {
    NSLog(@"%@",zip.LastErrorText);
    return;
}