Ionic & Capacitor

Ionic





Capacitor

  • Using Capacitor with Ionic
  • Documentación Api
  • Repositorio
  • Crear una app:  
    • ionic start
    • Elegir angular 
    • Elegir un template 
    • Contestar Y a integrate your new app with Capacitor to target native iOS and Android
    • Desinstalar los 2 plugins de Cordova que ya tiene Capacitor
      • npm un @ionic-native/splash-screen --save
      • npm un @ionic-native/status-bar --save
      • Dejamos solo el capacitor core
      • Modificamos app.module.ts y app.component.ts para quitar todo lo relacionado con estos 2 plugins.
        • En app.module quitar los imports
        • En app.component.ts limpiarlo todo quitando las importaciones y vaciando el constructor. Ya no se necesita el incialiceApp porque ya lo hace ionic porque no utiliza Cordova.
      • Instalamos para que funcionen los plugins de capacitor de los dispositivos para pwa
      • Para probar en un dispositivo
        • ng build --prod



  • Añadir Capacitor a una app que ya existe
    • cd myApp
    • ionic integrations enble capacitor






App didáctica: ionic components







 

  

App myIonicNews: noticies

  • ionic start myIonicNews tabs
  • Your Ionic app is ready! Follow these next steps: 
    - Go to your new project: cd ./myIonicNews 
    - Run ionic serve within the app directory to see your app in the browser 
    - Run ionic capacitor add to add a native iOS or Android project using Capacitor 
    - Generate your app icon and splash screens using cordova-res --skip-config 
    --copy 
    - Explore the Ionic docs for components, tutorials, and more: 
    https://ion.link/docs
  • Accedir a news Api org  i Get Api Key i registrarse  i obtendré la key




Entradas populares de este blog

Angular

Spotify

Document Object Model (DOM)