AEM 6.0 - Content Sync does not work for Apps

Avatar

Avatar

Mat_Barreto

Avatar

Mat_Barreto

Mat_Barreto

15-10-2015

Hello everybody.

 

I'm trying to use and understand the new AEM features like Apps with Phonegap, but with some problems.

To begin with, the Content Sync. So, here is my situation:

- I'm building the Geometrixx Outdoors Apps (from the page English) via PhoneGap Build [selecting this "page" of the app and clicking on "Build Remote", after configuring my PhoneGap cloud service];

- Then, I download the .apk from my PhoneGap account and install it on a mobile Android Device;

- When I open it on my Android device (in this case, a virtual machine running Android 4.3), the App works just fine and I can see the app fetching data from my AEM server via Android logs on the first time it runs (log below);

[img]http://i.imgur.com/bH3MOmd.png[/img]

However, when I changed some content on my server (author instance), saved it and published it, then click "Update" on my app, the content is not synced and I can see errors regarding the fetch try of the app (as the log on the link below show). This changes can be viewed on my Publish instance, but does not get into the app. 

Important: I'm running a default AEM 6.0 version (already tested with SP1 and without it) and building and changing Geometrixx Outdoors App. Can anyone here make it work? Is there some step or configuration that I'm missing or skipping?

More info about enviroment: Windows 7 Pro 64x / Android VM 4.3

Thanks everyone in advance,

Matheus Barreto.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

JohnFait

Avatar

JohnFait

JohnFait

15-10-2015

There is a PG plugin that is needed to be able to apply the update which was not available on PGBuild.

Given that, updates will not work if you use PGBuild.   This known limitation via PGBuild should be a addressed in a pending feature pack.

In the meantime, to take advantage of AEM App updates please build your app using PG CLI local builds.

Answers (9)

Answers (9)

Avatar

Avatar

JohnFait

Avatar

JohnFait

JohnFait

15-10-2015

The mentioned Feature Pack should be out soon which will include many cool and useful additions.

It will also change and improve and how the app is managed!

Regards,

John

Avatar

Avatar

JohnFait

Avatar

JohnFait

JohnFait

15-10-2015

Yes, try downloading CLI which will export the app as a phonegap app allowing you to use PG CLI to build and run it.

It expects that you have a local build environment for the platform you are targeting, such as iOS or Android. It will try local build be default and if not found attempt a remote build (PGBuild).  If you haven't setup and Android dev environment you will need to do that first.

After extracting the downloaded zip try running;

'phonegap build android' or 'phonegap run android'      

http://docs.phonegap.com/en/3.2.0/guide_cli_index.md.html#The%20Command-Line%20Interface  (newer docs seem to reference cordova instead of phonegap)

Avatar

Avatar

viveksachdeva

Avatar

viveksachdeva

viveksachdeva

15-10-2015

Not able to get content sync working... The server URL that I entered from the apps console does not appear to be going with the build.. Any idea how I can do that?

Avatar

Avatar

balakumaran_k

Avatar

balakumaran_k

balakumaran_k

15-10-2015

Hi,

Content sync was working for me in android.

Please check couple of things,

1. Is it downloading the delta package into your mobile and the zip file has your changed file?

2. Is it failing while unziping the package or copying the files? - If so there may be issue with  file plugin version. Try with the latest and check whether it works.

 

Thanks,

Avatar

Avatar

Mat_Barreto

Avatar

Mat_Barreto

Mat_Barreto

15-10-2015

My publish instance is running and I am running the Android in a VM on the same machine (already confirmed the i.p address).

Avatar

Avatar

JohnFait

Avatar

JohnFait

JohnFait

15-10-2015

The default server url for requesting updates is localhost:4503.

If you're not running in an emulator on same machine as your publish instance you will need to edit the server url to a resolvable host and port and redo the build steps (download cli, build ...)

Regards,

John

Avatar

Avatar

Mat_Barreto

Avatar

Mat_Barreto

Mat_Barreto

15-10-2015

John,

Thanks for your time and help, but I believe that this is not the cause or the solution for the contentSync issue.

I have builded and installed the Geometrixx App by PhoneGap as instructed, but the problem is the same, and thinking about, I don't think that the contentSync are directly envolved with how AEM or PhoneGap build the app.

 

@ALL: anyone achieved to get content changes in Authoring synced with an mobile app? Even if with Geometrixx, can anyone make this work as it is out-of-the-box?

 

Thanks in advance, 

Matheus Barreto.

Avatar

Avatar

Mat_Barreto

Avatar

Mat_Barreto

Mat_Barreto

15-10-2015

John,

By downloading the CLI assets and building it in my machine with PG via prompt line?

 

Thanks in advance,

Matheus Barreto.

Avatar

Avatar

JohnFait

Avatar

JohnFait

JohnFait

15-10-2015

There is a PG plugin that is needed to be able to apply the update which was not available on PGBuild.

Given that, updates will not work if you use PGBuild.   This known limitation via PGBuild should be a addressed in a pending feature pack.

In the meantime, to take advantage of AEM App updates please build your app using PG CLI local builds.