Archived discussions are read-only. Learn more about SAP Q&A

Packaging a sapui5 app with phonegap

Hi,

Is there anyone who knows how to structure of my project has to be in order to package it with phonegap? When you make a sapui5 application with eclipse, the libraries are not stored in the project. When you want to package the application, you need those.

Btw, I package my app using this website: https://build.phonegap.com/

Thanks

  • SAP Employee
replied

Hi Robbe,

basically you need the "sapui5-static.zip" from the SDN evaluation version (SAPUI5 as a file tree) and unzip it to a location in your project close to your HTML file.

This file is (zipped) 28.4 MB large - too large for reasonable mobile apps - but contains A LOT of stuff which is not needed at runtime and also many duplicate files in different versions (like debug plus optimized, single control files plus merged library files plus library preload files,...).

For the new "sap.m" mobile library an optimized package (< 2 MB) might be provided soon, but with some manual deletion you can also quickly get below 5 MB (for the sap.m library - when you are using other libraries, the steps and the resulting size are different:

From sapui5-static.zip, delete:

/test-resources/*

/discovery/*

/resources/sap-ui5-dbg.js

/resources/sap-ui-core-all-dbg.js

/resources/sap/uiext/* 

/resources/sap/service/* 

if you don't need them the /resources/sap/makit and/or /resources/sap/viz chart libraries

and in /resources/sap/ui/ the following library folders (when you wantto use sap.m, otherwise adapt your deletion):

commons

qunit

richtexteditor

table

test

ux3

There is also some PhoneGap-related documentation here:

https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/WebContainer.html

Regards

Andreas

7 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question