Code Monkey home page Code Monkey logo

msg_aem-mobile-hybrid-reference's Introduction

AEM Mobile: hybrid reference app

This is a basic AEM Mobile Hybrid reference application authored using Ionic Framework.

It includes:

  1. Mobile application written in Ionic ionicframework.com
  2. ContentSync OTA updates
  3. Basic authentication
  4. Extensions to add authorable pages for: locations, events, and about us.
  5. Native device feature support with: location services, beacons, camera, accelerometer, file system, file transfer and, vibration.

Minimum requirements for development

  1. Maven (tested: Apache Maven 3.2.2)
  2. Git (tested: git version 2.3.2)
  3. xCode (tested: 6.4)
  4. Cordova (tested: 5.3.3)
  5. node.js version >=0.12.x
  6. AEM 6.1

Getting Started

Clone this repository to your machine to begin.

This repository consists of a hybrid app built using the Ionic Framework and an associated AEM Package that will enable authoring once installed to an AEM instance.

Demo

Create Hybrid App Archive

A script is available that will create an archive of the app or you can use any ZIP creation tool of your choosing.

cd aem-mobile-hybrid-reference/hybrid-app
npm install
npm run zip

Import Hybrid App into AEM

  1. Drag and drop archive onto AEM 6.1 FP3 Apps admin console
  2. Configure your dashboard with analytics, push and phonegap build support
  3. Create, read, update and, delete (CRUD) app pages
  4. Publish updates OTA with ContentSync
  5. Open AEM Mobile Verify to view your app

Install AEM Package

cd aem-mobile-hybrid-reference/aem-package
mvn -PautoInstallPackage clean install

NOTE: If you are installing the packages manually you need to install content-dev first.

NOTE: For logout, user profile creation and update, the packages must be installed on the publisher.

mvn -PautoInstallPackagePublish clean install

Edit in AEM

NOTE: Once built and installed via maven, your hybrid app should be editable in AEM.

WARNING: You should only edit the sample that is deployed for quick demo purposes. If you plan to create content and expect to continue to redeploy developer updates over time (you will), you need to create a new application based on this template by selecting the '+' new app button on the Mobile Console and selecting the Hybrid Template during the creation process. This will create a clean separation between the Author creating content in the new application and any developer updates (the newly created app will pick up the developer updates without clobbering the author's content). Taking this one step further, navigate into the package manager and create a new package for your new application (including assets). Then download and save this package as a backup (you can automate this process).

The dashbaord for the app that was previously added will now contain a new entry called English under the Manage Content section.

If you followed the instructions correctly and have your author instance running locally on :4502, you should be able to author the hybrid app that was previously added via the following link: http://localhost:4502/editor.html/content/mobileapps/hybrid-reference-app/en/about.html

Production

When deploying an existing hybrid app for production it should be wrapped in an AEM package to simplify versioning and deployment. An additional content package is included with this sample which will wrap the existing ionic app into the correct JCR structure. Undesirable results may occur when installing this package to a server instance that previously imported the app via drag and drop.

cd aem-mobile-hybrid-reference/aem-package
mvn -PautoInstallProduction clean install

Build Hybrid App

Building the hybrid app can be completed entirely from the command line.

First ensure your script dependencies are up-to-date.

cd aem-mobile-hybrid-reference/hybrid-app
npm install

Merge Authored Content

This method would generally be used by the ionic developer to test the app with authored content.

NOTE: Default AEM server is http://localhost:4502 with credentials admin:admin. Modify scripts/fetch.sh if needed.

Content being managed by AEM will be automatically merged into the hybrid app during the Cordova build process when the --aem-merge argument is provided.

cd aem-mobile-hybrid-reference/hybrid-app
cordova platform add ios
cordova run ios --emulator --aem-merge

Build a Single Package

This allows you to build the sample as one content package.

cd aem-mobile-hybrid-reference/aem-package/hybrid-reference-app-all-pkg
mvn clean install content-package:install

msg_aem-mobile-hybrid-reference's People

Contributors

arumsey avatar johobot avatar blefebvre avatar elvisphilipn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.