function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jacob.bullockjacob.bullock 

Calling custom api methods instead of writing queries

We have a pretty robust application that we built in Flex for force.com.  With that I am able to call api methods that were built by our backend team quite easily.  I am looking into building our mobile app in iOS and I seem to only see examples where they encourage you to write queries.  We would like to avoid this if possible, but I don't see the way we would connect to these custom calls through ios.  In Flex we used the force.com api to connect to these apis with great success.  Hoping these options are available in native ios development as well.

Best Answer chosen by Admin (Salesforce Developers) 
cloudcodercloudcoder

1. Check out the following class from the sample app which comes with the Force.com for iOS toolkit: https://github.com/developerforce/Force.com-Toolkit-for-iOS/blob/master/SVNTest/Classes/FDCSampleApexWebSvcTest.m

 

 

2. Apex REST methods are currently available in pilot. You can call support to have it enabled in your org.

All Answers

cloudcodercloudcoder

Yes, this can definitely be done. For example, for you, the Force.com for iOS toolkit supports custom methods. In addition, tomorrow morning, we have a webinar covering Apex REST services which is a great way to expose an Apex method via REST for you to consume via mobile devices.

 

You can register for the webinar here: http://www.developerforce.com/events/apex_rest_api_webinar/registration.php?d=70130000000rtdo

 

jacob.bullockjacob.bullock

do you have any resources that show how to call custom methods?   The only examples I see are using queries.  I also saw a library that sf recommended, but it looks to only support a few web services.

 

Regarding the REST method, is that available yet.  My salesforce team says that won't be available for at least a couple months.

cloudcodercloudcoder

1. Check out the following class from the sample app which comes with the Force.com for iOS toolkit: https://github.com/developerforce/Force.com-Toolkit-for-iOS/blob/master/SVNTest/Classes/FDCSampleApexWebSvcTest.m

 

 

2. Apex REST methods are currently available in pilot. You can call support to have it enabled in your org.

This was selected as the best answer
jacob.bullockjacob.bullock

thanks,  I think that will do it for me.