Getting Started with Kapsel – SAP Fiori Client (SP09+)
SAP Fiori Client (SP09+)
If you are using SP 13 or newer please see https://blogs.sap.com/2016/11/10/sap-fiori-client-sp13/.
SAP Fiori is a set of applications that cover some of the most frequently used SAP software functions. These apps were written using SAPUI5 and hence can be accessed in a browser on a variety of devices. There is a demo of a few SAP Fiori apps available at SAP Fiori, Demo Cloud Edition.
When a SAP Fiori app is run in the SAP Fiori Client, it provides a set of enhancements to the app including the ability to customize or brand the app title, app icon, splash screen, first use tips, access native device functionality such as a barcode scanner, improved management of the app resources using the Cache Manager plugin, security enhancements such as the ability to set a whitelist of URLs the application can communicate with, handling of authentication challenges within a WebView via the AuthProxy plugin, improved attachment handling on Android and iOS and additional benefits when integrated with the SMP 3.0 server.
See also the following posts.
SAP Fiori & SMP
Introducing SAP Fiori Client 1.2
SAP Fiori – Mobile
Fiori Guidelines
SAP Fiori Launchpad
SAP Fiori Reference Apps
Mobile Single Sign-On for SAP Fiori with SAP Authenticator
SAP Fiori apps reference library
Note the SAP Fiori Client should be used with Launchpad based apps as opposed to Launch Page apps.
See also Migration of SAP Fiori Apps From SAP Fiori 1.0.
A prebuilt version of the SAP Fiori Client is available from the iTunes, Android, and Windows stores at iOS SAP Fiori Client mobile app, Android SAP Fiori Client mobile app, and Windows 10 SAP Fiori Client.
The SAP Fiori Client for Android or iOS can also be created using Cordova and Kapsel plugins by running the following script.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\create_fiori_client.js
Building the SAP Fiori Client yourself allows for the app to be customized. New plugins can be added or ones that are not being used can be removed.
Note, in SP12 it is not currently possible to create a custom Fiori Client for Windows using the script.
For additional details see the script that creates the SAP Fiori Client at
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\create_fiori_client.js,
the JavaScript file used by the Fiori Client plugin in a project that includes this plugin at
project_name\plugins\kapsel-plugin-fioriclient\www\fioriclient.js
and the documentation at Mobilizing SAP Fiori.
The following steps will demonstrate how to create the SAP Fiori Client using SMP 3.0 SP10 SDK.
Building the SAP Fiori Client
Running the SAP Fiori Client
Additional Settings and Configuration
Changing the App Name, Icon, and Splash Screen
Changing the Background Image
Customizing Screens
Modifying the Version
Hiding Last Screen from AppSwitcher and Enabling or Disabling Screen Capture
Using an X.509 Certificate
Using a Mobile Device Management Solution to Configure Initial Settings
Modifying the Status Bar
Removing the Set Passcode Screen
Security
Opening the Fiori Client from an External Link
TroubleShooting
Proxying the Fiori Client through an SMP 3.0 Server
Building the SAP Fiori Client
- Edit the file
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\config.json or /Users/i82xxxx/SAP/MobileSDK3/KapselSDK/apps/fiori_client/config.json
Provide values such as those shown below. Note, if you if you are running the script on Windows remove “ios” from the platforms or if you are running on a Mac and only wish to build one platform remove either “ios” or “android”.
{ "packageName": "com.sap.fiori", "targetFolder": "FioriClient", "appName": "FioriClient", "platforms": ["ios", "android"] }
- In a command window run the following.
cd C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client or on a Mac cd ~/SAP/MobileSDK3/KapselSDK/apps/fiori_client npm install node create_fiori_client.js cd FioriClient
- Note it is also possible to debug the create_fiori_client.js script file. For additional details see Debug NodeJS Like A Pro. Note this is an optional step.
npm install -g node-inspector node --debug-brk create_fiori_client.js node-inspector --web-port=9999
- Note that the create_fiori_client.js script has conveniently created a Cordova project containing Kapsel and Cordova plugins.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient>cordova plugins cordova-plugin-camera 2.1.1 "Camera" cordova-plugin-contacts 2.0.1 "Contacts" cordova-plugin-crosswalk-webview 1.6.1 "Crosswalk WebView Engine" cordova-plugin-customurlscheme 4.1.5 "Custom URL scheme" cordova-plugin-device 1.1.2 "Device" cordova-plugin-dialogs 1.2.1 "Notification" cordova-plugin-file 4.1.1 "File" cordova-plugin-geolocation 2.1.0 "Geolocation" cordova-plugin-network-information 1.2.0 "Network Information" cordova-plugin-privacyscreen 0.1.2 "PrivacyScreenPlugin" cordova-plugin-screen-orientation 1.4.0 "Screen Orientation" cordova-plugin-splashscreen 3.2.1 "Splashscreen" cordova-plugin-statusbar 2.1.2 "StatusBar" cordova-plugin-whitelist 1.2.1 "Whitelist" de.appplant.cordova.plugin.printer 0.7.0 "Printer" kapsel-plugin-apppreferences 3.12.2 "AppPreference" kapsel-plugin-attachmentviewer 3.12.2 "AttachmentViewer" kapsel-plugin-authproxy 3.12.2 "AuthProxy" kapsel-plugin-barcodescanner 3.12.2 "BarcodeScanner" kapsel-plugin-cachemanager 3.12.2 "CacheManager" kapsel-plugin-calendar 4.4.4 "Calendar" kapsel-plugin-cdsprovider 3.12.2 "CDSProvider" kapsel-plugin-corelibs 3.12.2 "CoreLibs" kapsel-plugin-encryptedstorage 3.12.2 "EncryptedStorage" kapsel-plugin-federationprovider 3.12.2 "FederationProvider" kapsel-plugin-fioriclient 3.12.2 "FioriClient" kapsel-plugin-i18n 3.12.2 "i18n" kapsel-plugin-inappbrowser 1.3.1 "InAppBrowser" kapsel-plugin-inappbrowser-xwalk 3.12.2 "InAppBrowser" kapsel-plugin-logger 3.12.2 "Logger" kapsel-plugin-logon 3.12.2 "Logon" kapsel-plugin-multidex 3.12.2 "Multidex" kapsel-plugin-online 3.12.2 "Online" kapsel-plugin-push 3.12.2 "Push" kapsel-plugin-settings 3.12.2 "Settings" kapsel-plugin-toolbar 3.12.2 "Toolbar" kapsel-plugin-usage 3.12.2 "Usage" kapsel-plugin-voicerecording 3.12.2 "Voice Recording"
- Edit the following file
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\www\appConfig.js
and provide values such as those shown below.
Note the fioriURL should be changed to reflect the webserver that host your SAP Fiori applications uses or to the trial SAP Fiori Launchpad.
Note the website http://jsonlint.com/can be used to validate JSON such the contents of the appConfig variable below.fiori_client_appConfig = { "appID": "com.sap.fiori", //"fioriURL" : "https://www.sapfioritrial.com/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html?helpset=trial&sap-client=001", "fioriURLIsSMP": false, "certificate": "", "autoSelectSingleCert": false, "passcodePolicy": { "expirationDays":"0", "hasDigits":"false", "hasLowerCaseLetters":"false", "hasSpecialLetters":"false", "hasUpperCaseLetters":"false", "defaultAllowed":"true", "lockTimeout":"10", "minLength":"6", "minUniqueChars":"0", "retryLimit":"0" } };
The fioriURLIsSMP setting indicates if the SMP 3.0 server should be used as a proxy to access the SAP Fiori app enabling additional logging, authentication mechanisms, push notifications etc. An example of this being set to true is shown later in this document.
The passcode policy can be set in the SMP 3.0 management cockpit when fioriURLIsSMP is true or in the appConfig.js as shown above when fioriURLIsSMP is false. Since the passcode policy setting defaultAllowed is set to true, this enables the ability to disable the Passcode screen. - Copy the files to the platform directory by running
cordova prepare
Use Android Studio, ADT command line or Xcode to deploy and run the project.
Note, if the build fails when building Android with a message of
The input line is too long
try installing a newer buildToolsVersion such as 21.1.1. See also Gradle Build Failed.
Running the SAP Fiori Client
Some of the functionality of the app is illustrated below.
If the fioriURL variable is not specified in the appConfig.js or if the app is the one downloaded from the public app stores, the first screen shown requests the user to choose between Log In or Demo Mode (New in SP08). Demo mode uses the trial URL automatically and disables the passcode screen.
If using SAP Mobile Secure, an email can be provided instead of a URL that the Fiori Client will then use the email domain to get the details on how to connect to the Fiori app. Entering an email is typically less error prone than entering a long a URL.
The passcode policy can be configured either in the appConfig.js or in the SMP management cockpit.
The Enter Passcode screen is shown when the app is subsequently opened or resumed from the background assuming Disable Passcode was not selected.
The first use tip is shown the first time the app is opened. To customize this see the method showFirstUseTips and also logonCompletedCallback in the following file.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\plugins\kapsel-plugin-fioriclient\www\fioriclient.js
If the URL being accessed is not available or uses HTTPS and the certificate authority that signed the web server’s certificate is not trusted by the device, an error page will be shown.
For additional details see Installing a Certificate or the HTTPS in the Security Appendix. A quick test to see if the site can be opened is to open the URL on the device’s browser.
By double tapping, a native menu is shown. The menu items are added in the initClient method in the following file.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\plugins\kapsel-plugin-fioriclient\www\fioriclient.js
New in SP06 is the ability to view the device log and email it.
The settings are implemented in fioriclient.js (and validation.html for Android).
Additional Settings and Configuration
Changing the App Name, Icon and Splash Screen
The app name and icon can be customized before create_fiori_client.js is run by modifying the appName in
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\config.json
and icon.PNG files under
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\template\res
As of SP11, the App Name in the Logon screen can be specified via the appName setting in the following file.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\www\appConfig.js
If it is not specified it defaults to SAP Fiori Client.
Note that in SP09 and SP10, a default icon for the iPhone 6, 6 Plus, 6s an 6s Plus was not provided. This can be corrected by providing a custom icon with a resolution of 180 X 180 in the following location.
/SAP/MobileSDK3/KapselSDK/apps/fiori_client/assets/ios/icons/icon-60@3x.png
Note the Fiori Client on Android does not come with a Fiori splash screen in SP09, SP10 and SP11 so the default Cordova splash screen appears. This can be hidden by making the following change
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\ config.xml <preference name="SplashScreenDelay" value="0" />
Changing the Background Image
The flowers background image of the SAP Fiori Client comes from the following file.
C:\SAP\MobileSDK3\KapselSDK\plugins\logon\www\common\assets\ui\img\background.jpg
That file can be replaced with an alternate image. See also
app.setBackgroundImage('img/background.jpg'); // display the fiori backrgound only if legacy mode is not enabled.
in the below file.
C:\SAP\MobileSDK3\KapselSDK\plugins\logon\www\common\assets\ui\LogonForm.js
Customizing Screens
The various screens shown when starting the SAP Fiori Client are shown below. Their contents can be customized.
C:\SAP\MobileSDK3\KapselSDK\plugins\logon\www\common\assets\ui\resources>dir *.view.js Volume in drive C is OSDisk Volume Serial Number is 42DC-7B76 Directory of C:\SAP\MobileSDK3\KapselSDK\plugins\logon\www\common\assets\ui\resources 05/15/2015 12:15 AM 19,137 changePasscode.view.js 05/15/2015 12:15 AM 6,453 chooseDemoMode.view.js 05/15/2015 12:15 AM 7,022 enterAfariaUsernamePassword.view.js 05/15/2015 12:15 AM 10,338 enterFioriConfiguration.view.js 05/15/2015 12:15 AM 8,658 enterPasscode.view.js 05/15/2015 12:15 AM 8,905 enterSSOPasscode.view.js 05/15/2015 12:15 AM 7,144 enterUsernamePassword.view.js 05/15/2015 12:15 AM 17,531 setPasscode.view.js
Modifying the Version
The version is specified in the following file on Android
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\plugins\kapsel-plugin-fioriclient\www\messages_en.properties
On iOS, the version is specified in the following file.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\config.xml <widget id="com.sap.fiori" version="3.0.10.1"
In Xcode the build field should match the value in the config.xml file after running cordova prepare ios.
Note there is also a version displayed on the iOS settings screen. This version can be changed by editing the Resources > Settings.bundle > Root.plist file.
Hiding Last Screen from AppSwitcher and Enabling or Disabling Screen Capture
As of SP11, the Fiori Client includes the Privacy Screen plugin which on Android prevents the screen from being captured and on iOS and Android, prevents the last displayed screen from appearing in the app switcher. For additional details see Preventing App Switcher From Showing the Last Screen and Preventing Screen Sharing.
Using an X.509 Certificate
When an X.509 certificate is installed on an iOS device, it is only accessible to select applications such as Mobile Safari or Mail. See Making Certificates and Keys Available To Your App.
In SP08 of the SDK it is possible to use SAP Afaria to provision the SAP Fiori Client with an X.509 client certificate. To do this include the certificate=com.sap.afaria on the URL as shown below.
https://mo-39d7636c8.mo.sap.corp:44301/sap/bc/ui5_ui5/sap/zbarc_ui5_app?appid=test&fioriurlissmp=false&certificate=com.sap.afaria
In prior versions registration with an SMP server was required.
For iOS, the new SAP Afaria certificate provider can be used when SMP is not present or if it is being used to proxy the connection to the Fiori App.
For Android, the new SAP Afaria certificate provider can only be used when SMP is not present.
If you wish to use a third party mobile device management solution to provide the X.509 client certificate, a custom SAP Fiori Client could be built that included a custom certificate provider. The fioriURL would then include the parameter &certificate=com.mycompany.certprovider.CustomCertificateProvider.
One other option on iOS would be to create a second application that is able to acquire a X.509 certificate and then to share that with a custom SAP Fiori Client through key chain sharing. See also Configuring Keychain Sharing.
Using a Mobile Device Management Solution to Configure Initial Settings
A mobile device management solution such as SAP Afaria can be used to configure initial settings similar to those that can be set in appConfig.js file on iOS.
Note if using SAP Mobile Secure or SAP Afaria place this info in the managed App Configuration section.
If the MDM supports JSON format, create a JSON object as follows:
config={ "appID":"com.sap.fiori.client.release", "fioriURL":"https://<your-host>/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=100&sap-language=EN", "fioriURLIsSMP":false, "certificate" : "com.sap.afaria", "passcodePolicy":{} }
Note the appID must match the bundle ID. If the MDM does not support JSON, convert the above JSON to base64-encoded.
Convert this:
{ "appID":"com.sap.fiori.client.release", "fioriURL":"https://<your-host>/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=100&sap-language=EN", "fioriURLIsSMP":false, "certificate" : "com.sap.afaria", "passcodePolicy":{} }
To something like that below:
eyANCiJhcHBJRCI6ImZpb3JpIiwNCiJmaW9yaVVSTCI6Imh0dHBzOi8vb GRjaXUzZS53ZGYuc2FwLmNvcnA6NDQzMjYvc2FwL2JjL3VpNV91aTUvd WkyL3VzaGVsbC9zaGVsbHMvYWJhcC9GaW9yaUxhdW5jaHBhZC5odG1 sP3NhcC1jbGllbnQ9MTAwJnNhcC1sYW5ndWFnZT1FTiIsDQoiZmlvcmlV UkxJc1NNUCI6ZmFsc2UsDQoicGFzc2NvZGVQb2xpY3kiOnt9DQp9DQo=
Add a second parameter named version so it looks like this:
version=1 config=eyANCiJhcHBJRCI6ImZpb3JpIiwNCiJmaW9yaVVSTCI6Imh0dHBzOi8vb GRjaXUzZS53ZGYuc2FwLmNvcnA6NDQzMjYvc2FwL2JjL3VpNV91aTUvd WkyL3VzaGVsbC9zaGVsbHMvYWJhcC9GaW9yaUxhdW5jaHBhZC5odG1 sP3NhcC1jbGllbnQ9MTAwJnNhcC1sYW5ndWFnZT1FTiIsDQoiZmlvcmlV UkxJc1NNUCI6ZmFsc2UsDQoicGFzc2NvZGVQb2xpY3kiOnt9DQp9DQo=
See also the following SAP notes demonstrating this process with SAP Afaria.
How to provision SAP Fiori client via Managed App Configuration using a JSON config. -Afaria/Mobile Secure.
Flow When Digitial Signing is Enabled.
Modifying the Status Bar
Note that on iOS, there are a few settings that can control how the status bar is displayed. The Fiori Client uses the StatusBar Pluginwith the following settings set in index.js (SP10 and prior) or the config.xml in SP11+.
if (cordova.require("cordova/platform").id === "ios") { StatusBar.backgroundColorByName("white"); StatusBar.styleDefault(); StatusBar.overlaysWebView(false); }
Here is an example of changing the style and background color of the status bar.
if (cordova.require("cordova/platform").id === "ios") { StatusBar.backgroundColorByHexString("#009ce6"); StatusBar.styleLightContent(); StatusBar.overlaysWebView(false); }
Note that statusbar can be removed by adding the following code to the file Resources/FioriClient-Info.plist.
<key>UIStatusBarHidden</key><true/> <key>UIViewControllerBasedStatusBarAppearance</key><false/>
Removing the Set Passcode Screen
It is possible to not show the screen Set Passcode for SAP Fiori Client by making the below modification. Edit
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\plugins\kapsel-plugin-logon\www\common\modules\LogonController.js
Search for the first instance of r21. Replace
action: 'SCR_SET_PASSCODE_OPT_ON'
with
action: function() { onCreatePasscodeSubmit({}); }
Search for the second instance of r21. Replace
action: 'SCR_SET_PASSCODE_OPT_ON'
with
action: function() { onCreateSecureStoreSubmit({}); }
Note, the file LogonController.js will appear in the project in multiple places.
Security
For additional security topics see the following documents.
Technical setup of an SAP Fiori Landscape – Part 3: Mobilizing Fiori
Configuration and Deployment Information and
Configuring Security in SAP Mobile Platform.
In SP10, a new feature was added to the SAP Fiori Client named No Bridge. This feature prevents access to the native plugins added to the SAP Fiori Client unless the WebView URL has the same host as the fioriURL specified in the settings.
As the SAP Fiori Client from the app store can be used with a user provided Fiori URL the protections provided by the navigation whitelist in the Whitelist pluginare disabled. Specifically the SAP Fiori Client from the app store has the following setting in its config.xml file.
<allow-navigation href="*" />
Prior to the No Bridge security enhancement, with the combination of the Kapsel online plugin and the wildcard in the allow-navigation setting, it was possible for any page to be loaded by the WebView and that page would have access to the API’s provided by the plugins included in the SAP Fiori Client.
If you know in advance the URLs that a custom SAP Fiori Client will access, it may make sense to specify them using the whitelist plugin. It is not possible to change the settings in the config.xml for the app store versions of the SAP Fiori Client.
The following steps will demonstrate this feature. Note, it requires an SP10 or greater custom SAP Fiori Client or an SAP Fiori Client 1.5 or greater from the app store.
- Copy the following two HTML pages to a location so they are available over HTTP such as the following location.
C:\SAP\MobilePlatform3\Server\webapps\sapui5
Modify them to use your machines fully qualified domain name and the IP address.
- Configure the fioriURL of the SAP Fiori Client to use index1.html referencing a fully qualified domain name such as the following URL.
http://YKFN00620418A.amer.global.corp.sap:8080/sapui5/index1.html
- To avoid the AuthProxy plugin on Android from changing the URL from HTTP to HTTPS, change the value of SAPKapselHandleHttpRequests from true to false in the following file.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\config.xml
- Run the SAP Fiori Client.
- Notice that the navigations to all three versions of index2 work but the third navigation which uses an IP address rather than the machine name loads but that it is not possible to successfully call methods of the added plugins such as sap.Online.showBusyIndicator() as the machine name is different. The following message appears in the Android logcat when attempting to access this API.
E/SMP_SETTINGS(14313): plugin Online is disabled by foriURL security policy
The following appears in the Xcode All Output view when attempting to access this API.
ERROR: Plugin 'Online' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. 2015-11-04 12:05:33.398 FioriClient[576:104290] -[CDVCommandQueue executePending] [Line 159] FAILED pluginJSON = ["INVALID","Online","showBusyIndicator",[]]
- Note the following plugins are excluded from the No Bridge feature, Logger, Toolbar, Whitelist and Device.
- As of SP 12 it is possible to specify additional URL’s that should not be affected by the no bridge feature. This can be specified via a parameter in the appconfig.js file named noBridgewhitelist as shown below.
"fioriURL":"http://YKFN00620418A.amer.global.corp.sap:8080/sapui5/index1.html", "noBridgewhitelist":"10.7.168.124:8080",
Alternatively it can be specified as a URL parameter in the Fiori Client UI when the user provides the Fiori URL. For example on the Enter Fiori URL page, the following URL could be provided.
http://YKFN00620418A.amer.global.corp.sap:8080/sapui5/index1.html?noBridgewhitelist=*
The following are a few examples of possible values.
noBridgewhitelist=* noBridgewhitelist=wdf.sap.corp noBridgewhitelist=*.wdf.sap.copr noBridgewhitelist=*.yahoo.com,*.google.com
- This feature prevents the use of URL shortener services such as bitly.
- This feature can be disabled on Android by commenting out the following line in the file C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\create_fiori_client.js and rerunning the create_fiori_client.js script.
shelljs.exec('node platforms/android/prepare_restriction.js');
Opening the Fiori Client from an External Link
It is possible to provide a link to the Fiori Client or to a specific Fiori App within the Fiori Client on a webpage or an email. Here are a couple of examples. When the link is clicked on in an browser, the SAP Fiori Client will open.
<a href="com.sap.fiori.xcallbackurl://x-callback-url/openFioriUrl">Deep Link to Fiori Client</a> <a href="com.sap.fiori.xcallbackurl://x-callback-url/openFioriUrl?url=https://www.sapfioritrial.com/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html?helpset=trial&sap-client=001#ContactPerson-MyContact">My Contacts</a>
Note, the com.sap.fiori comes from the packageName specified in the file C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\config.json.
The second link contains the url to be opened in the Fiori Client. In this case it contains #ContactPerson-MyContacts which will open the CRM app My Contacts.
See also Creating a Mobile Deep Link to an Application in SAP Fiori Client.
TroubleShooting
Some of the Fiori Client screens such as the Log In / Demo Mode, Enter Fiori URL, Set/Enter Passcode, ToolTip and error screens are opened using an InAppBrowser window. Prior to SP11, by default the Web Inspector on Android cannot debug these screens. To enable debugging of these screens, edit the following file and include the bolded code below around line 764.
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java inAppWebView.setWebViewClient(client); inAppWebView.setWebContentsDebuggingEnabled(true); WebSettings settings = inAppWebView.getSettings();
If a problem is preventing the Fiori Client from successfully registering, the settings screen may not appear preventing the user from changing the log level. One way to do this is to first use demo mode to show the trial SAP Fiori app, then set the log level to debug from settings screen by double tapping. Then reset the app from setting screen and input the Fiori URL that is not working with the Fiori Client. The debug log level will persist across the application reset, so it will stay in debug log level.
If you cannot debug the app in Xcode, you can still view the device console output through Xcode’s Device menu. It will show the console output from all applications running on the device without debugging the application from Xcode.
The Fiori Client does not support URL shortener services or bitly URLs.
An SMP registration using a cert from the Android system keychain will not work with the Fiori Client since AuthProxy interception is required for that, and AuthProxy interception only starts after Logon success
The section Troubleshooting SAPUI5 Apps contains some tips such as how to perform an end2end trace.
Proxying the Fiori Client through an SMP 3.0 Server
The following steps demonstrate how to proxy a SAP Fiori application through a SMP 3.0 server. See also Integration of SAP Mobile Platform into SAP Fiori Landscape.
Note that the Relay Server cannot be used in in this scenario. The Fiori Client does not work with a relay server when proxied through the SMP server as FC requires URL rewriting to be done by the backend. The backend is not capable of constructing URLs using the relay server artifacts like farm id etc.
- Create a Kapsel application with the following ID.
com.sap.fiori
Select Disable for Same-Origin Policy.
Set the endpoint to be a partial URL of your company’s Fiori launchpad URL.
An example of a full URL to the app and then the partial URL follows.https://host:port/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=100 and https://host:port/
Set the Use System Proxy connection if your network uses a proxy and the URL being accessed is not within your internal network.
Note the proxy host and port for the SMP 3.0 server are set under Settings > System > HTTP proxy host.Add an SSO mechanism such as Basic for a URL that requires credentials.
Rewrite mode should be Rewrite URL in Backend System.Select an HTTPS Authentication provider and provide a URL that requires authentication. The URL
https://host:port/sap/bc/ping?sap-client=100
will be used during the registration step to verify that the provided user name and password and if an SSO mechanism is used, the app will not need to display the app’s login screen. See also Single Sign-On Integration Across Client Applications.
Save the application and attempt to ping the endpoint.
A partial SAP Fiori URL such ashttps://host:port/
should return a 404 not found error, the same as you would see if the URL was entered into a browser.
- Notice that the endpoint uses HTTPS, the certificate that the endpoint server uses was signed by SAPNetCA_G2. This certificate and its the cert that signed it (SAP Global Root CA) need to be installed in the SMP 3.0 server’s keystore.
For additional details on how to export a certificate and install it into the SMP server’s keystore see Accessing the SAP OData Gateway Demo section.
The following are a couple of commonly seen error messages.
Backend system cannot be reached:::Root cause:::Exception during connection execute: peer not authenticated
This error may be seen if the SMP server does not trust the certificate used by the endpoint.
Backend system cannot be reached:::Root cause:::Exception during connection execute: host:port
This indicates that the SMP server cannot reach the URL. Check if the URL is reachable in a browser. If it is, it may be that your network requires a proxy server to access external URLs. Check the Use System Proxy setting and ensure the proxy settings under Settings > System > HTTP proxy host are correct in the SMP server management cockpit.
- In the file
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\www\appConfig.js
set the variable fioriURLIsSMP to true to indicate that the connection to the app will be proxied through the SMP 3.0 server.
Set the fioriURL to a URL as shown below.
https://YKFN00620418A.amer.global.corp.sap:443/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html
The methods parseAppConfig and handleFioriUrlWithFakeParameter will extract the host and port to connect to as well as other settings. Note there are additional settings that can be specified in the appConfig.js file. If the values are not specified in the appConfig.js file (for example the version of the Fiori Client available on the Apple App Store and Android Play Store does not have an appConfig.js file), then they can be specified in the user provided fioriURL. If the fioriURL is not specified in the appConfig.js file then the Enter Fiori URL screen will appear and the parameters normally specified in the appConfig can be specified in the FioriURL. Here are a few examples. Note these could be specified in the appConfig.js file or if the fioriURL is empty they could be specified by the end user when they enter a FioriURL.
//Direct to the Fiori Server via user supplied URL https://www.sapfioritrial.com/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html //Direct to the Fiori Server via appConfig.js "appID": "com.sap.fiori", "fioriURL": "https://www.sapfioritrial.com/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html", "fioriURLIsSMP": false,
//Proxying through an SMP server via user supplied URL https://YKFN00620418A.amer.global.corp.sap:443/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?appid=com.sap.fiori&fioriURLIsSMP=true //Proxying through an SMP server via appConfig.js "appID": "com.sap.fiori", "fioriURL": "https://YKFN00620418A.amer.global.corp.sap:443/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html", "fioriURLIsSMP": true,
//Mutual Authentication using Afaria/SAP Mobile Secure to provide the client certificate via user supplied URL https://YKFN00620418A.amer.global.corp.sap:443/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?appid=com.sap.fiori&fioriURLIsSMP=true&certificate=afaria //Note that in SP08 of the SDK there is a new certificate provider named certificate=com.sap.afaria that is to only be used when not registering with the SMP server. //Mutual Authentication using Afaria/SAP Mobile Secure to provide the client certificate via appConfig.js "appID": "com.sap.fiori", "fioriURL": "https://YKFN00620418A.amer.global.corp.sap:443/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html", "fioriURLIsSMP": true, "certificate": afaria,
//SAML Authentication via user supplied URL https://YKFN00620418A.amer.global.corp.sap:443/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?appid=com.sap.fiori&fioriURLIsSMP=true&authtype=saml2.web.post //SAML Authentication via appConfig.js "appID": "com.sap.fiori", "fioriURL": "https://YKFN00620418A.amer.global.corp.sap:443/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html", "fioriURLIsSMP": true, "auth": [ { "type": "saml2.web.post", "config": { "saml2.web.post.authchallengeheader.name": "com.sap.cloud.security.login", "saml2.web.post.finish.endpoint.uri": "/SAMLAuthLauncher", "saml2.web.post.finish.endpoint.redirectparam": "finishEndpointParam" } } ] //See also Enabling SAML Authentication
One tool that can be used to verify the JSON is jsonlint.com.
In order to use HTTPS the mobile device or simulator will need to trust the certificate used by the SMP server. For additional details see the HTTPSin the Security Appendix. Alternatively, use HTTP with port 8080 which is the default HTTP port for the SMP server. Note, if the Fiori Client does not trust the certificate used by the SMP server, an error such as the following will appear on the device’s log.
"LogonController.getRegistrationErrorText: {\"errorCode\":\"80003\",\"errorMessage\":\"java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.\",\"errorDomain\":\"MAFLogonCoreErrorDomain\"}"
The device log can be viewed on Android via Logcat or on iOS via Xcode or via the Fiori Client View Log menu item.
- Deploy and run the app.Since fioriURLIsSMP is set to true and the fioriURL is specified, the first screen that appears is the user name and password screen.
The passcode policy is retrieved from the SMP 3.0 server during a successful registration process and then the set app passcode screen is shown next.
The first use tips page is shown and then the app is loaded.
- When the appConfig.js file has fioriURLIsSMP set to true, the settings screen has two additional read only settings Proxy Through SMP and AppID.
Note, if you wish to change the Fiori URL to point to a different SMP server and have not specified a value for fioriURL, click the Clear All Application Settings button under Reset Settings. This will cause the Logon plugin’s registration screen to appear.
- When the SAP Fiori Client is used with the SMP 3.0 server, statistics can be viewed such as those shown below.
The log level can be set and a device log retrieved. Note the log will be available as shown here after the app has been restarted and the Log Upload checkbox has been checked.
In addition, the passcode policy can be set, notifications can be sent to the device, and additional security authentication mechanisms are available.
- The following are some known issues that have been documented as SAP Notes.Fiori Logoff does not work when proxying through SMP. http://service.sap.com/sap/support/notes/2122085
Use of proxy bypass on Fiori Client for Android results in Page Not Found. http://service.sap.com/sap/support/notes/2120995
Using SAML URL following “Clear All Application Settings” on Fiori Client for Android results in error. http://service.sap.com/sap/support/notes/2120994
SAPUI5 Cache Buster for Applications – Update via scheduled Report http://service.sap.com/sap/support/notes/1942086
Batch Req. of Cache Buster Info for many Apps, POST support http://service.sap.com/sap/support/notes/1878871
Allow other browsers to access the portal http://service.sap.com/sap/support/notes/1666862
SMP Hybrid SDK Offline Media Resources (Attachments) Fail to Open on Android when a Proxy is used http://service.sap.com/sap/support/notes/2168598
Printing issues on SAP Fiori Client 1.3 affecting Android http://service.sap.com/sap/support/notes/2168622
Configuring feature restriction policy in SMP 3.0 Server http://service.sap.com/sap/support/notes/2168720
Change required to manifest.xml on Android before submitting to Play store with SP08 PL01 http://service.sap.com/sap/support/notes/2174258
Updated for SP10 SDK.
Hi Dan,
We've built SSO enabled Fiori Client for one of customer using SMP3 SDK SP09 PL03. Application is working as expected with devices having less than or equal to iOS 8.4 but the same is not working on the devices having greater than or equal to iOS 9. Error screen is exactly same as the image mentioned in "Running the SAP Fiori Client" section with error being "Page Not Found".
I'm guessing there might some problem as the same application is working with devices less than or equal to iOS 8.4.
Here is the error log: (Replaced actual customer name with "customer" in the log)
2015-11-10 20:33:09.344 Fiori[38295:291054] Apache Cordova native platform version 3.8.0 is starting.
2015-11-10 20:33:09.350 Fiori[38295:291054] Multi-tasking -> Device: YES, App: YES
2015-11-10 20:33:09.388 Fiori[38295:291054] Unlimited access to network resources
2015-11-10 20:33:09.579 Fiori[38295:291054] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/i041145/Library/Developer/CoreSimulator/Devices/14B2BD74-7FAF-47C0-AB33-F3AFA43F731F/data/Containers/Data/Application/91FF05E0-BE06-4D2B-A6D9-609302BB314B/Library/Cookies/com.customer.gis.sap.fiori.binarycookies
2015-11-10 20:33:09.620 Fiori[38295:291054] Apache Cordova native platform version 3.8.0 is starting.
2015-11-10 20:33:09.620 Fiori[38295:291054] Multi-tasking -> Device: YES, App: YES
2015-11-10 20:33:09.621 Fiori[38295:291054] Unlimited access to network resources
2015-11-10 20:33:09.625 Fiori[38295:291054]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2015-11-10 20:33:09.703 Fiori[38295:291054] [CDVTimer][file] 8.792996ms
2015-11-10 20:33:09.766 Fiori[38295:291054] [CDVTimer][splashscreen] 62.137008ms
2015-11-10 20:33:09.773 Fiori[38295:291054] [CDVTimer][statusbar] 7.164001ms
2015-11-10 20:33:09.775 Fiori[38295:291054] [group: com.sap.smp.client.ios] [artifact: Supportability] [version: 3.9.3] [buildTime: 2015-07-31 20:05] [gitCommit: 9d4b05454c2aed047751d00085c86bad485fc5b3] [gitBranch: origin/fa/rel-3.9]
2015-11-10 20:33:09.775 Fiori[38295:291054] [group: com.sap.smp.client.ios] [artifact: ClientLog] [version: 3.9.3] [buildTime: 2015-07-31 20:05] [gitCommit: 9d4b05454c2aed047751d00085c86bad485fc5b3] [gitBranch: origin/fa/rel-3.9]
2015-11-10 20:33:09.782 Fiori[38295:291054] [group: com.sap.smp.client.ios] [artifact: E2ETrace2] [version: 3.9.3] [buildTime: 2015-07-31 20:05] [gitCommit: 9d4b05454c2aed047751d00085c86bad485fc5b3] [gitBranch: origin/fa/rel-3.9]
2015-11-10 20:33:09.784 Fiori[38295:291054] cordova-plugin-file 2.0.0
2015-11-10 20:33:09.784 Fiori[38295:291054] kapsel-plugin-barcodescanner 3.9.7
2015-11-10 20:33:09.784 Fiori[38295:291054] kapsel-plugin-e2etrace 3.9.7
2015-11-10 20:33:09.784 Fiori[38295:291054] cordova-plugin-device 1.0.1
2015-11-10 20:33:09.784 Fiori[38295:291054] cordova-plugin-whitelist 1.0.0
2015-11-10 20:33:09.784 Fiori[38295:291054] kapsel-plugin-toolbar 3.9.7
2015-11-10 20:33:09.784 Fiori[38295:291054] kapsel-plugin-logon 3.9.7
2015-11-10 20:33:09.784 Fiori[38295:291054] kapsel-plugin-logger 3.9.7
2015-11-10 20:33:09.784 Fiori[38295:291054] cordova-plugin-camera 1.1.0
2015-11-10 20:33:09.785 Fiori[38295:291054] cordova-plugin-geolocation 1.0.0
2015-11-10 20:33:09.785 Fiori[38295:291054] kapsel-plugin-fioriclient 3.9.7
2015-11-10 20:33:09.785 Fiori[38295:291054] cordova-plugin-splashscreen 2.0.0
2015-11-10 20:33:09.785 Fiori[38295:291054] de.appplant.cordova.plugin.printer 0.7.0
2015-11-10 20:33:09.785 Fiori[38295:291054] kapsel-plugin-voicerecording 3.9.7
2015-11-10 20:33:09.785 Fiori[38295:291054] cordova-plugin-media 1.0.0
2015-11-10 20:33:09.785 Fiori[38295:291054] nl.x-services.plugins.calendar 4.2.6
2015-11-10 20:33:09.785 Fiori[38295:291054] kapsel-plugin-authproxy 3.9.7
2015-11-10 20:33:09.786 Fiori[38295:291054] kapsel-plugin-cachemanager 3.9.7
2015-11-10 20:33:09.786 Fiori[38295:291054] kapsel-plugin-settings 3.9.7
2015-11-10 20:33:09.786 Fiori[38295:291054] kapsel-plugin-apppreferences 3.9.7
2015-11-10 20:33:09.786 Fiori[38295:291054] cordova-plugin-statusbar 1.0.0
2015-11-10 20:33:09.786 Fiori[38295:291054] kapsel-plugin-inappbrowser 0.6.0-patched
2015-11-10 20:33:09.786 Fiori[38295:291054] kapsel-plugin-encryptedstorage 3.9.7
2015-11-10 20:33:09.786 Fiori[38295:291054] kapsel-plugin-i18n 3.9.7
2015-11-10 20:33:09.786 Fiori[38295:291054] cordova-plugin-dialogs 1.1.1
2015-11-10 20:33:09.787 Fiori[38295:291054] kapsel-plugin-online 3.9.7
2015-11-10 20:33:09.787 Fiori[38295:291054] kapsel-plugin-xhook 3.9.7
2015-11-10 20:33:09.787 Fiori[38295:291054] kapsel-plugin-attachmentviewer 3.9.7
2015-11-10 20:33:09.787 Fiori[38295:291054] kapsel-plugin-corelibs 3.9.7
2015-11-10 20:33:09.787 Fiori[38295:291054] cordova-plugin-contacts 1.0.0
2015-11-10 20:33:09.787 Fiori[38295:291054] cordova-plugin-network-information 1.0.0
2015-11-10 20:33:09.787 Fiori[38295:291054] cordova-plugin-media-capture 1.0.0
2015-11-10 20:33:09.788 Fiori[38295:291054] [CDVTimer][online] 14.532983ms
2015-11-10 20:33:09.788 Fiori[38295:291054] [CDVTimer][toolbar] 0.363052ms
2015-11-10 20:33:09.789 Fiori[38295:291054] CommonAuthenticationConfigurator isNSHTTPURLProtocolReplacementEnabled: 0
2015-11-10 20:33:09.789 Fiori[38295:291054] [CDVTimer][authproxy] 0.993013ms
2015-11-10 20:33:09.790 Fiori[38295:291054] [group: com.sap.smp.client.ios] [artifact: Logger] [version: 3.9.3] [buildTime: 2015-07-31 20:05] [gitCommit: 9d4b05454c2aed047751d00085c86bad485fc5b3] [gitBranch: origin/fa/rel-3.9]
2015-11-10 20:33:09.791 Fiori[38295:291054] [CDVTimer][encryptedstorage] 1.203001ms
2015-11-10 20:33:09.791 Fiori[38295:291054] [CDVTimer][TotalPluginStartup] 96.789002ms
2015-11-10 20:33:09.826 Fiori[38295:291054] Resetting plugins due to page load.
2015-11-10 20:33:09.855 Fiori[38295:291054] Finished load of: file:///Users/i041145/Library/Developer/CoreSimulator/Devices/14B2BD74-7FAF-47C0-AB33-F3AFA43F731F/data/Containers/Bundle/Application/BA398B24-9BB3-4D94-AD39-EB3B389E7800/Fiori.app/www/index.html
2015-11-10 20:33:09.961 Fiori[38295:291054] setAutoSelectCertificateConfig: 1
2015-11-10 20:33:09.964 Fiori[38295:291054] [group: com.sap.smp.client.ios] [artifact: Datavault] [version: 3.9.3] [buildTime: 2015-07-31 19:53] [gitCommit: 57dd3c2f52b2e9ac61c301e42b6abe2d0b22c4e4] [gitBranch: origin/fa/rel-3.9]
2015-11-10 20:33:10.037 Fiori[38295:291054] THREAD WARNING: ['MAFLogonCoreCDVPluginJS'] took '74.136963' ms. Plugin should use a background thread.
2015-11-10 20:33:11.063 Fiori[38295:291054] Resetting plugins due to page load.
2015-11-10 20:33:11.141 Fiori[38295:291098] CFNetwork SSLHandshake failed (-9824)
2015-11-10 20:33:11.142 Fiori[38295:291098] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)
2015-11-10 20:33:11.143 Fiori[38295:291099] SMP_AUTH_PROXY ERROR connection:didFailWithError:, Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9824, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x7ffab3c92790 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://customer.com/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?smphomebuster=4503984604962170&sapclient=100, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamPropertySSLClientCertificateState=0, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://customer.com/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?smphomebuster=4503984604962170&sapclient=100, _kCFStreamErrorCodeKey=-9824}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://customer.com/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?smphomebuster=4503984604962170&sapclient=100, NSErrorFailingURLStringKey=https://customer.com/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?smphomebuster=4503984604962170&sapclient=100, _kCFStreamErrorDomainKey=3}
2015-11-10 20:33:11.144 Fiori[38295:291054] Failed to load webpage with error: An SSL error has occurred and a secure connection to the server cannot be made.
2015-11-10 20:33:11.147 Fiori[38295:291054] Resetting plugins due to page load.
2015-11-10 20:33:11.154 Fiori[38295:291110] Loading Cordova file: (null)
2015-11-10 20:33:11.282 Fiori[38295:291054] Finished load of: file:///Users/i041145/Library/Developer/CoreSimulator/Devices/14B2BD74-7FAF-47C0-AB33-F3AFA43F731F/data/Containers/Bundle/Application/BA398B24-9BB3-4D94-AD39-EB3B389E7800/Fiori.app/www/CannotReachHost.html?failingUrl=https%3A%2F%2Ffiori%2Ecustomer%2Ecom%2Fsap%2Fbc%2Fui5%5Fui5%2Fui2%2Fushell%2Fshells%2Fabap%2FFioriLaunchpad%2Ehtml%3Fsmphomebuster%3D4503984604962170%26sapclient%3D100&errorType=Err%5FType%5FUnableToReachHost&errorMessage=An%20SSL%20error%20has%20occurred%20and%20a%20secure%20connection%20to%20the%20server%20cannot%20be%20made%2E
2015-11-10 20:33:11.356 Fiori[38295:291054] setAutoSelectCertificateConfig: 1
2015-11-10 20:33:11.367 Fiori[38295:291054] THREAD WARNING: ['toolbar'] took '10.225830' ms. Plugin should use a background thread.
2015-11-10 20:33:11.419 Fiori[38295:291054] THREAD WARNING: ['MAFLogonCoreCDVPluginJS'] took '51.211182' ms. Plugin should use a background thread.
Regards,
Siva
I would take a look at the following link and search for App Transport Security.
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
It is also discussed in the Logon section of this guide.
That might explain the error. In the Logon section it mentions how to temporarily disable App Transport Security, so you could perhaps use that to verify.
Hope that helps,
Dan van Leeuwen
Thanks Dan. It looks to be the issue. I've tested it and it works.
Also thank you from my side for the valuable information. I had the same issue when building for iOS 9.
Please note the following additions to the problem:
Hope this helps
Cheers
Jens
Hello Siva ,
As i can understand from conversation , you have built SAP Fiori client + SSO for one your customer .
we have same requirement for building Fiori client with SSO .
if you can provide some steps detail with more information that would be good .
for this information i have also posted in link https://answers.sap.com/questions/340255/sso-confiuration-with-sap-fiori-client.html or SSO confiuration with SAP Fiori Client
Thanks & Regards,
Kunal Varaiya
In this section for removing passcode screen:
I have downloaded and used: EBF 25483: 3.0 SP10 PL06
The 2nd instance of r21 does not have an action: function() attribute:
{
id: "r21",
condition: {
state: {
secureStoreOpen: false,
defaultPasscodeUsed: false,
defaultPasscodeAllowed: true,
}
},
action: 'SCR_SET_PASSCODE_OPT_ON'
},
Searching instead for onCreatePasscodeSubmit() I did find this code and adjusted what seemed to be similar to your above suggestion, but it didn't have any impact.
'SCR_SET_PASSCODE_OPT_ON': {
/*
GQ - 11/24/2015: Removed to disable passcode per http://scn.sap.com/docs/DOC-65395#passcode
onsubmit: onCreatePasscodeSubmit,
*/
onsubmit: onCreateSecureStoreSubmit,
oncancel: noOp,
onerror: onFlowError,
ondisable: showScreen('SCR_SET_PASSCODE_OPT_OFF'),
onerrorack: noOp
},
In case it helps, here are the changes visually. Note the commented lines and highlighted code.
On Android, I noticed that there were multiple locations of this file. You may need to copy this change in multiple places if you have already created your Fiori Client project. Another way would be to remove and readd the android platform.
cordova platform remove android
cordova platform add android
Hope that helps,
Dan van Leeuwen
That worked, thanks!
Hi Daniel,
I upgraded to SP11 PL03.
The changes you mentioned here seems not to be working on Android after the upgrade.
The application does not show the screen but also does not go on the the initial screen of the url I am pointing to.
I have to force a stop and clear the application data on the device to get it to work.
Any ideas ?
Thanks
Andre
A problem was uncovered in the recent SP 11 patch(s). I believe it did not exist in SP 11 PL 0 and PL 01.
The behavior is that on Android, after the datavault locks, in some cases when restarting the application the vault was not unlocking. If you attach the web inspector, you may see a continuous stream of messages from the datavault. The behavior of the app is that you will see a blank screen.
I believe a fix for this is being tested and should be released very soon.
I would recommend either temporary downgrading to SP 11 PL01 of the Kapsel SDK (and verify that it corrects the problem) and then check back on service market place for the next PL for the SDK. I will also respond to this post if I see the patch available on Service Marketplace.
Regards,
Dan van Leeuwen
Exactly what I saw, Error 8 - Vault is locked. PL3 fixes problems we had with external web site rendering so I will rather wait for the fix to be released than downgrading to PL01.
Regards
Andre
I believe the PL containing the fix is now available.
EBF 26090: 3.0 SP11 PL04
A- Z Index | SAP Support Portal
Regards,
Dan van Leeuwen
Thanks, just downloaded and busy applying the modifications. Hopefully this fixes everything
Regards
Andre
Hello everybody,
i've just tried to build the Fiori Client App for iOS following the description in this blog.I am using the following setup:
As soon as i'm trying to build the cordova project using the "node create_fiori_client.js" command i'm receiving this error message:
Config file not found at /Users/.../SAP/MobileSDK3/KapselSDK/apps/fiori_client/config.json.
[SyntaxError: /Users/.../SAP/MobileSDK3/KapselSDK/apps/fiori_client/config.json: Unexpected token „]
When i'm specifying the config.json file using the "node create_fiori_client.js config.json" command this error message shows up:
Config file not found at config.json.
{ [Error: Cannot find module 'config.json'] code: 'MODULE_NOT_FOUND' }
The config.json file is located in the same folder as the create_fiori_client.js file and contains the following informations:
{
„packageName“: „com.sap.fiori“,
„targetFolder“: „FioriClient“,
„appName“: „FioriClient“,
„platforms“: [„ios“]
}
Why isn't it possible for me to simply build the Fiori Client App as described in this blog?
Regards
Lukas
Hi Lukas,
You have the quotes in funny places. Try to edit the file in notepad or Sublime and replace the „ with "
Thank you very much Gavin - i would have never thought that this could be the error... After replacing the quotation marks by copy&paste from your post it worked!
For other MacUsers out there: Watch out when modifying the config.json in the "TextEdit.app" - the quotation marks are changing automatically when editing the text...
Regards
Lukas
Hi everybody
Is it possible to remove the "Help" menu item from the Toolbar menu?
I couldn't find any related coding to this in fioriclient.js.
In fioriclient.js, it says, that other buttons are added from "default.js". How can I access this file?
Thanks and best regards
christian
I don't believe it is currently possible to remove the help menu item. A few of the toolbar items are added via native code such as the reload menu item. The reason for this is that if the page were to have a JavaScript error and not load fully, the reload button would be usable.
Can you comment further on why you would like to hide the help menu.
I was told that you can configure the URL it opens when pressed via a config.xml setting named helpUrl.
If changing the help location is not enough, let me know and I can open an enhancement request for this.
Regards,
Dan van Leeuwen
Thank you very much for your fast reply and help.
The customer wants to remove the "Help" menu item, since users are not allowed to access the native internet browser app due to security reasons.
Could you please ask for an enhancement request for this or should I open an OSS incident? I remember that in a prior version of SMP SDK, it was possible to modify this "Help" button.
Thanks a lot!
It might be best if you open the issue so you can properly convey the priority of the incident and receive notification on it as to its progress.
Regards,
Dan van Leeuwen
Hey there
How do you get an unsigned ipa file of the fiori client? I've opened the xcodeproject in xcode, but I don't know how to get an unsigned ipa file for our Worx Home by Citrix.
Error: conection SAP FioriClient(Android - VPN FortiClient) -> SMP 3.0-> GW(FioriLaunchpad.html)
#2.0#2016-03-08 21:18:02.319#+0:00#ERROR#RequestResponse#302##Proxy#1457471881951000#b2f91f57-b85e-43ab-9dfe-8b8c077e037c#FioriLaunchpad#com.sap.mobile.platform.server.proxy.core.handler.DirectProxy:prepareResponse#diego#######6675###Response code from backend is 302 for request null#
What is the error?
A 302 response indicates that a redirect. One way to better see the communications from the device is to use a tool such as Fiddler. There are some instructions on how to do this in the tips section of the guide.
Getting Started with Kapsel - Appendix F -- Tips (SP09+)
Regards,
Dan van Leeuwen
To remove the "error 302" Allow anonymous access check
In the android device with no load FioriLaunchpad.html, error in the image.

