Open mahendraHegde opened 2 years ago
this plugin is just a workaround until capacitor fixes the problem, so I didn't publish a npm package. The corresponding pull request of capacitor-plugins is already ready (https://github.com/ionic-team/capacitor-plugins/pull/1190) so it shouldn't take much time until the proper solution is there. In the meantime, it should be possible to install this package directly from github, though.
How to install directly from Github?
I've tried:
$ npm install --save git+https://git@github.com:hermitdemschoenenleben/capacitor-plugin-android-post-notifications-permission.git
In my .ts file I've got:
import {AndroidPostNotificationsPermissionPlugin} from 'capacitor-plugin-android-post-notifications-permission';
but I'm getting:
Cannot find module 'capacitor-plugin-android-post-notifications-permission' or its corresponding type declarations.
My package.json:
{ "name": "QuizSwipe", "private": true, "version": "1.0.18", "description": "QuizSwipe", "license": "MIT", "files": [ "dist/" ], "scripts": { "build": "stencil build", "start": "stencil build --dev --watch --serve", "test": "stencil test --spec --e2e", "test.watch": "stencil test --spec --e2e --watch", "generate": "stencil generate", "clean": "npx rimraf www" }, "devDependencies": { "@capacitor/cli": "^4.0.0", "@ionic/core": "^5.0.7", "@stencil/core": "2.10.0", "@stencil/store": "^1.3.0", "@types/node": "^18.11.2" }, "dependencies": { "@awesome-cordova-plugins/in-app-purchase-2": "^5.45.0", "@capacitor-community/admob": "4.0.0", "@capacitor-community/firebase-analytics": "^1.0.1", "@capacitor-community/native-audio": "^4.0.0-0", "@capacitor/android": "^4.0.0", "@capacitor/app": "^4.0.0", "@capacitor/app-launcher": "^4.0.0", "@capacitor/browser": "^4.0.0", "@capacitor/clipboard": "^4.0.0", "@capacitor/core": "^4.0.0", "@capacitor/device": "^4.0.0", "@capacitor/ios": "^4.0.0", "@capacitor/local-notifications": "^4.0.0", "@capacitor/network": "^4.0.0", "@capacitor/preferences": "^4.0.1", "@capacitor/push-notifications": "^4.0.0", "@capacitor/share": "^4.0.0", "@capacitor/splash-screen": "^4.0.0", "@ionic-native/core": "^5.26.0", "@ionic-native/screenshot": "^5.31.1", "@sparkfabrik/capacitor-plugin-idfa": "github:AE1NS/capacitor-plugin-idfa", "appsflyer-capacitor-plugin": "github:Ejobs/appsflyer-capacitor-plugin", "capacitor-plugin-android-post-notifications-permission": "git+https://git@github.com/hermitdemschoenenleben/capacitor-plugin-android-post-notifications-permission.git", "capacitor-rate-app": "^3.0.0", "com.darktalker.cordova.screenshot": "^0.1.6", "cordova-plugin-device": "^2.0.3", "cordova-plugin-purchase": "^11.0.0", "cordova-support-android-plugin": "^1.0.2", "cordova-support-google-services": "^1.4.0", "es6-promise-plugin": "^4.2.2", "jetifier": "^1.6.6", "ts-md5": "^1.2.11", "tslib": "^1.11.1", "web-social-share": "^6.4.1" }, "postinstall": "jetifier" }
I fear installing directly from github doesn't work as no dist folder is uploaded -> I think the best way is to check it out as a git submodule, then run npm install
and npm run build
inside the checked out folder. Finally, install it to your app using npm install file:/path/to/your/capacitor-plugin-android-post-notifications-permission
Great, thanks - that seems to have worked!
not able to install either from yarn or from npm, do you have any plans to publish?