この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

カスタムイベント

モバイル SDK でユーザー定義属性を取得するには、カスタムイベント内でソースプロパティを定義します。その後、モバイルスキーマの命名規則を使用して項目をカスタムイベントスキーマに対応付けることができます。

カスタムイベント例

iOS
1CustomEvent(
2    name: "Custom Event",
3    attributes: [
4        "giftWrap" : true,
5        "giftMessage" : "Happy Birthday",
6        "giftWrapOptions": [
7            "paperColor": "green",
8            "ribbon": false
9  ]
10    ]
11)
Android
1EventManager.customEvent(
2    name = "Custom Event",
3    attributes = mapOf(
4        "gift" to mapOf(
5            "message" to "Happy Birthday",
6            "wrap" to true,
7            "wrapOptions" to mapOf(
8                "paper-color" to "green",
9                "ribbon" to false
10            )
11        )
12    )
13)