iOS Native

How to integrate Ready Player Me into iOS native applications.

You can use the Ready Player Me web platform to add avatars to your native iOS application. This general integration guide gives an overview of the main methods of adding avatars to your app.

For integrating the Ready Player Me web platform directly into your native application and retrieving the avatar URL, the general process is as follows.

  1. Spawn a web browser or switch to a view with an embedded web browser (for example, using WKWebView as in the Swift Example Project).

  2. Navigate to the desired Ready Player Me URL, e.g https://demo.readyplayer.me/avatar.

  3. Inject Javascript code with an eventListener linking a callback to a native function (see Swift Example Project to see an example of this).

  4. Retrieve the event data (a URL as a string).

On the Ready Player Me web platform, the avatar creation process is complete once users tap the Next button on the avatar customization screen. You can find the URL with the GLB file in the next step. It is at this time that an event with the id messageis triggered. This is the event you will be listening for with the eventListener.

Once you have retrieved the generated Avatar URL, you can make a web request to download the avatar .glb file. To load this into a 3D scene, you need to use a third-party framework that supports the loading of .gltf or .glb files as Xcode does not natively support .glb as a 3D file format.

Last updated

#168: React Guides

Change request updated