You need to sign in to do that
Don't have an account?
Nirmal Vasanthakumar
How to access attachments from salesforce object to native iOS app.
I am building a native iOS app.I want to populate images in the attachments of a salesforce object to the app.I can query to get body from object as /services/data/v23.0/sobjects/Attachment/xxxxxxxxxxxxxxx/Body. I tried to send this body field of attachment via a asihttp request with request header Authorization which gives response string as ÿØÿà.
Summary: Any method to access salesforce files to native iOS app.
Thank you very much in advance.
Take a look at this class. This works for audio attachments but the logic would remain the same.
https://github.com/mbotos/CaseMemo/blob/master/iOS/CaseMemo/DetailViewController.m
Let me know if that helps.
Regards,
Gaurav
Thanks.
However I managed to access images via attachments directly by sending request to salesforce via salesforceinstanceURL + file path of the body and with header in request as
Authorization value:"Bearer" +salesforceaccessToken. The response contains the image as data.
Thanks for Your effort.
I would like to fetch image from custom object's attachment. I have tried to fetch image using following code
SFRestRequest *request = [SFRestRequest requestWithMethod:SFRestMethodGET path:path queryParams:nil];
[[SFRestAPI sharedInstance] send:request delegate:self];
Where path is BODY URL of attachment but its not working. Please suggest me what is missing in request or give me some working example.
I also wanted to fetch image from attachemnt.
Could you please help me on posting the sample code of fetching attachemnt part ?
Thanks in advance.
Regards,
Nive