Skip to content

Swift bindings for the Chromium Embedded Framework

License

Notifications You must be signed in to change notification settings

WarWithinMe/CEF.swift

 
 

Repository files navigation

CEF.swift

Carthage compatible

Swift bindings for the Chromium Embedded Framework.

Requirements

Xcode 9.3, Swift 4.1 (see notes below)
Supported target platforms: macOS 10.9+

Required tools: jq, xcpretty, lxml
To set up your environment:

$ brew install jq
$ gem install xcpretty
$ pip install lxml

How to build

The easy way

You can now build CEF.swift using Carthage. Just add the following line to your Cartfile:

github "lvsti/CEF.swift" "<branch_specifier>"

(For the branch_specifier, see the notes on branches below.)

Note that the bootstrap build will take quite some time as CEF.swift has to fetch and build external dependencies as well.

The oldschool way
  1. fetch this repo
  2. switch to the appropriate branch in CEF.swift to match the CEF distribution (see notes below)
  3. run scripts/setup.sh from the repo root
  4. now you are ready to compile the CEF.swift framework

CEF branches

CEF is developed on multiple branches simultaneously, which differ in API and functionality (see Spotify OpenSource and ChromeStatus). CEF.swift aims at supporting the current stable release branch and a couple more of earlier releases. For any CEF branch NNNN, the corresponding CEF.swift branch is named cef_NNNN.

Currently supported branches:

  • 3440 (Chrome 68) Build Status - Swift 4.1
  • 3396 (Chrome 67) Build Status - Swift 4.1
  • 3359 (Chrome 66) Build Status - Swift 4.1
  • 3325 (Chrome 65) Build Status - Swift 4.1
  • 3282 (Chrome 64) Build Status - Swift 4.1
  • 3239 (Chrome 63) Build Status - Swift 4.1
  • 3202 (Chrome 62) Build Status - Swift 4.1
  • 3163 (Chrome 61) Build Status - Swift 4.1

Archived branches (not maintained anymore):

  • 3112, 3071, 3029, 2987, 2924, 2883, 2840, 2785, 2743, 2704 - Swift 3.0
  • 2623, 2526, 2454, 2357 - Swift 2.3

Getting started

Check out the (pretty skinny) CEFDemo app under Samples/CEFDemo to get the basic idea of how a CEF-based app should look like. The CEFDemo runs in multi-process mode. It will load google.com and then quickly changes to a string of JSON, to demostrate how to register Native API for JS. For more inspiration, take a look at the cefsimple and cefclient apps shipped with the CEF binary distribution.

Disclaimer

This project is incomplete, untested, and most likely unstable, so use it at your own risk. Bug reports and suggestions are welcome though.

About

Swift bindings for the Chromium Embedded Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 89.0%
  • Python 10.6%
  • Other 0.4%