(Objective-C) Transition from Zip.AppendSb to Zip.AddSb
Provides instructions for replacing deprecated AppendSb method calls with AddSb. Note: This example requires Chilkat v11.0.0 or greater.
#import <CkoZip.h>
#import <NSString.h>
#import <CkoStringBuilder.h>
CkoZip *zip = [[CkoZip alloc] init];
// ...
// ...
NSString *pathInZip = @"example.txt";
CkoStringBuilder *sb = [[CkoStringBuilder alloc] init];
[sb Append: @"This is a test"];
NSString *charset = @"utf-8";
// ------------------------------------------------------------------------
// The AppendSb method is deprecated:
BOOL success = [zip AppendSb: pathInZip sb: sb charset: charset];
// ------------------------------------------------------------------------
// For consistency, the name has changed to AddSb.
success = [zip AddSb: pathInZip sb: sb charset: charset];
|