Question 31
Choose 1
A company has a native iOS order placement app that needs to connect to Salesforce to
retrieve consolidated information from many different objects in a
JSON format.
Which is the optimal method to implement this in Salesforce?
Correct answer:
A. Apex REST web service
Explanation:
When a native iOS app needs to connect to Salesforce and retrieve data from multiple objects in JSON format, the best approach is to expose an Apex REST web service.
Why Apex REST is optimal:
✅ JSON-native: REST APIs natively return data in JSON, which is ideal for mobile platforms like iOS that handle JSON easily.
✅ Customizable Response: Apex REST methods allow you to query multiple objects, consolidate data, and return a custom JSON structure, all in one response — perfect for mobile app consumption.
✅ Stateless & Lightweight: REST APIs are lightweight and stateless, which makes them ideal for mobile devices with limited bandwidth and resources.
✅ OAuth-Compatible: REST services in Salesforce work seamlessly with OAuth 2.0, allowing secure access from external mobile apps.
❌ Incorrect Answers:
B) Apex SOAP web service
While Apex SOAP web services can expose Salesforce data, SOAP is XML-based, which is heavier and less mobile-friendly than JSON. iOS apps typically use JSON over REST for better performance and easier parsing. SOAP also requires WSDLs and extra configuration, which introduces unnecessary complexity for mobile integration.
C) Apex SOAP callout
This refers to Salesforce making a SOAP call to an external system, not receiving a call from an iOS app. This doesn’t apply to the question — the iOS app is the client, and Salesforce is the provider. So this direction of integration is incorrect.
D) Apex REST callout
Again, a REST callout is when Salesforce calls out to another external system via HTTP REST. In this scenario, Salesforce is not initiating the call — the iOS app is. So, REST callout is irrelevant here.
🔗 Reference:
Salesforce Developer Guide – Apex REST
Trailhead – Expose Data with Apex REST
Mobile SDK Guide – iOS to Salesforce
When a native iOS app needs to connect to Salesforce and retrieve data from multiple objects in JSON format, the best approach is to expose an Apex REST web service.
Why Apex REST is optimal:
✅ JSON-native: REST APIs natively return data in JSON, which is ideal for mobile platforms like iOS that handle JSON easily.
✅ Customizable Response: Apex REST methods allow you to query multiple objects, consolidate data, and return a custom JSON structure, all in one response — perfect for mobile app consumption.
✅ Stateless & Lightweight: REST APIs are lightweight and stateless, which makes them ideal for mobile devices with limited bandwidth and resources.
✅ OAuth-Compatible: REST services in Salesforce work seamlessly with OAuth 2.0, allowing secure access from external mobile apps.
❌ Incorrect Answers:
B) Apex SOAP web service
While Apex SOAP web services can expose Salesforce data, SOAP is XML-based, which is heavier and less mobile-friendly than JSON. iOS apps typically use JSON over REST for better performance and easier parsing. SOAP also requires WSDLs and extra configuration, which introduces unnecessary complexity for mobile integration.
C) Apex SOAP callout
This refers to Salesforce making a SOAP call to an external system, not receiving a call from an iOS app. This doesn’t apply to the question — the iOS app is the client, and Salesforce is the provider. So this direction of integration is incorrect.
D) Apex REST callout
Again, a REST callout is when Salesforce calls out to another external system via HTTP REST. In this scenario, Salesforce is not initiating the call — the iOS app is. So, REST callout is irrelevant here.
🔗 Reference:
Salesforce Developer Guide – Apex REST
Trailhead – Expose Data with Apex REST
Mobile SDK Guide – iOS to Salesforce


