PDF link only in browser

Solution -

If it isn’t already, include cordova-plugin-ionic-webview to your project.
Follow this solution to tacle the CORS issue in iOS device.

Now, at this point your app’s links in iOS should open themself in browser.

If not(as in my case), you may need to remove <allow-navigation *** /> from your config.xml file.
Follow this topic incase you haven’t found solution from above steps mentioned.

Incase you are inrested in solution with In App Browser for dynamically generated HTML contents, you can follow answers mentioned by cityfresno or josechepe or use something like mentioned in this solution or in this page. It just adds event listeners on each anchor tags to extract link URL and pass it to InAppBrowser plugin.

1 Like