DmcSDK / cordova-plugin-mediaPicker

cordova android ios mediaPicker support selection of multiple image and video gif ✨ cordova android 和 ios 图片视频选择cordova插件,支持多图 视频 gif,ui类似微信
MIT License
138 stars 92 forks source link

How can I install the order version of this plugin #107

Closed Mr-Anonymous closed 4 years ago

Mr-Anonymous commented 4 years ago

I have the Media Picker plugin version 2.4.7. How can I install the plugin version 2.4.6 instead?

I tried the following commands and it is not working:

cordova plugin add https://github.com/DmcSDK/cordova-plugin-mediaPicker.git#2.4.6 --variable IOS_PHOTO_LIBRARY_USAGE_DESCRIPTION="This app needs photo access" --save

cordova plugin add https://github.com/DmcSDK/cordova-plugin-mediaPicker.git@2.4.6 --variable IOS_PHOTO_LIBRARY_USAGE_DESCRIPTION="This app needs photo access" --save

cordova plugin add https://github.com/DmcSDK/cordova-plugin-mediaPicker#2.4.6 --variable IOS_PHOTO_LIBRARY_USAGE_DESCRIPTION="This app needs photo access" --save
DmcSDK commented 4 years ago

@Mr-Anonymous sorry i don't know how install old version plugin, maybe use https://github.com/DmcSDK/cordova-plugin-mediaPicker/commit/9c15c4964cf68597f6865bd31de5781e1e4e3637 revert code?

Mr-Anonymous commented 4 years ago

Thank you @DmcSDK

I have installed version 2.4.6 upto the commit https://github.com/DmcSDK/cordova-plugin-mediaPicker/commit/9bf7809c404b0b22e1c6001fa64a4cacec9c41e8 This is how I did it:

  1. Went to the commit from Oct 11, 2019 and copied its url

    https://github.com/DmcSDK/cordova-plugin-mediaPicker/commit/9bf7809c404b0b22e1c6001fa64a4cacec9c41e8
  2. I copied the last part to get the commit id:

    9bf7809c404b0b22e1c6001fa64a4cacec9c41e8
  3. Copied the download zip url from the mediapicker github page:

    https://github.com/DmcSDK/cordova-plugin-mediaPicker/archive/master.zip
  4. Replaced master.zip to commit id zip

    https://github.com/DmcSDK/cordova-plugin-mediaPicker/archive/9bf7809c404b0b22e1c6001fa64a4cacec9c41e8.zip
  5. Went to the above url and downloaded the zip and opened the archive in my computer.

  6. I installed the latest version of the plugin:

    cordova plugin add https://github.com/DmcSDK/cordova-plugin-mediaPicker.git --variable IOS_PHOTO_LIBRARY_USAGE_DESCRIPTION="This app needs photo library access to upload photos or videos from your device" --save
  7. Went to the plugin folder, copied the contents from the downloaded unzip contents and replaced it inside the plugins/cordova-plugin-mediapicker-dmcsdk folder location.

  8. Rebuild the iOS platform.

    ionic cordova platform remove ios
    cordova platform add ios@5.0.0

I will see how it goes.

It will be easier if you can tag the versions in your git push or update the version in git to match the ones in plugin so it is easier to downgrade to another version if needed.