How to add a plugin on only one Ionic platform?

后端 未结 1 577
刺人心
刺人心 2021-02-20 03:20

I am using the excellent background geolocation plugin on an Ionic project. Unfortunately Apple don\'t think my usage is valid enough so I have to work out how to add this plugi

相关标签:
1条回答
  • 2021-02-20 03:45

    Maybe use plugman to add plugin for specific platform:
    First,install plugman:

    $ npm install -g plugman
    

    And then, add plugin:

    $ plugman install --platform <ios|android|blackberry10|wp8> --project <directory> --plugin <name|url|path>
    

    for your situation, <directory> should be platforms/android, so the finally installation command is:

    $ plugman install --platform android --project platforms/android --plugin https://github.com/mauron85/cordova-plugin-background-geolocation.git
    

    More about plugman, refer to cordova plugman docs.Hope this will help, regards.

    0 讨论(0)
提交回复
热议问题