Skip to content
Titanium SDK
Version12.6.1

You are reading 12.6.1. See this page in 13.4.1.

Titanium.App.iOS.ActivityAttributes

pseudoiPhoneiPadsince 12.0.0

Use this module to communicate with the native iOS 16+ Dynamic Island APIs.

To properly use these APIs, you need to habe your Widget Extension ready. You can follow this sample repository for an extended example.

Examples

Start a new activity

const attributes = Ti.App.iOS.createActivityAttributes();
attributes.startActivity({
  param1: "Hello",
  param2: "World",
  data: JSON.stringify({ intKey: 1, boolKey: true })
});

Methods 1

Starts a new activity (aka the Dynamic Island) with the provided parameters

Parameters
ParametersTypeDescription
valueObject

The values to pass to your extension. For maximum flexibility, this parameter should be passed as a String-based Object, e.g.

{
  "param1": "Hello",
  "param2": "World"
}
If you need to pass other types, please serialize them to a valid JSON object and pass it's
stringified representation to this method.