microsoft / AdaptiveCards

A new way for developers to exchange card content in a common and consistent way.
https://adaptivecards.io
MIT License
1.76k stars 550 forks source link

[Rendering] Adaptive cards not rendering on certain iOS device #8854

Open Cjoshua2 opened 8 months ago

Cjoshua2 commented 8 months ago

Target Platforms

iOS

Version : 17.4

SDK Version

1.4

<PackageReference Include="AdaptiveCards.Templating" Version="1.4.0" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

.NET Version

7.0

<TargetFramework>net7.0</TargetFramework>

Application Name

Outlook

Version : 4.2408.1

Problem Description

Hello,

Adaptive cards is not working on some iOS devices, sent via smtp.

Tried to update IOS as well as Outlook app.

Screenshots

image

Card JSON

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "originator": "${originator}",
    "hideOriginalBody": true,
    "version": "1.1",
    "constrainWidth": false,
    "body": #BODY#,
    "actions":
    [
        {
            "type": "Action.ShowCard",
            "title": "Approve",
            "card":
            {
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "type": "AdaptiveCard",
                "version": "1.1",
                "body":
                [
                    {
                        "type": "TextBlock",
                        "text": "Remarks:"
                    },
                    {
                        "type": "Input.Text",
                        "id": "reasonApprove",
                        "isMultiline": true,
                        "maxLength": 1000
                    }
                ],
                "actions":
                [
                    {
                        "type": "Action.Http",
                        "title": "Approve",
                        "method": "POST",
                        "url": "${apiClient}",
                        "headers":
                        [
                            {
                                "name": "Originator",
                                "value": "${originator}"
                            },
                            {
                                "name": "Status",
                                "value": "${approvalStatus}"
                            }
                        ],
                        "body": "${replyApproveData}",
                        "bodyContentType": "application/json"
                    }
                ]
            }
        },
        {
            "type": "Action.ShowCard",
            "title": "Reject",
            "card":
            {
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "type": "AdaptiveCard",
                "version": "1.1",
                "body":
                [
                    {
                        "label": "Remarks:",
                        "type": "Input.Text",
                        "id": "reasonReject",
                        "isRequired": true,
                        "errorMessage": "Remarks are required for rejection.",
                        "isMultiline": true,
                        "maxLength": 1000
                    }
                ],
                "actions":
                [
                    {
                        "type": "Action.Http",
                        "title": "Reject",
                        "method": "POST",
                        "url": "${apiClient}",
                        "headers":
                        [
                            {
                                "name": "Originator",
                                "value": "${originator}"
                            },
                            {
                                "name": "Status",
                                "value": "4"
                            }
                        ],
                        "body": "${replyRejectData}",
                        "bodyContentType": "application/json"
                    }
                ]
            }
        },
        {
            "type": "Action.ShowCard",
            "title": "Return for Reprocessing",
            "card":
            {
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "type": "AdaptiveCard",
                "version": "1.1",
                "body":
                [
                    {
                        "label": "Remarks:",
                        "type": "Input.Text",
                        "id": "reasonReprocess",
                        "isRequired": true,
                        "errorMessage": "Remarks are required for rejection.",
                        "isMultiline": true,
                        "maxLength": 1000
                    }
                ],
                "actions":
                [
                    {
                        "type": "Action.Http",
                        "title": "Return for Reprocessing",
                        "method": "POST",
                        "url": "${apiClient}",
                        "headers":
                        [
                            {
                                "name": "Originator",
                                "value": "${originator}"
                            },
                            {
                                "name": "Status",
                                "value": "${rejectionStatus}"
                            }
                        ],
                        "body": "${replyReprocessData}",
                        "bodyContentType": "application/json"
                    }
                ]
            }
        }
    ]
}

Sample Code Language

No response

Sample Code

No response

Cjoshua2 commented 8 months ago

@jwoo-msft