Cocoa - Alternatives for Webkit.framework?
cocoa, objective-c, webkit, webview
Solution
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.
- Extract the 7z archive.
- 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).
- 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.
- Under "libcef_dll_wrapper" issues, select the issue involving UINT_MAX, and replace "UINT_MAX" with "UINT32_MAX" in the code.
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); }`
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];`
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:
- Click the "All" target in the top-left corner of project window -> select "Edit Scheme..."
- 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.
Problem
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?