Giter Site home page Giter Site logo

ionic-team / demo-cordova-capacitor-migration Goto Github PK

View Code? Open in Web Editor NEW
0.0 8.0 0.0 17.38 MB

Cordova to Capacitor migration app

Home Page: https://capacitor.ionicframework.com/docs/cordova/migrating-from-cordova-to-capacitor

JavaScript 4.00% TypeScript 53.17% HTML 22.19% CSS 19.90% Java 0.74%
capacitor cordova ionic

demo-cordova-capacitor-migration's Introduction

Demo: Cordova to Capacitor migration

A modified version of the Ionic Conference demo app that adds the ability to set the logged-in user's profile picture using the Camera on their device.

To see this app in action, check out the Capacitor 2.0 Launch presentation. During the presentation, the Cordova version of this app is migrated to Capacitor, then the Cordova Camera, File, and Storage plugins are migrated over to their Capacitor equivalents.

Note: This app is meant to be a demo sample and thus may not be maintained over time. Specs: @ionic/angular 5, Angular 8, Cordova Android 8, Cordova iOS 5, and Capacitor 2.1.0.

Implementation Details

The Cordova version (iOS, Android):

The Capacitor version (iOS, Android, and could easily be extended with PWA support):

Project Structure

The Cordova version of the app is under the cordova/ folder. You guessed it! The Capacitor version is under the capacitor/ folder.

The PhotoService class (src/app/providers/photo.service.ts) contains all logic to take pictures, write files, and store data. It is used in the Account class (src/app/pages/account/account.ts).

How to Run

  • If not already installed, install Ionic and native-run: npm install -g @ionic/cli native-run.
  • Clone this repository.
  • In a terminal, change directory into the repo: cd demo-cordova-capacitor-migration.
  • Change into the Capacitor directory: cd capacitor.
  • Run npm install.
  • Run npx cap sync android.
  • Run npx cap open android to open Android Studio and run the app on a device.
  • For more details, see development workflow.

demo-cordova-capacitor-migration's People

Contributors

dotnetkow avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.