1 Reply Latest reply on Jan 8, 2017 10:58 AM by VectorP

    Web Images Not Showing on PhoneGap app

    samera62184639

      I am new to PhoneGap. My local images show fine on the App  (iOS 10.2), but all web images are not showing (they do show on the web browser, not on the app). everything I read on the internet was pointing at the Whitelist, but I have made all possible changes to it and still no luck.

       

      <access origin="*"/>
      <!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin -->
      <!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html -->
      <plugin name="cordova-plugin-whitelist" version="1" />

      <allow-intent href="http://*/*" />

      <allow-intent href="https://*/*" />

      <allow-intent href="tel:*" />

      <allow-intent href="sms:*" />

      <allow-intent href="mailto:*" />

      <allow-intent href="geo:*" />

      <platform name="android">

         <allow-intent href="market:*" />

      </platform>

      <platform name="ios">

         <allow-intent href="itms:*" />

         <allow-intent href="itms-apps:*" />

      </platform>

       

       

      Please help!

        • 1. Re: Web Images Not Showing on PhoneGap app
          VectorP Level 4

          <plugin name="cordova-plugin-whitelist" version="1" />

          For starters, this version doesn't exist.

           

          Secondly, you only allow for intents. It would be a good idea to read the whitelist plugin's documentation and apply it, especially the allow-navigation whitelist rule. And check your CSP, too!

          Should you get the images from an ajax request to a web service, look into the access origin whitelist rule (not sure why it's colored grey in your original question). In that case, make sure you wait for the deviceready event before making the request!