vstirbu / InstagramPlugin

Instagram plugin for PhoneGap/Cordova
MIT License
120 stars 78 forks source link

Added support for converting base64/canvas into Library PHAsset localidentifier… #120

Closed ensemblebd closed 3 years ago

ensemblebd commented 3 years ago

Which can then be opened by IG app intents (instagram://library).

This was to bypass Document Interaction API approach, which is clearly not working on some IOS 14+ devices for specific Instagram versions.

Further notes: The error messages in terminal from xcode do not indicate any reason why DI would fail. And on latest 14.4.1 of IOS with latest instagram, the code which is broken works fine. I believe it's caused by instagram itself failing to process the "Copy to" DI event, since the error is resolved on latest.

Therefore this commit simply introduces developer control to specific precisely which "logic mode" (approach) to use. You can use legacy... IGO (exclusivegram), or 13+ IG (photo), and now --- LIBRARY mode which works as described above. DEFAULT Mode is ... the default. And so existing user code will be left unaffected by this change. It will continue as if no change was made. User can opt-in to use the new logistics, if they so choose.

USE AT YOUR OWN RISK. Tested good for me though.

REF: https://github.com/vstirbu/InstagramPlugin/issues/117