[Safari View And Custom Chrome Tab] SafariViewController is not defined
Question
Forge component by assif_tiger

Hi,

May i know why this warning of "SafariViewController is not defined" will appear? I tried implementing the logic from the Sample Safari View and Custom Chrome Tab into my own app but i received this error. 

In my app, I used the SaveFile logic from File Plugin to get the URL, which i then pass it on to the Request.URL in the OpenAndroidChromeCustomTabs client action. Is there something that i am missing which caused that error? 

Edit: The file I am opening is a PDF and not a web browser, but it shouldnt cause the error of "safariviewcontroller is not defined" right?

 


Champion

Hi Jolene Kwek,

- Make sure you added the plugin as a dependency

- You generate a new build 

- Remove old build & Installed a fresh build on the device 

You might be using the old build that was generated before you added the plugin.


Hope it helps,

assif_tiger

Hi,


It's probably because the app was generated with MABS 7 and is being used on Android 11.

Known issue on SafariViewController :  https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller/issues/179 

Had the same behavior. 

Regards

Artur R.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.