Sample code for 30+ languages & platforms
Objective-C

Wasabi Download File

See more Wasabi Examples

Demonstrates how to download a file from a Wasabi bucket.

Chilkat Objective-C Downloads

Objective-C
#import <CkoHttp.h>
#import <NSString.h>

BOOL success = NO;

// This requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

CkoHttp *http = [[CkoHttp alloc] init];

// Insert your access key here:
http.AwsAccessKey = @"access-key";

// Insert your secret key here:
http.AwsSecretKey = @"secret-key";

// Use the endpoint matching the bucket's region.
http.AwsEndpoint = @"s3.us-west-1.wasabisys.com";

NSString *bucketName = @"chilkat-west";
NSString *objectName = @"seahorse.jpg";
NSString *localFilePath = @"c:/temp/qa_output/seahorse.jpg";

success = [http S3_DownloadFile: bucketName objectName: objectName localFilePath: localFilePath];
if (success != YES) {
    NSLog(@"%@",http.LastErrorText);
}
else {
    NSLog(@"%@",@"File downloaded.");
}