Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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").
like image 519
kobik Avatar asked Mar 06 '12 18:03

kobik


2 Answers

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

like image 155
Mason Wheeler Avatar answered Oct 21 '22 12:10

Mason Wheeler


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.

  • Taking a screenshot
  • Open a webpage
  • Running in the background
  • Sending mail directly through smtp

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.

like image 45
Stephan Eggermont Avatar answered Oct 21 '22 12:10

Stephan Eggermont