Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Integrating Phonegap and AEM 6 (including third party libraries)

Avatar

Avatar
Validate 10
Level 2
JoseBerciano
Level 2

Likes

10 likes

Total Posts

40 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
JoseBerciano
Level 2

Likes

10 likes

Total Posts

40 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
JoseBerciano
Level 2

15-10-2015

Hello newbe here,

I am trying to create a brand new Phonegap app and insert in the pages some of the components I have just created. So basically I am working over the project Bruce Lefebvre made in this page: https://github.com/blefebvre/aem-phonegap-starter-kit

I have been able to run this app in my iOS emulator and everything seems to work fine, but when I add my components (which are using some external libraries like jQuery and PathFinding.js ) seems to be like the libraries are not being loaded.

So that is basically my problem, how can I set the libraries in order to get them loaded when the app runs? 

PD: The way I indicate the libraries in my *.jsp files is by adding this line <cq:includeClientLib categories="jquery"/>

PD2: I am able to load the libraries and making everything work fine at the author instance, loading the pages directly from Chrome.

View Entire Topic

Avatar

Avatar
Boost 3
Level 2
Anthony_R
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

10 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile

Avatar
Boost 3
Level 2
Anthony_R
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

10 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile
Anthony_R
Level 2

15-10-2015

Hello Jose,

Any clientlib you reference also has to be included in the content sync config for your app. If you haven't done that yet the desired library JS will not be included in the ZIP you download from AEM.

For example, this is how the Angular JS library gets added to the ZIP in the starter kit example you mentioned.

https://github.com/Adobe-Marketing-Cloud-Apps/aem-phonegap-starter-kit/tree/master/content/src/main/...

Another good practice is to have your page only reference your design's clientlib. That clientlib can then embed all of your custom JS plus have dependencies on any third-party libs as well. Including the clientlib at the component level should work too however as long as your content sync config is defined correctly.

/Anthony