Thursday, September 18th, 2008

SVG working on the iPhone

Category: iPhone, Mobile, SVG

Dylan Schiemann wrote about how disappointing it was that the iPhone didn’t support SVG:

Safari on the iPhone does not currently have support for SVG. Safari 3 beta on Mac and Windows is currently the best browser on the planet for SVG performance, so this is a somewhat disappointing omission. We are hopeful that by the end of the year, the iPhone will receive the Safari 3 upgrade, and along with that native support for SVG. For now, we’ll have to wait on dynamic charting and drawing tools due to no SVG and the lack of mousemove event handlers.

It appears that if you point your iPhone 2.1 browser to SVG content and tests it now works!

Posted by Dion Almaer at 6:41 am

3.2 rating from 11 votes


Comments feed TrackBack URI

I’d be curious to see version stats. How many iPhone users are still on 1.* and 2.0? I have some stuff I’ve been working on but I’d hate to be in a situation where some people are inevitably left behind. I’m guessing the numbers would be low but always nice to see cold hard facts.

Comment by jonathansnook — September 18, 2008

Safari on the iPhone has been based on Safari 3 from the beginning…

Comment by fastspottim — September 18, 2008

There is nothing like giving your users a reason to upgrade. Give them a lower quality version if their browser doesn’t support SVG. SVG pairs very nicely with the iPhone zoom in / out.

Comment by JonathanLeech — September 18, 2008

@fastspottim – right, but SVG still wasn’t supported on the iPhone until 2.1. It’s no big surprise that it happened, and they even announced ahead of time that it would happen. The three significant things are
1) It finally happened.
2) So far, Apple hasn’t said anything about it. Ajaxian is the first website to post a story about it.
3) Since the iPhone doesn’t support flash, getting SVG support is even more important for it.

I think it will take a tutorial, some neat examples, etc. geared toward the iPhone, to get some traction on this important development. I am thinking about making an SVG version of an annoying flash ad, and writing an in-depth tutorial about how to do it.

Comment by JonathanLeech — September 18, 2008

We’ll also have dojox.gfx updated shortly to take advantage of this on the iPhone… I’ve seen some nice mapping and charting demos already taking advantage of this, and they’re really fast on iPhone 2.1.

@fastspottim: the iPhone is actually tied to a particular version of WebKit, and the version that the original iPhone used had most of Safari 3’s features, but lacked SVG support.

Comment by Dylan Schiemann — September 18, 2008

Not all the tests work on iPhone 3G, with 2.1 upgrade. The displace test fails.

Comment by sos — September 19, 2008

@sos – SVG support is limited on most browsers. There are some SVG feature / browser compatability matrices out there. And each browser has a status page where you can see which SVG features they support and what the current bugs are.
In general, things start going down hill once you get to the more advanced stuff like filters, external references, declarative animation, and interactivity. The only bug I’ve seen so far on the iPhone that I haven’t seen in regular Safari is that scaling patterns scales a rasterized version of the pattern.

Comment by JonathanLeech — September 19, 2008

“Safari 3 beta on Mac and Windows is currently the best browser on the planet for SVG”

How can you claim Safari 3 beta is “the best browser on the planet for SVG” with support for only 53% of SVG implementations while Opera 9.5 has 93.8% support?

Comment by swsnow — September 19, 2008

@swsnow – Umm read this article for the first time, then read the linked article again, which is from last July, and pay attention to the word that comes after SVG, which is performance. Fast forward a year and a couple months, the latest Opera might have the most SVG feaures checked off, but its still slower and buggier.

Comment by JonathanLeech — September 20, 2008

Leave a comment

You must be logged in to post a comment.