
CAUTION If you are using a proxy server, you must configure Git. For example, if your proxy is proxy:8080, enter the following commands on your Mac: sudo git config --global http.proxy http://proxy:8080/ sudo git config --global https.proxy http://proxy:8080/ For more information about the sudo command, see Requirements for sudo Command. |
CAUTION We recommend you install v0.10.25 node version because the latest version, v0.12.0, has incompatibility problems and may produce an error like the following: “…Request path contains unescaped characters…” |
CAUTION If you are using a proxy server you must configure npm. For example, if your proxy is proxy:8080, enter the following commands on your Mac: sudo npm config --global http.proxy http://proxy:8080 sudo npm config --global https.proxy http://proxy:8080 For more information about the sudo command, see Requirements for sudo Command. |
CAUTION
|
... console.log('Adding SAP plugins...'); var kapsel_plugins = [ 'com.sap.mp.cordova.plugins.logon', 'com.sap.mp.cordova.plugins.logger', 'com.sap.mp.cordova.plugins.apppreferences', 'com.sap.mp.cordova.plugins.settings', 'com.sap.mp.cordova.plugins.authproxy', 'com.sap.mp.cordova.plugins.online', 'com.sap.mp.cordova.plugins.toolbar', 'com.sap.mp.cordova.plugins.cachemanager', 'com.sap.mp.cordova.plugins.encryptedstorage', 'com.sap.mp.cordova.plugins.push', 'com.sap.mp.cordova.plugins.e2etrace', 'com.sap.mp.cordova.plugins.barcodescanner', 'com.sap.mp.cordova.plugins.fioriclient', 'com.sap.mp.cordova.plugins.attachmentviewer' ]; var plugins = [ //path.join(sdk_root,'plugins','logon'), //path.join(sdk_root,'plugins','logger'), //path.join(sdk_root,'plugins','apppreferences'), //path.join(sdk_root,'plugins','settings'), //path.join(sdk_root,'plugins','authproxy'), //path.join(sdk_root,'plugins','online'), //path.join(sdk_root,'plugins','toolbar'), //path.join(sdk_root,'plugins','cachemanager'), //path.join(sdk_root,'plugins','encryptedstorage'), //path.join(sdk_root,'plugins','push'), //path.join(sdk_root,'plugins','e2etrace'), //path.join(sdk_root,'plugins','barcodescanner'), //path.join(sdk_root,'plugins','fioriclient'), //path.join(sdk_root,'plugins','attachmentviewer'), 'org.apache.cordova.camera', 'org.apache.cordova.file', 'org.apache.cordova.geolocation', 'org.apache.cordova.statusbar', 'org.apache.cordova.media', 'org.apache.cordova.splashscreen@0.3.0' ]; if (!useCrosswalkForAndroid) { shelljs.exec('cordova plugin add ' + kapsel_plugins.join(' ') + " --searchpath " + path.join(sdk_root, 'plugins')); //rebuild Kapsel plugins against local search path and not remote Cordova repository shelljs.exec('cordova plugin add ' + plugins.join(' ')); shelljs.exec('cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=sapfioriclient'); // add custom scheme plugin for the hybrid app } else { plugins.forEach(function (plugin, index) { shelljs.exec('plugman install --platform android --project . --plugin ' + plugin + " --searchpath " + path.join(sdk_root, 'plugins')); }); } ... |
... var goToFioriURL = function(errorCallback) { sap.FioriClient.getFioriURL(function (retrievedFioriURL) { if (!context.smpRegContext){ // If sap.FioriClient.context.smpRegContext is null, // don't allow the user to skip // the logon plugin by changing the URL. // sap.FioriClient.context.smpRegContext will be set //once logon is successful. // Once logon completes and the app navigates to the URL, //sap.FioriClient.context.smpRegContext will // be undefined, so it will pass this test. return; } if (!isUrl(retrievedFioriURL)) { errorCallback(); return; } if (!sap.FioriClient.MobileSSO) { setFioriURL(retrievedFioriURL); } // Add extra query string to force page reload. var buster = "smphomebuster=" + Math.random()*10000000000000000; ... var getFioriURL = function(callback) { function getFioriURLFromAppPreferencesFailed(error) { sap.Logger.info(error, 'FIORI_CLIENT'); // The Fiori URL wasn't found, so use the hardcoded value. doHttpsConversionIfNeeded(context.appConfig.fioriURL, callback); } function getFioriURLFromAppPreferencesSuccess(url) { if (sap.FioriClient.MobileSSO) { url = sap.FioriClient.MobileSSO; } if (url != null) { doHttpsConversionIfNeeded(url, callback); } else { doHttpsConversionIfNeeded(context.appConfig.fioriURL, callback); } } sap.AppPreferences.getPreferenceValue('fioriURL', getFioriURLFromAppPreferencesSuccess, getFioriURLFromAppPreferencesFailed); }; ... |
cordova.define("nl.x-services.plugins.launchmyapp.LaunchMyApp", function(require, exports, module) { "use strict"; /* Q: Why an empty file? A: iOS doesn't need plumbing to get the plugin to work. - Including no file would mean the import in index.html would differ per platform. - Also, using one version and adding a userAgent check for Android feels wrong. - And if you're not using PhoneGap Build, you could paste your handleOpenUrl JS function here. */ }); function handleOpenURL(url) { setTimeout(function() { if (url.indexOf("sapfioriclient://") === 0) { sap.FioriClient.MobileSSO = url.replace("sapfioriclient://", "https://"); } }, 300); }; |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
25 | |
24 | |
17 | |
14 | |
10 | |
9 | |
9 | |
7 | |
7 | |
7 |