Plugins sind native Codemodule, die Zugriff auf Gerätefunktionen und native APIs bieten, die im Webbrowser nicht verfügbar sind. Sie können beispielsweise Plugins verwenden, um auf die Kamera, die Geolokalisierung, das Dateisystem und mehr zuzugreifen. Integrationen sind Pakete, die es Ihrer Ionic-App ermöglichen, mit anderen Frameworks, Diensten oder Plattformen zusammenzuarbeiten. Sie können beispielsweise Integrationen verwenden, um Ihre Ionic-App mit Angular, React, Vue, Capacitor, Cordova, Firebase und mehr zu verbinden.
-
Integrations are packages that enable your application to work with other frameworks, services or platforms. Use integrations to connect your loonic app with Angular, React, Vue, Capacitor, Cordova, Firebase, and more.
Um ein Plugin oder eine Integration zu Ihrer Ionic-App hinzuzufügen, müssen Sie die
ionic integrations enable
oder
ionic cordova plugin add
Befehl, abhängig von der Art des Plugins oder der Integration, die Sie hinzufügen möchten. Um beispielsweise die Kondensatorintegration hinzuzufügen, können Sie Folgendes ausführen:
ionic integrations enable capacitor
. Um das Cordova-Kamera-Plugin hinzuzufügen, können Sie Folgendes ausführen:
ionic cordova plugin add cordova-plugin-camera
. Die Dokumentation und die Installationsanweisungen für jedes Plugin oder jede Integration finden Sie auf der Ionic-Website oder in den offiziellen Repositories.
-
Cordova is obsolete now and the latest versions of ionic use capacitor. Although Cordova plugins are compatible with capacitor but it's recommended to use capacitor plugins instead
-
Adding Plugins and Integrations: Using the ionic cordova plugin add Command: This command is used to add Cordova plugins, which are native JavaScript libraries that extend the functionality of your application. Using the ionic capacitor add Command: This command is used to add Capacitor plugins, which are native JavaScript libraries that extend the functionality of your application. Using the ionic integrations add Command: This command is used to add integrations, which are JavaScript libraries that provide additional features for your application, such as authentication, analytics, or database.
Um ein Plugin oder eine Integration aus Ihrer Ionic-App zu entfernen, müssen Sie den Befehl
ionic integrations disable
oder
ionic cordova plugin rm
Befehl, abhängig von der Art des Plugins oder der Integration, die Sie entfernen möchten. Um beispielsweise die Kondensatorintegration zu entfernen, können Sie Folgendes ausführen:
ionic integrations disable capacitor
. Um das Cordova-Kamera-Plugin zu entfernen, können Sie Folgendes ausführen:
ionic cordova plugin rm cordova-plugin-camera
. Sie sollten auch alle Verweise oder Abhängigkeiten auf das Plugin oder die Integration aus Ihrem Code und Ihren Konfigurationsdateien entfernen.
-
Removing Plugins and Integrations: Using the ionic cordova plugin rm Command: This command is used to remove Cordova plugins. Example: ionic cordova plugin rm cordova-plugin-camera removes the camera plugin. Using the ionic capacitor command removes: This command is used to remove Capacitor plugins. Example: ionic capacitor remove cordova-plugin-camera removes the camera plugin. Using the ionic integrations Command removes: This command is used to remove integrations. Example: ionic integrations remove @ionic/pwa-elements removes PWA elements.
Um die Plug-ins und Integrationen aufzulisten, die in Ihrer Ionic-App installiert sind, können Sie die
ionic integrations list
oder
ionic cordova plugin ls
Befehl, abhängig von der Art des Plugins oder der Integration, die Sie auflisten möchten. Um z. B. die Kondensatorintegration aufzulisten, können Sie Folgendes ausführen:
ionic integrations list
und suchen Sie nach dem Kondensatoreintrag. Um die Cordova-Plugins aufzulisten, können Sie Folgendes ausführen:
ionic cordova plugin ls
und sehen Sie sich die Namen und Versionen der Plugins an.
Um ein Plugin oder eine Integration in Ihrer Ionic-App zu aktualisieren, können Sie den Befehl
ionic integrations update
oder
ionic cordova plugin update
Befehl, abhängig von der Art des Plugins oder der Integration, die Sie aktualisieren möchten. Um beispielsweise die Kondensatorintegration zu aktualisieren, können Sie Folgendes ausführen:
ionic integrations update capacitor
. Um die Cordova-Plugins zu aktualisieren, können Sie Folgendes ausführen:
ionic cordova plugin update
. Sie sollten auch die Änderungsprotokolle und die Dokumentation auf Breaking Changes oder neue Features überprüfen, die sich auf Ihre App auswirken können.
-
This article has information about ionic and Cordova integration which is an obsolete platform. Instead it should have information about ionic and capacitor
Relevantere Lektüre
-
WebmappingWas sind einige häufige Fallstricke und Best Practices für die Verwendung von Leaflet-Plugins?
-
Software Engineering PracticesWie können Sie Webanwendungen für maximale Portabilität bereitstellen?
-
WebanwendungenWas sind die besten Plattformen für die Entwicklung von Webanwendungen für Ihre Projekte?
-
WebentwicklungWie integrieren Sie Bibliotheken und Plugins von Drittanbietern in Ihr Framework für die Schnittstellenentwicklung?