iPhone SDK Update

Archived from the Transloadit support forum. Originally posted on January 18, 2012; details may be outdated, see our docs for current behavior. Original thread

Hey TransloadIt folks,
The iPhone SDK wasn’t really cutting it for my purposes so I added a feature and did some clean-up / reorganization based on some of my frustrations in getting the SDK up and running (particularly within XCode 4). I hope this helps others in a similar predicament:
https://github.com/thisandagain/iphone-sdk

The added feature is a public method called “addRawData” which is used to “pipe” NSData directly to the ASIFormDataRequest. My use case was trying to send audio data and image data (directly from an NSImage) to TransloadIt. An example:

UIImage *myImage = [UIImage imageNamed:@"example.png"];

[transcoder setTemplateId:@"templateidgoeshere"];

[transcoder addRawData:UIImageJPEGRepresentation(myImage, 0.9f) withFileName:@"iphone_image.jpg" addContentType:@"image/jpeg"];

[transcoder startAsynchronous];

Pull request
https://github.com/transloadit/iphone-sdk/pull/3

Hey andrew,

thank you for your efforts, that’s muchly appreciated!

I will ask Felix to review your pull request, as he is the author of the sdk.

Kind regards and thanks again,
Tim

Closing this ticket as the discussion has been continued over here: http://support.transloadit.com/discussions/problems/388-iphonse-sdk-upload-image-not-in-asset-library