Hi,
by pressing button "log on" Error SMP app FioriClient
19:56:10.598#+0:00#ERROR#RequestResponse###Proxy#1457553336288000#b0996bc0-da6f-40b1-b90f-5d2642e938a5#FioriLaunchpad#com.sap.mobile.platform.server.proxy.core.handler.DirectProxy:handleException########22448###----------Caught the exception in GWProxy Handle--------- The target server failed to respondcom.sap.mobile.platform.server.proxy.connectivity.core.exception.ConnectivityException: The target server failed to respond
com.sap.mobile.platform.server.proxy.connectivity.core.AbstractConnectivityService.execute(AbstractConnectivityService.java:88)
com.sap.mobile.platform.server.proxy.connectivity.core.AbstractConnectivityService.executeRequest(AbstractConnectivityService.java:44)
sun.reflect.GeneratedMethodAccessor385.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
............................................
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)	at com.sap.mobile.platform.server.online.common.connectivity.http.base.AbstractHttpHelperImpl.execute(AbstractHttpHelperImpl.java:96)	at com.sap.mobile.platform.server.online.common.connectivity.http.onpremise.HttpHelperImpl.execute(HttpHelperImpl.java:44)	at com.sap.mobile.platform.server.proxy.connectivity.core.AbstractConnectivityService.execute(AbstractConnectivityService.java:75)	... 500 more#
What am I setting incorrectly?
Regards
Diego
Hello,
is it possible to remove/skip the "Set passcode screen" using the config parameters as well? There's already a parameter "passcodePolicy", would be great if there'd be a new parameter or new value like "passcodeDisable" or "Disable".
Regards
Wolfgang
This is being worked on so hopefully it will appear in a future SP. Today, this is possible by following the instructions in the Removing the Set Passcode Screen section of this guide.
Regards,
Dan van Leeuwen
Hi
I put the soluion in the following http://scn.sap.com/thread/3877060
Regards
Diego
Getting error while executing create_fiori_client.js in command prompt.
I have changed my platform from ["ios","android"] to ["android"] in config.json.
But getting stuck when Cordova does not able to find module while coppying assets.
It is throwing as error that it can not find module
"C:///prepare_restriction.js"
See below for screen shot.
If anyone faced this problem, guide me through it.
Thanks and regards,
Pratik Shukla
What version of Cordova and the Kapsel SDK are you using? Note, the guide above doe s mention how to disable the nobridge feature which perhaps might avoid the error you are seeing above. Search for prepare_restriction.js in this document.
Regards,
Dan van Leeuwen
I am using cordova 5.1.1 and smp 3.0 sp10
And i found this prepare_restriction.js file in plugins->settings
But dont know why it is throwing this error.
Regards,
Pratik Shukla
Updated for SP12 SDK.
Hi,
I am using Kapsel – SP12PL1 for Custom Fiori Client. UI5 Version on server – 1.28.12. Build is Successful and Custom launchpad is also visible as homepage. Then once I navigate to Master-Detail application via Launchpad Tile, master is not getting loaded in iOS phone. But works perfectly fine in android.
Testing Device- iPhone 6s, Version – 9.3.2.
I have also tried : SAP Web IDE Hybrid App Toolkit Add-on . But still does not work.
Any suggestion???
Got the Solution: Implemented no pragma code in oData.
Regards,
Shivesh Ranjan.
Unless you are asking for clarification/correction of some part of the Document, please create a new Discussion marked as a Question. The Comments section of a Blog (or Document) is not the right vehicle for asking questions as the results are not easily searchable. Once your issue is solved, a Discussion with the solution (and marked with Correct Answer) makes the results visible to others experiencing a similar problem. If a blog or document is related, put in a link. Read the Getting Started documents (link at the top right) including the Rules of Engagement.
NOTE: Getting the link is easy enough for both the author and Blog. Simply MouseOver the item, Right Click, and select Copy Shortcut. Paste it into your Discussion. You can also click on the url after pasting. Click on the A to expand the options and select T (on the right) to Auto-Title the url.
Thanks, Mike (Moderator)
SAP Technology RIG
Hi,
Upon running this - "node create_fiori_client.js" - command, the cordova.js file is opened and nothing happens after that. The project folder is not created.
Why? Can you please advise?
Thanks,
Seyed Ismail.
Have you been successful creating cordova projects from the command line before? I am wondering if your environment is setup correctly?
cordova -v
node -v
What version of the Kapsel SDK are you using?
There are some further instructions on set up at
Getting Started with Kapsel - Part 1 (SP09+)
It is also possible to debug this script as described at the start of this document.
Regards,
Dan van Leeuwen
Hi Daniel,
Thank you so much. It worked after I uninstalled and reinstalled SMP.
In the appconfig.json, If I had input the working URL and I set "fioriURLIsSMP": true, it will skip the initial screen. Am I right?
Thanks again,
Seyed Ismail.
If you specify a value for fioriURL in the appConfig then the screen that has the button Demo Mode is not shown and the screen that asks the user to enter the fioriURL is not shown.
The fioriURLisSMP can be set to true if you wish to proxy the connections to the system that is hosting your Fiori App through the SMP server.
Regards,
Dan van Leeuwen
Hi Dan,
Thank you so much for the clear explanation.
You have written "Use Android Studio, ADT command line or Xcode to deploy and run the project."
Do you have any document for this? I have installed Android Studio. I hope I need to import a folder into Android Studio as workspace? Am I right? If yes, which folder do I need to import?
I don't want to use proxy through SMP.
And one more thing! I have tried to execute the command "cordova build android". But It is ended up with error related to the gradle.
Thank you for advising and helping.
Seyed Ismail.
Do you use a proxy to reach the internet?
What error are you seeing?
If you wish to use Android studio I would recommend running
cordova prepare android
before you import the folder platforms\android.
Regards,
Dan van Leeuwen
Would like to know if it is possible to remove "Clear All Application Settings" from the Fiori Client App in iOS ?
Regards,
Priyanshu
That option should be available from the Fiori Client toolbar which is accessible via a double tap.
Regards,
Dan van Leeuwen
Hi Daniel,
Yes, it is accessible via Fiori Client toolbar which is accessible via a double tap. Do you have any idea how this option can be removed in iOS Fiori client?
Regards,
Priyanshu
Sorry, I misread your original question.
In the fioriclient.js file you can comment out the following line.
preferencesJSON.preferences.push(resetPreference);
It can be a bit tricky knowing which copy of this file to modify as I think you will find multiple copies of it.
Regards,
Dan van Leeuwen
Wonderful Daniel. Thanks. It really helped.
Regards,
Priyanshu
Hey, my task is to make an existing SAP Fiori App Offline capable. Would it be the right way to make this Fiori App an Fiori Client and then adding the Offline OData Store Plugin to it? Or is there any other way to implement this?
The Fiori Client loads the pages of you Fiori App from a web server in the same manner that Chrome or Safari does. Some of the files are read from cache but some such as the FioriLaunchpad.html file are reloaded each time the app starts.
To create an offline application you would need to bundle the HTML and JavaScript that your Fiori App uses and include it in the hybrid application that you create.
The following may be of interest.
CLI Packager for SAP Fiori Apps - Packaging SAP Fiori Apps - SAP Library
Regards,
Dan van Leeuwen
Hi Fiori Client Experts,
I´m building a custom Client using SMP SDK SP12 PL5. I disabled Passcode Dialog as well as "First use Tips" according above Guidelines.
But on initial start the Passcode Dialog as well as first use tips are displayed. Any idea, if something has changed with latest Version?
Thank you in advance Oliver
Have you attached the web inspector to your running app to verify that the changes you made are in the running version? There are likely multiple copies of fioriclient.js in your project.
Regards,
Dan van Leeuwen
Hi Daniel,
finally I got it solved. I followed the documentation above and added the custom coding in files located in c:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriApp\plugins\... .
But everytime I build the Client it took the files located in C:\SAP\MobileSDK3\KapselSDK\apps\fiori_Client\FioriApp\platforms\Android\platform_WWW\plugins\... for the build. So I modified files located in that Location and voila - it worked.
Probably someone should update this guide.
Regards Oliver
Hello experts,
i wanted to build a custom Fiori Client.
I've done all the needed settings, but i'm allways running on the same error.
"buildToolsVersion is not specified."
Can anybody help me?
cordova -v: 6.0.0
node -v: v.6.3.1
kapsel -v: 3.10.0
First i've prepared the config.json.
--> run: npm install
--> run: node create_fiori_client.js
Prepare the appConfig.js
--> run: cordova prepare
==> Everything is normal till i want to build my android-client with: "cordova build android".
Here is an extract of my console:
(I dont know why in the 4. line is the value "null"
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient>cordova build android
ANDROID_HOME=C:\Users\BBU\android-sdks
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101
null
org.xwalk:xwalk_core_library:19+
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
BUILD FAILED
Total time: 2.703 secs
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:599)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:566)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:563)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:562)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:559)
at org.gradle.listener.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:109)
at org.gradle.listener.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:98)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
..............
Tell me, if you need more information for help.
Thank you!!!!
Regards
Björn
Hi Björn, did you install Android SDK? Either Bundle with Android Studio or Command Line Tools.
I also recommedn to upgrade SMP SDK to SP12 PL5. We faced incredible stability issues of kapsel container with SP10.
Hello Oliver,
first thank you for your time.
Yes i've installed the Android SDK via command line.
I've also tried it with SP12, but this did not work also.
To extend the console extract:
At the end there is another information:
...........
BUILD FAILED
Total time: 11.968 secs
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\CordovaLib\build.gradle' line: 33
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> Failed to apply plugin [id 'android-aspectj']
> Plugin with id 'android-aspectj' not found.
...............
Maybe this info is helpful. I cant find a solution.
Regards
Björn
What is the error shown before? The message after "BUILD FAILED" are very let`s say common.
Anyway did you install all required Android SDK Build Tools, Platform and System Images?
Hello Oliver,
so now i've upgraded to the SMP SDK 12.
SDK Build Tools is installed, what all do you mean with Platform and System Images?
The Upgrade solved the last error. But now there is an other with:
...
* What went wrong:
Execution failed for task ':transformClassesWithMultidexlistForArmv7Debug'.
...
Here is the whole text:
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient>cordova build android
ANDROID_HOME=C:\Users\BBU\AppData\Local\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
null
embedded
org.xwalk:xwalk_core_library:17+
:preBuild UP-TO-DATE
:preArmv7DebugBuild UP-TO-DATE
:checkArmv7DebugManifest
:preArmv7ReleaseBuild UP-TO-DATE
:preX86DebugBuild UP-TO-DATE
:preX86ReleaseBuild UP-TO-DATE
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugAspectj
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:compileReleaseAspectj
:CordovaLib:compileReleaseJavaWithJavac
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:prepareAfariaProvider3120Library UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareAuthproxyAndroid3120Library UP-TO-DATE
:prepareBarcodescannerAndroid3120Library UP-TO-DATE
:prepareCDSProvider3120Library UP-TO-DATE
:preArmv7DebugAndroidTestBuild UP-TO-DATE
:preX86DebugAndroidTestBuild UP-TO-DATE
:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:prepareComAndroidSupportSupportV42411Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase730Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcm730Library UP-TO-DATE
:prepareFederation3120Library UP-TO-DATE
:prepareFederationProvider3120Library UP-TO-DATE
:prepareJdeferredAndroidAar124Library UP-TO-DATE
:prepareMaflogoncorecdvplugin3120Library UP-TO-DATE
:prepareOrgXwalkXwalk_core_library174644810Library UP-TO-DATE
:prepareToolbarAndroid3120Library UP-TO-DATE
:prepareVoicerecordingAndroid3120Library UP-TO-DATE
:prepareArmv7DebugDependencies
:compileArmv7DebugAidl UP-TO-DATE
:compileArmv7DebugRenderscript UP-TO-DATE
:generateArmv7DebugBuildConfig UP-TO-DATE
:generateArmv7DebugAssets UP-TO-DATE
:mergeArmv7DebugAssets UP-TO-DATE
:createXwalkCommandLineFileArmv7Debug
:generateArmv7DebugResValues UP-TO-DATE
:generateArmv7DebugResources UP-TO-DATE
:mergeArmv7DebugResources UP-TO-DATE
:processArmv7DebugManifest UP-TO-DATE
:processArmv7DebugResources UP-TO-DATE
:generateArmv7DebugSources UP-TO-DATE
:compileArmv7DebugJavaWithJavac UP-TO-DATE
:compileArmv7DebugNdk UP-TO-DATE
:compileArmv7DebugSources UP-TO-DATE
:transformClassesWithJarMergingForArmv7Debug UP-TO-DATE
:collectArmv7DebugMultiDexComponents UP-TO-DATE
:transformClassesWithMultidexlistForArmv7Debug
ProGuard, version 5.2.1
......
......
getIV(); }'
Maybe this is program method 'org.spongycastle.openssl.jcajce.JcePEMEncryptorBuilder$1 { byte[] getIV(); }'
Maybe this is program method 'org.spongycastle.pqc.jcajce.provider.util.AsymmetricBlockCipher { byte[] getIV(); }'
Maybe this is program method 'org.spongycastle.pqc.jcajce.provider.util.AsymmetricHybridCipher { byte[] getIV(); }'
Maybe this is program method 'org.spongycastle.pqc.jcajce.provider.util.CipherSpiExt { byte[] getIV(); }'
Note: there were 14 classes trying to access annotations using reflection.
You should consider keeping the annotation attributes
(using '-keepattributes *Annotation*').
(http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)
Note: there were 23 classes trying to access generic signatures using reflection.
You should consider keeping the signature attributes
(using '-keepattributes Signature').
(http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)
Note: there were 3 classes trying to access enclosing classes using reflection.
You should consider keeping the inner classes attributes
(using '-keepattributes InnerClasses').
(http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)
Note: there were 2 classes trying to access enclosing methods using reflection.
You should consider keeping the enclosing method attributes
(using '-keepattributes InnerClasses,EnclosingMethod').
(http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)
Note: there were 73 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Note: there were 1 class casts of dynamically created class instances.
You might consider explicitly keeping the mentioned classes and/or
their implementations (using '-keep').
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclasscast)
Note: there were 75 accesses to class members by means of introspection.
You should consider explicitly keeping the mentioned class members
(using '-keep' or '-keepclassmembers').
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
Note: you're ignoring all warnings!
Preparing output jar [C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\build\intermediates\multi-dex\armv7\debug\componentClasses.jar]
Copying resources from program jar [C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\build\intermediates\transforms\jarMerging\armv7\debug\jars\1\1f\combined.jar]
:transformClassesWithMultidexlistForArmv7Debug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithMultidexlistForArmv7Debug'.
BUILD FAILED
Total time: 17.555 secs
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\gradlew cdvBuildDebug -b C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
You may not have the required environment or OS to build this project
Error: Error code 1 for command: cmd with args: /s,/c,"C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\gradlew cdvBuildDebug -b C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\FioriClient\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
Which informations can i give you?
If you open SDK Manager it should look like this
Okay, thank you, two things were missing.
- ARM EABI v7a System Image and
- Intel x86 Emulator Accelerator
---> but the same error with the
"':transformClassesWithMultidexlistForArmv7Debug'."...
Hi Björn,
sry in that case I have no clue. I'd suggest to create an OSS message.
Good luck Oliver
I have the same problem and tried SMP SDK 3.12.4 and 3.13.1. Did you find a solution? I opened a new thread.
Hi all,
I'm trying to execute the script 'create_fiori_client.js' under Mac OS-X and unfortunately the execution stops with following parsing error (after :
SyntaxError: Unexpected token S
at Object.parse (native)
at cli (/usr/local/lib/node_modules/cordova/src/cli.js:309:24)
at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
My configuration:
- Mac OS-X Sierra 10.12
- cordova@5.2.0 (6.x tested, no change in result)
- node.js@4.5.0
- npm@2.15.9
Content of config.json:
{
"packageName": "com.sap.fiori.client",
"targetFolder": "FioriClient",
"appName": "FioriClient",
"platforms": ["ios"]
}
Has anybody already encountered the same problem and hopefully solved it?
Or can anybody tell me, what I'm doing wrong?
I would suggest checking to see what version of the Kapsel SDK you have and making sure you are using the recommended version of Cordova with that.
For example
Cordova 5.4.1 should be used if using SMP 3.0 SP11 SDK.
Cordova 6.0.0 should be used if using SMP 3.0 SP12 SDK.
Cordova 6.1.1 should be used if using SMP 3.0 SP13 SDK.
Note the version of the Kapsel SDK that is being used can be determined by examining a plugin.xml file.
C:\SAP\MobileSDK3\KapselSDK\plugins\logon\plugin.xml for example might say
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="kapsel-plugin-logon"
version="3.13.3">
Regards,
Dan van Leeuwen
We are getting an error when we try and disable the passcode screen (as shown above):
] SMP_LOGGER ERROR [SMP_LOGGER] "onCreatePasscodeError: {\"errorDomain\":\"MAFSecureStoreManagerErrorDomain\",\"errorMessage\":\"keyErrDescrMAFSecureStoreManagerErrorDoesNotExist\",\"errorCode\":\"3\"}"
Any ideas?
I am in the process of updating the content for and publishing a new version of this guide to reflect the latest SMP server release which is SP 11 and the Kapsel SDK which is SP 13.
One of the new features in SP 13 is a cleaner and easier way to customize the Logon plugin. The context object now takes a setting called disablePasscode. This is described here.
https://blogs.sap.com/2016/10/19/getting-started-kapsel-part-2-logon-sp13/#custom
This setting is exposed in the FioriClient in the appConfig.js file.
Hope that helps,
Dan van Leeuwen
We are stuck at the same error (with passcode enabled and disabled). The errorCode 3 means no input provided according to the source code. Did you find a solution for this?
Hi,
Using below mentioned SDK and version for Android APK. Issue -> While typing credential in Launchpad URL, app is getting crashed in Marshmallow(Not sure about other android compatibility).
Kapsel : SP12PL04.
Cordova : 6.0.0.
Node : Greater than 4.0.0.
SMP : False.
URL : Fiori Launchpad URL.
Android SDK is also updated.
Also referred plugin.xml -> mentioned version is : version="3.12.6">
I believe the crash issue is a know problem and is corrected in SP 13 and the latest available patch to SP 12. Note, I believe the plugin.xml should say 3.12.7 or higher to contain the fix.
Regards,
Dan van Leeuwen
Hi Daniel,
Thanks... It worked...
Regards,
Shivesh Ranjan.
Hi Experts,
I had developed custom Fiori client with hard coded our Fiori Launchpad URL.
It is working fine, but when I try to run the app from SAP Authenticator it invokes our custom Fiori client but it not passing the authentication details to Launchpad.
When I try to run the standard Fiori client from the SAP Authenticator it is working fine by sending authentication details to Launchpad.
We are following the below blog to do custom Fiori Client
https://blogs.sap.com/2015/05/07/configuring-sap-fiori-client-for-single-sign-on-with-ios-sap-authenticator/
SAP Mobile Platform (SMP) SDK: SP13
Cordova : 6.4.0.
And our AppConfig.js file is
fiori_client_appConfig = {
“appID”: “com.sap.fiori.client”,
“fioriURL”: “https://mobileapps.serverName.com/irj/portal/fiori?saml2idp=SIDP”,
“fioriURLIsSMP”: false,
“multiUser”: false,
“autoSelectSingleCert”: false,
“passcodePolicy”: {
“expirationDays”:”0″,
“hasDigits”:”false”,
“hasLowerCaseLetters”:”false”,
“hasSpecialLetters”:”false”,
“hasUpperCaseLetters”:”false”,
“defaultAllowed”:”true”,
“lockTimeout”:”300″,
“minLength”:”8″,
“minUniqueChars”:”0″,
“retryLimit”:”10″
},
“idpLogonURL”: “https%253a%252f%252fidp.serverName.com%252fsaml2%252fidp%252fsso%253fsaml2sp%253dSunChem_EP1%2526RelayState%253dFioriEP”
};
Can Any one help on this, thanks in advance.
Thanks
Ravi Varma
It seems that idpLogonURL should be set to URL’s original value without any extra url encoding when you set idpLogonURL in appConfig.js for custom Fiori client.
Thanks for the reply Changhon Baek,
It's working, once again thank you so much.
Thanks
Ravi Varma
Hi Daniel,
Awesome blogs. I have a question around Push Notifications for Fiori Client. As you have mentioned in one of your blogs that we have to register the deviceToken with SAP Mobile Platform. Does this happen automatically in case we use X509 certificate for authentication or do we have to write a specific code for that? And where do we have to write the code.
Thanks in advance!
Best Regards
Chandan Singh
Note, that there is a newer version of the guide available that covers SP13 and SP14 available at https://blogs.sap.com/2016/10/20/getting-started-kapsel-part-1-sp13/ .
Regarding push in the Fiori Client, if you are creating a custom Fiori Client, you would follow the steps to register with the Google, Apple or Windows push service. There are more detailed steps for how this works on Android at https://blogs.sap.com/2016/10/30/getting-started-kapsel-part-4-pushsp13.
Regards,
Dan van Leeuwen
Hi Daniel,
This worked. I am now getting the response back as OK.
But I am still not able to receive the notification, probably because of the ports to APNS are not open. Do we get any error back in response if the ports are not open?
Best Regards
Chandan Singh
You might try increasing the log levels in the SMP server particularily the one named Push and set it to DEBUG as well as enable the Trace setting. The log file would then appear in C:\SAP\MobilePlatform3\Server\log.
Regards,
Dan van Leeuwen
Hi,
I’ve installed SAP Mobile SDK and the installation is missing the build script:
C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\create_fiori_client.js
My KapselSDK folder doesn’t contain any apps folder!
Where can I download this folder?
The installation was successful by the way and there were no errors in the installation log.
I’ve installed on Mac and Windows and I have the same issue on both machines!
I got the latest available SMP SDK installations from SAP Support Portal:
Any help much appreciated!
@daniel.vanleeuwen any idea?
I believe those are the first versions of the SDK that were released in Feb of 2014. The Fiori Client was not part of the initial SDK.
From the below page, choose Support Packages & Patches rather than Installations & Upgrades.
https://support.sap.com/en/my-support/software-downloads.html
3.0 SP15 PL02 should be available with a release date of July 1, 2017.
One other note is that the current version of this Blog series is available at
https://blogs.sap.com/2016/10/20/getting-started-kapsel-part-1-sp13/
Regards,
Dan van Leeuwen
I see... I will try to install the upgrade.
Thanks for a quick reply!
Hello Daniel,
We need to perform PUSH notifications for all SAP UI5 applications configured in Fiori Launchpad, for this purpose we are using SAP Fiori Client and PUSH Kapsel Plugins.
Environment Details
SMP 3 SP11
Cordova Version 5.4.1
Steps Performed.
1) i have created a Application in SMP server (com.abc.xyz), followed this url :
https://blogs.sap.com/2015/07/17/getting-started-with-kapsel-sap-fiori-client-sp09/
Specified Back-End URL : http://<<serverIPAddress>>:<<serverPortNumber>>/
Rewrite Mode: Rewrite URL on Back End
SSO Mechanisms : Technical User (Basic)
Created Security Profile with HTTP/HTTPS Authentication
Specified Push notifications detials for Andirodi Mobile (API Key, Sender ID)
After Completing above configurations, restarted SMP Server
2) Created Cordova project as per the link https://blogs.sap.com/2015/07/17/getting-started-with-kapsel-sap-fiori-client-sp09/
specified this details for logon plugin
"serverHost": <<smp Server IP Address >>,
"https": false,
"serverPort": 8083,
"user": smpUserID,
"password": smpPassword,
"communicatorId": "REST",
"passcode": "123456789",
"unlockPasscode": "123456789",
"passcode_CONFIRM": "123456789"
created a APK file.
3) Installed the APK file on mobile, when executed getting an error "No Vault is present"
When tried from Chrome Rest Client, i was able to successfully register in SMP server as well as trigger notifications, when trying to do the same from APK file, getting an error "No Vault Present"
Pls let me know where i am going wrong
It would be best to post this sort of a comment as a question as it does not relate directly to the sample shown on this blog post.
Also note that this blog series has been replaced by
https://blogs.sap.com/2016/10/20/getting-started-kapsel-part-1-sp13/
As a couple of quick suggestions/comments, the port looks wrong. 8083 is generally an admin port ... perhaps you meant 8080 or 8081?
This section of the the guide may be of some help.
https://blogs.sap.com/2016/11/10/sap-fiori-client-sp13/#push
Regards,
Dan van Leeuwen