Your image and audio assets also need to be added to your Xcode project. See Replay Starter for an example setup.
hideStatusBar: (Optional) A boolean to set if the status bar is hidden or not. Default
userStyles: (Optional) CSS code which will be injected into the web view. Useful for defining custom fonts.
jsRun: (Optional) The JS code that starts the game - can be overridden to load assets before starting game. Default
onJsCallback: (Optional) A callback for messages sent from your game. See Bridge.
webWorkerFiles: (Optional) An array of additional Web Worker JS file names (without
.jsextension) to load (e.g.
jsBridge(messageId: String, jsArg: String): Send a value from Swift to your JS game code. See Bridge.
Since Replay Swift embeds your game as a web view, the
device.inputs parameter of Sprite methods is an alias of the Web package's inputs:
@replay/swift package exports this type for TypeScript projects.
You can send asynchronous messages from your game's JS code to your Swift code, and then respond back using a Promise. This allows you to use native features like in-app purchases.