1. 程式人生 > >SAP SMP kapsel iOS app編譯方法

SAP SMP kapsel iOS app編譯方法

以SMP 3.0 SDK SP12為例

===========================
安裝node
node -v

===========================
安裝cordova
npm uninstall cordova -g
npm install -g [email protected]
npm info cordova
cordova -v
6.0.0

===========================
解除安裝老版本的cordova plugins
cordova plugins
cordova-plugin-device 1.1.5 “Device”
cordova-plugin-whitelist 1.3.2 “Whitelist”
kapsel-plugin-authproxy 3.12.0 “AuthProxy”
kapsel-plugin-corelibs 3.12.0 “CoreLibs”
kapsel-plugin-i18n 3.12.0 “i18n”
kapsel-plugin-inappbrowser 1.3.1 “InAppBrowser”
kapsel-plugin-logon 3.12.0 “Logon”

cordova plugin remove kapsel-plugin-logon
cordova plugin remove kapsel-plugin-authproxy
cordova plugin remove kapsel-plugin-inappbrowser
cordova plugin remove kapsel-plugin-corelibs
cordova plugin remove kapsel-plugin-i18n
cordova plugin remove cordova-plugin-whitelist
cordova plugin remove cordova-plugin-device

cordova platform remove android
cordova platform remove ios

cordova plugins

=========================
Windows上操作
set KAPSEL_HOME=D:\SAP\MobileSDK3\KapselSDK
cordova plugin add kapsel-plugin-logon –searchpath %KAPSEL_HOME%\plugins -d
cordova plugin add kapsel-plugin-authproxy –searchpath %KAPSEL_HOME%\plugins -d
cordova plugin add kapsel-plugin-inappbrowser –searchpath %KAPSEL_HOME%\plugins -d
cordova plugin add kapsel-plugin-corelibs –searchpath %KAPSEL_HOME%\plugins -d
cordova plugin add kapsel-plugin-i18n –searchpath %KAPSEL_HOME%\plugins -d
cordova plugin add cordova-plugin-whitelist –searchpath %KAPSEL_HOME%\plugins -d
cordova plugin add cordova-plugin-device –searchpath %KAPSEL_HOME%\plugins -d

iOS上操作
export KAPSEL_HOME=~/Desktop/MobileSDK3/KapselSDK
cordova plugin add kapsel-plugin-logon –searchpath KAPSELHOME/pluginsdcordovapluginaddkapselpluginauthproxysearchpathKAPSEL_HOME%/plugins -d
cordova plugin add kapsel-plugin-inappbrowser –searchpath KAPSELHOMEcordovapluginaddkapselplugincorelibssearchpathKAPSEL_HOME%/plugins -d
cordova plugin add kapsel-plugin-i18n –searchpath KAPSELHOMEcordovapluginaddcordovapluginwhitelistsearchpathKAPSEL_HOME%/plugins -d
cordova plugin add cordova-plugin-device –searchpath $KAPSEL_HOME%/plugins -d

cordova plugins

===========================
copy backup目錄下的檔案

===========================
cordova platform add android -d

call “build and install.bat”

===========================
修改config.xml檔案中的專案名稱為英文spiis

cordova platform add ios -d

xcode開啟platform\ios\專案檔案,修改應用顯示為中文 XX移動

cordova run ios –emulator

===========================
xcode開啟platform\ios\專案檔案,修改team賬號

cordova build ios –device –release

在xcode的organizer裡面,選擇app,export為ipa檔案

===========================