iOS Native

How to integrate Ready Player Me into iOS native applications.
You can integrate Ready Player Me avatars and the avatar creator into 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 avatar creator into your native application and retrieving the avatar URL, the general process is as follows.
  1. 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. 2.
    Navigate to the desired Ready Player Me URL, e.g https://[yoursubdomain] If you don't have a subdomain, Signup to Studio.
  3. 3.
    Inject Javascript code with an eventListener link a callback to a native function (see Swift Example Project to see an example of this).
  4. 4.
    Retrieve the event data (a URL as a string).
On the Avatar Creator, 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.