Using WebKit (Safari compatible) in delphi to simulate iPhone mobile
Asked Answered
S

2

7

Has anyone successfully used WebKit in Delphi?

WebKit is an open source web browser engine. WebKit is also the name of the Mac OS X system framework version of the engine that's used by Safari, Dashboard, Mail, and many other OS X applications.

I want to create an iPhone/iPad Mobile Simulator same as in electricplum. (I have tried the FREE version - seems like it also uses Adobe AIR).

With Safari browser we have the most accurate preview results for iPhone mobile sites. so I would like to embed the WebKit (that is used by Safari) in my application, so my customers can have a reliable preview of their mobile web sites.

I have searched the web, but could not find a working code. (The best I could find was this, but it's not working).


The 3 main problems with Delphi Chromium Embedded suggested in the answers are that:

  • It does not support D5
  • I can overcome the fact that there is no support for D5 (creating the component with D7 in a separate process or DLL) But, It is very unstable! I have tested it with D7: Random access violations.
  • It does not render HTML pages with div layout/HTML5 same as Safari does (or electricplum - "Electric Mobile Simulator").
Sidney answered 6/3, 2012 at 18:32 Comment(1)
WARNING: The provided link to the Safari code in the board message of bsalsa.com is reported as dangerous (the link to _http://www.simail.si/download/Delphi_Webkit.7z). DON'T DOWNLOAD IT!Magnetic
C
7

Have a look at DelphiChromiumEmbedded. It's not Safari, but it is Webkit based at least...

Cnossus answered 6/3, 2012 at 18:53 Comment(6)
@Sidney ChromiumEmbedded is pretty much your best bet... however I see you have a D5 tag there... not sure if you'll be able to use it without some changes...Multiplication
I have tested Chromium. as I thought, it is based on Google chrome engine so it renders the HTML like chrome (which is not what I want) and does not use WebKit. It is also very unstable.Sidney
@kobik: I was under the impression that Chrome did use Webkit. And Wikipedia says it does...Cnossus
@MasonWheeler As I understand it, Chrome uses WebCore (part of WebKit), but doesn't use WebKit's JavaScript engine, having replaced JavaScriptCore with V8.Longevous
chrome basically is webkit =)Yarkand
I'm accepting this answer since I have to accept one. maybe in the future Chromium will be stable...Sidney
W
3

The reliability of that is not going to be very good. In a corporate environment you might want to just put a mac on the network with the iPad/iPhone simulator from xcode, and script it to open your site and take screenshots.

Or even write a iOS program to open a webkit view with your site, and just put an iPad on the network.

And take a look at this question and answer

You might want to consider how much work a delphi webkit is going to be compared to just buying a mac. The upgrade cycle is going to be painful whatever route you take, but quality is going to be much better with the mac/iPad.

Webworm answered 18/3, 2012 at 11:18 Comment(4)
Thanks for your response. As I mentioned, Safari on Windows gives us very good results. In fact our design team is using "Electric Mobile Simulator" with great success. But I want to embed that inside our product.Sidney
+1 BTW. That gave me an interesting idea... maybe there are already exists reliable web-services based on iOS, that will get an input of the URL, and return a PDF...Sidney
comment to @Self: using a screenshot is problematic, because the screenshot is not responsive. meaning I can't actually navigate and actually see transpositions effects for example.Sidney
On a mac/pc you could use vnc/ichat/skype/remote desktop or so to capture screen semi-live. If your connection is good enough (and the machine fast enough) you should be able to have no dropped framesWebworm

© 2022 - 2024 — McMap. All rights reserved.