Using DeepAR SDK in iMessage extension

DeepAR SDK ARView can also be used in the iMessage extension. There is iMessage example provided in the SDK package (example/Message). The usage in the iMessage extension is the same as in the host app. Here are a few tips to consider: - ARView can be used in multiple screens if necessary, without shutting down and initializing again (to make the screen switching faster). This is typically useful when there is a need to show the ARView in the Compact and Expanded iMessage screen. After the first initialization, the ARView reference can be kept in the object with longer life cycle (e.g. singleton manager object) and added in the view hierarchy as needed. - To avoid the assets duplication in the host app and the iMessage extension, the assets can be bundled in the framework. This allows for iMessage and host app to use the same assets and thus reducing the size of the app.

Running on the iPhone Simulator

The DeepAR SDK iPhone Simulator build is located in lib/simulator. When running on the simulator, the app will try to load "camera.jpg" image from a bundle. If the image is present, it will be used instead of the camera feed. If the image is not present, black frame will be used. The usage is demonstrated in the example app.

Did this answer your question?