4 Replies Latest reply on Sep 15, 2016 5:41 AM by kerrishotts

    iOS10 and SVG image problem

    cemshid Level 1

      We are developing a PhoneGap ios application and had a big surprise when we update our phones to ios10.

      SVG images are not loading.

       

      Does anyone has an idea about this?

        • 1. Re: iOS10 and SVG image problem
          kerrishotts Adobe Community Professional

          Please provide more information:

           

          - Device(s) you are testing on and iOS version. I know you are using iOS 10, but is it one of the betas or the GM?

          - Have you recompiled your app?

          - Are you using PGB or the CLI?

          - What version of Phonegap are you using? What version of the cordova-ios platform are you using?

          - How are you loading and rendering your SVG images? Code would help.

          - Are the apps release builds or test builds? If the latter, debug with Safari and see if anything pops up on the console.

           

          Thoughts:

          - Reduce to the smallest code that reproduces the problem. I'd start with a simple app that just renders a single SVG image. If that works, try multiple SVG images. Then add styling... etc. When things break, you should have a better idea of the trigger.

          - iOS 10 has tightened the CSP (content-security-policy) meta tag a bit. Depending on how you load & render SVGs, perhaps you're falling afoul of this.

          - Try using WKWebView (if you can; it's not a drop-in replacement and has its own issues) and see if the issue goes away.

          • 2. Re: iOS10 and SVG image problem
            ShazronAbdullah Adobe Employee

            More information needed. Are you loading it locally or remote? How are you loading it (embedded or img tag)?

             

            I did a quick test, using an <img> tag to a local file in my app package, I could load a SVG file in iOS 10 GM (to both the Simulator and Device)

            • 3. Re: iOS10 and SVG image problem
              cemshid Level 1

              I'm trying to load it locally via img tag. I can verify that, the path is correct

               

              I cannot see the image when I access the project on PhoneGap Mobile app.

              • 4. Re: iOS10 and SVG image problem
                kerrishotts Adobe Community Professional

                Can you share an example that illustrates the problem? Have you tried another SVG file -- perhaps there's something up with the particular SVG image you're loading?

                 

                Also: what do you mean by "PhoneGap Mobile app" -- are you using PhoneGap Desktop/Developer apps?