SAP Discovery Service integration in SAP Cloud Platform SDK for iOS
For latest information, please visit SAP Cloud Platform SDK for iOS documentation.
[Updated] : Blog content updated considering latest release of SAP Cloud Platform SDK for iOS 3.0 SP01 Assistant UX (You might have already read my colleague Andreas blog post on what’s new in latest SAP Cloud Platform SDK for iOS 3.0 SP01)
Integration to SAP discovery service has been available since release of SAP Cloud Platform SDK 2.0 SP01
- Provides configuration information necessary for a user without enrolling a devicen mobile device management (MDM).
- enhances the user onboarding process by letting you distribute initial configuration data to mobile apps.
Using SAP Cloud Platform Mobile Services cockpit, you can publish application configurations to the SAP Discovery service
In your SAP Cloud Platform Mobile services trial account, there will be a default provider and domain.
When you create an app using Assistant, you would notice an additional feature “Discovery service” under “Features” step
- In above screenshot, i opted to choose “Create new application” template, hence i had a choice whether to select this option or not.
- If you happen to choose “Sample Application” template, you won’t see such feature screen during Xcode project creation as it is included in sample template by default and related code will be .
- If you happen to choose “Reuse Application” template, you won’t see such feature screen during creation of Xcode project. If application is already published to Discovery service , related code will be added in Xcode project and at runtime, you will see option of on-boarding with E-Mail domain.
- Once you are done with “Finish”, in Mobile service cockpit, you will notice that Application configuration has been published to Discovery Service automatically.
In the Xcode Project (below screenshot, left side), you will notice that, there is no longer ConfigurationProvider.plist
Since i selected Discovery service option, configuration data is published to Cloud Platform. When i will launch app , i would ask to enter email (pre-filled) in the on-boarding screen and the data is pulled online from Cloud Platform.
(If you do not use Discovery service, the Assistant will generate the ConfigurationProvider.plist file , this contains bootstrapping data for the application)
Now , running the application on simulator
I will have username+email domain already pre-filled on the screen.
Once you click on “Start” , configuration data will get downloaded from Discovery Service, followed by on-boarding flow.
1. To retrieve the configured data, you can perform an HTTPS GET request to the following URL
Here: com.sap.TestApp > AppID in Mobile service cockpit
email@example.com > username+email-domain
2. Application running on the device must be integreated using the Mobile service for Development and Operations – Discovery Service in order for end-to-end process to function.
3. Above flow was for using default application configuration. You can also configure parameters either by selecting
- Custom Properties : to add key value pairs to the application configuration
- Custom JSON : to customize the generated JSON code.
4. If you want to use your own domains, you will need to register them first. The domain registration process requires verification of domain ownership by your organization.
Check below resources for more information:
What’s new in SAP Cloud Platform SDK for iOS 3.0 SP01
Latest changes in SAP Cloud Platform SDK for iOS Assistant and its generated apps
SAP Translation Integration – SAP Cloud Platform SDK for iOS
SAP API Business Hub Integration – SAP Cloud Platform SDK for iOS
From API to App: Assistant tool generates mobile app scaffolding from a Backend API
SAP Discovery service Integration – SAP Cloud Platform SDK for iOS
Product Management, SAP Cloud Platform User Experience
Thanks for posting on this Jitendra. Can you please give few more examples as to when customers could use the discovery service (in the absence of MDM). In the above example you mentioned that "Once you click on “Start” , configuration data will get downloaded from Discovery Service". What can we do with this configuration data?
Murali - the purpose of the discovery service is to allow app configuration information to be stored outside of the app binary and downloaded to the app on-demand. The information I would expect to be downloaded is the configuration instructions required to connect the app to the appropriate mobile services landscape. You could hard code this into the app itself, but this affects things like app portability between landscapes. If you had an email domain that was test.mycompany.com, uat.mycompany.com, mycompany.com you could have a single binary that could be configured dynamically to communicate to multiple mobile services instances without any hardcoding . This could also be handled by an MDM, but if there is no MDM in play you need another way to do it - which is the problem that the Discovery Service was meant to solve.
Thanks Britt. Well explained.
Thanks for posting about Discovery servery. Very informative and useful. I would like to know once the app is developed, tested and ready to deploy to MDM, then how can we publish the app to app store from this point on? I need to know more about App publishing process (Afaria), once the app is tested and ready to deploy then how to push this to the app store so the user can download the app. Can you please share any guide or end-to-end solution. Thanks.
Could you clarify your question? Deploying an enterprise app through Afaria is done through app policies. Enterprise iOS App Policies are described in the Afaria documentation here - https://help.sap.com/viewer/DRAFT/b5134fe3182e44c58825e759c75f8dec/7.0.29/en-US/9cf3a8eb6e6c10148ebe1a87b0e91070.html. If you are looking to deploy an app through the Apple App Store you will need to reference Apple documentation, through a different EMM you will refer to the documentation of the respective vendor.
Updated with changes in 3.0 release!