user429620
user429620

Reputation:

Cocoa - Alternatives for Webkit.framework?

Are there any alternatives for webkit.framework?

Is there for example a "ChromeKit.framework"? (Doesn't appear so from what I searched).

Is it not allowed by Apple to have competing browser frameworks available, or does no one simply care to make one?

Reason I ask is the appalling svg/canvas performance in webkit framework.

Edit: Found this: http://en.wikipedia.org/wiki/Chromium_Embedded_Framework

But there's no .framework available to just link in xcode 5. It also seems outdated (instructions). Anyone used this with xcode 5?

Upvotes: 11

Views: 2426

Answers (1)

user2975337
user2975337

Reputation:

Edit: Well, I downloaded the 64-bit Mac CEF archive again today and this time it did not compile with the instructions I gave earlier. It was necessary to make some more modifications both to build settings and to source code (replacing some deprecated methods).

Updated answer:


Latest builds of the Chromium Embedded Framework 3 can be found here, the latest being from 10 days ago (2013/12/10). The Mac OS X 64-bit build includes a sample Xcode project for OS X 10.7 Lion which needed some modifications to compile successfuly on 10.9 Mavericks / Xcode 5 (see below). The build product cefclient.app is a simple bare-bones web browser.

The following instructions are for building the Chromium Embedded Framework and test apps on 64-bit Mac OS X 10.9 / Xcode 5 from the CEF release archive: cef_binary_3.1720.1548_macosx64.7z, currently downloadable from the CEF builds page. It may be necessary to Build after each source code change to show more issues.

  1. Extract the 7z archive.
  2. Open cefclient.xcodeproj/project.pbxproj in TextEdit and replace all occurrences of "10.7" with "10.9" (no quotes), and "10.6" with "10.9" (no quotes).
  3. Open cefclient.xcodeproj in Xcode 5 and attempt to Build it (cmd-B). In the "Issues" pane find "cefclient project" issues and click "Validate Project Settings / Update to recommended settings" -> Perform Changes. Xcode will update the project file.
  4. Under "libcef_dll_wrapper" issues, select the issue involving UINT_MAX, and replace "UINT_MAX" with "UINT32_MAX" in the code.
  5. Under "cefclient_helper_app" issues, select the "resource_util_mac.mm" subitem to jump to the source code, and replace the deprecated AmIBundled() method with the following implementation:

    bool AmIBundled() { return ([NSBundle mainBundle] != nil); }

  6. Under "cefsimple" issues, select the "cefsimple_mac.mm" subitem to jump to the source code, and replace the deprecated ...loadNibNamed... line with:

    [[NSBundle mainBundle] loadNibNamed:@"MainMenu" owner:NSApp topLevelObjects:nil];

  7. Repeat step 6 for the "cefclient issues" -> "cefclient_mac.mm" subitem.

It should build successfully at this point. Ignore the linker warnings; I couldn't seem to fix them and everything seems to work OK regardless.

To build the smaller (~80MB) release version of the cefclient:

  1. Click the "All" target in the top-left corner of project window -> select "Edit Scheme..."
  2. Select the "Run" item in the left view, and choose Build Configuration -> Release.

The cefclient and cefsimple build products will be in the @{PROJECT_DIR}/xcodebuild/Release folder, while the CEF framework will be in @{PROJECT_DIR}/Release folder.

Not exactly plug and play, eh? Let me know if this works for you.

Upvotes: 7

Related Questions