Hi,
I've tried to enable discovery service for one of our apps, but doesn't get it to work 😞 I've read most of the documentation for SCPms, but most seems somewhat outdated
(e.g this guide instructs to "publish to discovery service, but this is not an option in ms)
What I've done:
1. Added BTPms TXT file to our DNS to verify the domain.
2. Added the domain to BTP and added domain to app


3. Set .discoveryService as configurationOptions
private func configuredWelcomeScreenStep() -> WelcomeScreenStep {
let appParameters = FileConfigurationProvider("AppParameters").provideConfiguration().configuration
let destinations = appParameters["Destinations"] as! NSDictionary
let discoveryConfigurationTransformer = DiscoveryServiceConfigurationTransformer(applicationID: appParameters["Application Identifier"] as? String, authenticationPath: destinations["Count"] as? String)
let welcomeScreenStep = WelcomeScreenStep(transformer: discoveryConfigurationTransformer, provider[JSONConfigurationProvider()])<br>
welcomeScreenStep.welcomeScreenCustomizationHandler = { welcomeStepUI in
welcomeStepUI.headlineLabel.text = LocalizedStrings.Onboarding.headlineLabel
welcomeStepUI.detailLabel.text = LocalizedStrings.Onboarding.detailLabel
welcomeStepUI.primaryActionButton.titleLabel?.text = LocalizedStrings.Onboarding.primaryActionButton
if let welcomeScreen = welcomeStepUI as? FUIWelcomeScreen {
welcomeScreen.configurationOptions = .discoveryService
}
}
return welcomeScreenStep
}<br>
Issue
When adding e-mail used to log in with Oauth2 nothing happens from the UI, and the debugger only reports
2022-01-25 12:01:30.213413+0100 Count[51958:1673694] [general] # SAP.Flows.Onboarding.Steps.WelcomeScreenOnboarding - DEBUG - (Main) - WelcomeScreenStep.swift.welcomeController(_:shouldTryUserEmail:) - 354 - Called: welcomeController shouldTryUserEmail<br>
Any clues?
On a side note; The email with a link - is this something BTP can provide?

Request clarification before answering.
Hi Per,
please use DiscoveryServiceConfigurationProvider instead of JSONConfigurationProvider
The initializer expects:
Example
let discoveryServiceConfigProvider = DiscoveryServiceConfigurationProvider(applicationID: "piat.hapi.oauth.sample", discoveryServiceHost: "service-discovery-hub-development.cfapps.eu10.hana.ondemand.com")
let welcomeScreenStep = WelcomeScreenStep(transformer: discoveryConfigurationTransformer, providers: [discoveryServiceConfigProvider])In a sample app of mine, once I press "Start" button, then the necessary information from the Discovery Service are fetched.


Thank you for your feedback about the documentation. The team will check on how to improve.
Please cross-check with the following documentation for administration activities for Discovery Service in Mobile Services (if not already done) : https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/features/discov...
Best regards,
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perfect! Thank you marco.eidinger ! Just a few lines of code and some screenshots away from publishing on the app store now :=)
Edit: I see that if I add both DiscoveryServiceConfigurationProvider and JSONConfigurationProvider, I get the option to enter email OR scan a QR code, hoewever, if I scan a QR that works, I still get an error saying "Enter a valid e-mail". Is it not possible to combine these options? We aim for one single app for multiple customers, and not everyone might be able to enable discovery..
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.