Thursday, 15 September 2011

iphone - how to access Salesforce Attachment Body (base64 binary data) in ios? -


I am working on the iOS Native app to get attachments from sales.

I want to show sales force in my iPhone app, attachments for special items such as leads, contacts etc. For this, I am using race ap and I got the response body. But the feedback body has a URL but I want the attachment body's binary data.

This is my code:

My remaining API request

  NSString * attachment = [NSString stringWithFormat: @ "Attachment to name, body, content Select type "]; SFRestRequest * Request = [[SFRestAPI Shared Instance] RequestForAquariery: Attachment]; [[SFRSPPI Shared Instance] Send: Request Rep: Self];   

I get body response in the following form: body = "/services/data/v23.0/sobjects/Attachment/00P90000004SRFlEAO/ Body "; ContentType = "app / video"; Name = "video.mov"; Properties = = Type = Attachments; Url = "/services/data/v23.0/sobjects/Attachment/00P90000004SRFlEAO"; }; }

You have to request the GET given in the physical field to get the actual binary content Please.

No comments:

Post a Comment