Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Curl bindings for Objective-C.
C Objective-C Shell
Branch: s3-branch
Pull request Compare This branch is 16 commits behind master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
English.lproj
enum
extras
include
lib
model
objective-curl.xcodeproj
operations
protocol
scripts
util
.empty
.gitignore
CurlFTP.h
CurlFTP.m
CurlObject.h
CurlObject.m
CurlS3.h
CurlS3.m
CurlSCP.h
CurlSCP.m
CurlSFTP.h
CurlSFTP.m
CurlTester-Info.plist
Info.plist
README.md
TestController.h
TestController.m
main.m
objective-curl_Prefix.pch
version.plist

README.md

The objective-curl framework is an easy-to-use interface to the libcurl C API for Cocoa developers. My first and foremost efforts are primarily focusing on FTP support. There are a couple frameworks out there for libcurl that subclass NSURLHandle, which has been deprecated since 10.4. This framework is designed for newer Cocoa applicaations using OS X 10.5 and higher.

All curl objects are subclasses of NSObject.

Threading is done with NSOperation and NSOperationQueue.

The framework also uses common Cocoa delegate patterns.

Simple FTP/SFTP Example

CurlFTP *ftp = [[CurlFTP alloc] init];

[ftp setVerbose:YES]
[ftp setShowProgress:YES];
[ftp setAuthUsername:@"me"];
[ftp setAuthPassword:@"mypassword"];

// See the CurlDelegate protocol
[ftp setDelegate:self];

// feel free to mix and match files and directories
NSArray *filesToUpload = [[NSArray alloc] initWithObjects:@"/path/to/musicfile.mp3", 
                                                          @"/path/to/directory", 
                                                          @"/path/to/moviefile.avi", NULL];
// kick off the upload on a background thread
[ftp uploadFilesAndDirectories:filesToUpload toHost:@"localhost" directory:@"~/tmp"];

// SFTP is simply a subclass of FTP and could be used in the exact same way

License

Copyright (c) 2009 Nick Jensen http://goto11.net

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.