loading

Integrating Pixo into a native iOS app

Although Pixo Editor does not provide native SDK for iOS, it can be easily integrated into a native application, thanks to the WKWebView component. All you need is an embedded HTML page that integrates Pixo, a WKWebView instance rendering that HTML page, and a communication controller. Here is the flow:

  1. Any UIImage is converted to base64 string
  2. The WKWebView component renders a static HTML page that integrates Pixo
  3. The static HTML page gets the base64 string and opens it in Pixo
  4. The onSave callback of the Pixo.Bridge instance sends back the edited image as base64 string as a WKScriptMessage
  5. The base64 string is converted to UIImage

Here is a short video showing the end result:

You can check the source code of the above example in our public GitLab repo. The demo uses the Image Picker developed by AppCoda.

Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *