On iOS, hide API looks for last child viewcontroller and removes it. If some other child viewcontroller was added (by some other plugin) after this plugin's show, then hide mistakenly closes that viewcontroller instead.
Same issue if hide is called without calling this plugin's show first, and some other child viewcontroller was added by another plugin.
Hide API should instead keep a reference to its viewcontroller object and use that to close. Plugin already keeps SFSafariViewController *vc; which looks like what hide can use.
On iOS, hide API looks for last child viewcontroller and removes it. If some other child viewcontroller was added (by some other plugin) after this plugin's show, then hide mistakenly closes that viewcontroller instead.
Same issue if hide is called without calling this plugin's show first, and some other child viewcontroller was added by another plugin.
Hide API should instead keep a reference to its viewcontroller object and use that to close. Plugin already keeps
SFSafariViewController *vc;
which looks like what hide can use.