You need to sign in to do that
Don't have an account?
RestKit object mapping
Hi,
The Salesforce iOS SDK contains two classes: SFRestAPI and SFRestRequest. Basically, we can invoke the methods of these classes to retrieve data from Salesforce and also update/delete etc..
I guess that they use a wrapper of RestKit methods combined with the SFOAuth that takes care of authentification tasks(refreshing tokens...) to enable secured access to server.
But RestKit has a powerful object mapping that takes a JSON response and populates the fields of a mapped object. It is one of the best features of RestKit and the SDK does not provide access to such features.
Do you know if there is a way to access these capabilities using the current SDK?
If not, any source of conversion of Salesforces fields types to iOS known data types?
Thanks
We don't currently layer anything on top of the RestKit object mapping; however it is present with the Salesforce Mobile SDK and you're free to continue using it along with the OAuth context that the Mobile SDK provides.
Take a look at the source code for RKRequestDelegateWrapper for an example of how we are injecting the OAuth credentials into each REST request.
If you'd like to see more direct RKObjectMapper support added to a future version of the SDK, please file an enhancement request here:
https://github.com/forcedotcom/SalesforceMobileSDK-iOS/issues
And as always we welcome contributions of features such as these from the community.
All Answers
We don't currently layer anything on top of the RestKit object mapping; however it is present with the Salesforce Mobile SDK and you're free to continue using it along with the OAuth context that the Mobile SDK provides.
Take a look at the source code for RKRequestDelegateWrapper for an example of how we are injecting the OAuth credentials into each REST request.
If you'd like to see more direct RKObjectMapper support added to a future version of the SDK, please file an enhancement request here:
https://github.com/forcedotcom/SalesforceMobileSDK-iOS/issues
And as always we welcome contributions of features such as these from the community.
Any news about it?
Thanks.