macOS上的Outlook Web Add-In manifest.xml问题

时间:2019-04-16 20:27:27

标签: xml manifest outlook-addin office-js outlook-web-addins

我正在尝试使用本地manifest.xml文件在Outlook 2019(版本16.x)上手动安装外接程序。一切正常,直到我想添加移动支持为止。我知道我必须使用

<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1"> 

,然后添加<MobileFormFactor>标签。问题在于,当我添加这些标签时,加载项说安装成功,但是按钮从菜单中消失了。此外,在 Windows 上,它可以正常运行。

已编辑: 这是我完整的manifest.xml文件(出于安全目的删除了链接):

<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
          xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
          xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
          xsi:type="MailApp">
  <Id>75aa9198-c117-4adc-addf-fa4cc3455bd8</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>PureQuad</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="XDR" />
  <Description DefaultValue="XDR Proprietary Add-In for encrypting/decrypting emails"/>
  <IconUrl DefaultValue="/outlook/Images/Icon80.png" />
  <HighResolutionIconUrl DefaultValue="/outlook/Images/Icon80.png"/>
  <SupportUrl DefaultValue="https://..." />
  <AppDomains>
    <AppDomain>https://...</AppDomain>
    <AppDomain>AppDomain2</AppDomain>
    <AppDomain>AppDomain3</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="/outlook/Functions/Html/EncryptTaskPane.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="functionFile" />
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="xdrReadGroup">
                <Label resid="xdrGroupLabel" />
                <Control xsi:type="Button" id="decryptButton">
                  <Label resid="decryptButtonLabel" />
                  <Supertip>
                    <Title resid="decryptButtonTitle" />
                    <Description resid="decryptButtonDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="decrypt16" />
                    <bt:Image size="32" resid="decrypt32" />
                    <bt:Image size="64" resid="decrypt64" />
                    <bt:Image size="80" resid="decrypt80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="decryptTaskPaneUrl" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                  <Group id="xdrWriteGroup">
                      <Label resid="xdrGroupLabel" />
                      <Control xsi:type="Button" id="encryptButton2">
                          <Label resid="encryptButtonLabel" />
                          <Supertip>
                              <Title resid="encryptButtonTitle" />
                              <Description resid="encryptButtonDesc" />
                          </Supertip>
                          <Icon>
                              <bt:Image size="16" resid="account16" />
                              <bt:Image size="32" resid="account32" />
                              <bt:Image size="64" resid="account64" />
                              <bt:Image size="80" resid="account80" />
                          </Icon>
                          <Action xsi:type="ShowTaskpane">
                              <SourceLocation resid="encryptTaskPaneUrl" />
                          </Action>
                      </Control>
                  </Group>
              </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="account16" DefaultValue="/outlook/Images/Account16.png"/>
        <bt:Image id="account32" DefaultValue="/outlook/Images/Account32.png"/>
        <bt:Image id="account64" DefaultValue="/outlook/Images/Account64.png"/>
        <bt:Image id="account80" DefaultValue="/outlook/Images/Account80.png"/>
        <bt:Image id="encrypt16" DefaultValue="/outlook/Images/Encrypt16.png"/>
        <bt:Image id="encrypt32" DefaultValue="/outlook/Images/Encrypt32.png"/>
        <bt:Image id="encrypt64" DefaultValue="/outlook/Images/Encrypt64.png"/>
        <bt:Image id="encrypt80" DefaultValue="/outlook/Images/Encrypt80.png"/>
        <bt:Image id="decrypt16" DefaultValue="/outlook/Images/Decrypt16.png"/>
        <bt:Image id="decrypt32" DefaultValue="/outlook/Images/Decrypt32.png"/>
        <bt:Image id="decrypt64" DefaultValue="/outlook/Images/Decrypt64.png"/>
        <bt:Image id="decrypt80" DefaultValue="/outlook/Images/Decrypt80.png"/>
        <bt:Image id="attach16" DefaultValue="/outlook/Images/Attach16.png"/>
        <bt:Image id="attach32" DefaultValue="/outlook/Images/Attach32.png"/>
        <bt:Image id="attach64" DefaultValue="/outlook/Images/Attach64.png"/>
        <bt:Image id="attach80" DefaultValue="/outlook/Images/Attach80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="functionFile" DefaultValue="/outlook/Functions/Html/FunctionFile.html"/>
        <bt:Url id="encryptTaskPaneUrl" DefaultValue="/outlook/Functions/Html/EncryptTaskPane.html"/>
        <bt:Url id="decryptTaskPaneUrl" DefaultValue="/outlook/Functions/Html/DecryptTaskPane.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="xdrGroupLabel" DefaultValue="XDR"/>
        <bt:String id="encryptButtonLabel"  DefaultValue="Open XDR App"/>
        <bt:String id="encryptButtonTitle" DefaultValue="XDR Manager"/>
        <bt:String id="decryptButtonLabel" DefaultValue="Open XDR App"/>
        <bt:String id="decryptButtonTitle" DefaultValue="Decrypt your current email"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="encryptButtonDesc" DefaultValue="Login, Compose, Encrypt and Send"/>
        <bt:String id="decryptButtonDesc" DefaultValue="Automatically decrypt current email and display output"/>
      </bt:LongStrings>
    </Resources>
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
        <Description resid="residDescription" />
        <Requirements>
            <bt:Sets DefaultMinVersion="1.5">
                <bt:Set Name="Mailbox" />
            </bt:Sets>
        </Requirements>
        <Hosts>
            <Host xsi:type="MailHost">
                <DesktopFormFactor>
                    <FunctionFile resid="functionFile" />
                    <ExtensionPoint xsi:type="MessageReadCommandSurface">
                        <OfficeTab id="TabDefault">
                            <Group id="xdrReadGroup">
                                <Label resid="xdrGroupLabel" />
                                <Control xsi:type="Button" id="decryptButton">
                                    <Label resid="decryptButtonLabel" />
                                    <Supertip>
                                        <Title resid="decryptButtonTitle" />
                                        <Description resid="decryptButtonDesc" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="decrypt16" />
                                        <bt:Image size="32" resid="decrypt32" />
                                        <bt:Image size="64" resid="decrypt64" />
                                        <bt:Image size="80" resid="decrypt80" />
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="decryptTaskPaneUrl" />
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                    <ExtensionPoint xsi:type="MessageComposeCommandSurface">
                        <OfficeTab id="TabDefault">
                            <Group id="xdrWriteGroup">
                                <Label resid="xdrGroupLabel" />
                                <Control xsi:type="Button" id="encryptButton2">
                                    <Label resid="encryptButtonLabel" />
                                    <Supertip>
                                        <Title resid="encryptButtonTitle" />
                                        <Description resid="encryptButtonDesc" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="account16" />
                                        <bt:Image size="32" resid="account32" />
                                        <bt:Image size="64" resid="account64" />
                                        <bt:Image size="80" resid="account80" />
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="encryptTaskPaneUrl" />
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                </DesktopFormFactor>
                <!--<MobileFormFactor>
                    <FunctionFile resid="functionFile2" />
                    <ExtensionPoint xsi:type="MobileMessageComposeCommandSurface">
                        <Group xsi:type="MobileGroup" id="xdrMobileWriteGroup">
                            <Label resid="xdrGroupLabel"/>
                            <Control xsi:type="MobileButton" id="mobileEncryptButton">
                                <Label resid="encryptButtonLabel"/>
                                <Icon xsi:type="bt:MobileIconList">
                                    <bt:Image size="25" scale="1" resid="account25" />
                                    <bt:Image size="25" scale="2" resid="account25" />
                                    <bt:Image size="25" scale="3" resid="account25" />
                                    <bt:Image size="32" scale="1" resid="account32" />
                                    <bt:Image size="32" scale="2" resid="account32" />
                                    <bt:Image size="32" scale="3" resid="account32" />
                                    <bt:Image size="48" scale="1" resid="account48" />
                                    <bt:Image size="48" scale="2" resid="account48" />
                                    <bt:Image size="48" scale="3" resid="account48" />
                                </Icon>
                                <Action xsi:type="ShowTaskpane">
                                    <SourceLocation resid="encryptTaskPaneUrl" />
                                </Action>
                            </Control>
                        </Group>
                    </ExtensionPoint>
                    <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
                        <Group xsi:type="MobileGroup" id="xdrMobileReadGroup">
                            <Label resid="xdrGroupLabel"/>
                            <Control xsi:type="MobileButton" id="mobileDecryptButton">
                                <Label resid="decryptButtonLabel"/>
                                <Icon xsi:type="bt:MobileIconList">
                                    <bt:Image size="25" scale="1" resid="decrypt25" />
                                    <bt:Image size="25" scale="2" resid="decrypt25" />
                                    <bt:Image size="25" scale="3" resid="decrypt25" />
                                    <bt:Image size="32" scale="1" resid="decrypt32" />
                                    <bt:Image size="32" scale="2" resid="decrypt32" />
                                    <bt:Image size="32" scale="3" resid="decrypt32" />
                                    <bt:Image size="48" scale="1" resid="decrypt48" />
                                    <bt:Image size="48" scale="2" resid="decrypt48" />
                                    <bt:Image size="48" scale="3" resid="decrypt48" />
                                </Icon>
                                <Action xsi:type="ShowTaskpane">
                                    <SourceLocation resid="decryptTaskPaneUrl" />
                                </Action>
                            </Control>
                        </Group>
                    </ExtensionPoint>
                </MobileFormFactor>-->
            </Host>
        </Hosts>
        <Resources>
            <bt:Images>
                <bt:Image id="account16" DefaultValue="/outlook/Images/Account16.png"/>
                <bt:Image id="account25" DefaultValue="/outlook/Images/Account25.png"/>
                <bt:Image id="account32" DefaultValue="/outlook/Images/Account32.png"/>
                <bt:Image id="account48" DefaultValue="/outlook/Images/Account48.png"/>
                <bt:Image id="account64" DefaultValue="/outlook/Images/Account64.png"/>
                <bt:Image id="account80" DefaultValue="/outlook/Images/Account80.png"/>
                <bt:Image id="encrypt16" DefaultValue="/outlook/Images/Encrypt16.png"/>
                <bt:Image id="encrypt32" DefaultValue="/outlook/Images/Encrypt32.png"/>
                <bt:Image id="encrypt64" DefaultValue="/outlook/Images/Encrypt64.png"/>
                <bt:Image id="encrypt80" DefaultValue="/outlook/Images/Encrypt80.png"/>
                <bt:Image id="decrypt16" DefaultValue="/outlook/Images/Decrypt16.png"/>
                <bt:Image id="decrypt25" DefaultValue="/outlook/Images/Decrypt25.png"/>
                <bt:Image id="decrypt32" DefaultValue="/outlook/Images/Decrypt32.png"/>
                <bt:Image id="decrypt48" DefaultValue="/outlook/Images/Decrypt48.png"/>
                <bt:Image id="decrypt64" DefaultValue="/outlook/Images/Decrypt64.png"/>
                <bt:Image id="decrypt80" DefaultValue="/outlook/Images/Decrypt80.png"/>
                <bt:Image id="attach16" DefaultValue="/outlook/Images/Attach16.png"/>
                <bt:Image id="attach32" DefaultValue="/outlook/Images/Attach32.png"/>
                <bt:Image id="attach64" DefaultValue="/outlook/Images/Attach64.png"/>
                <bt:Image id="attach80" DefaultValue="/outlook/Images/Attach80.png"/>
            </bt:Images>
            <bt:Urls>
                <bt:Url id="functionFile2" DefaultValue="/outlook/Functions/Html/FunctionFile.html"/>
                <bt:Url id="encryptTaskPaneUrl" DefaultValue="/outlook/Functions/Html/EncryptTaskPane.html"/>
                <bt:Url id="decryptTaskPaneUrl" DefaultValue="/outlook/Functions/Html/DecryptTaskPane.html"/>
            </bt:Urls>
            <bt:ShortStrings>
                <bt:String id="xdrGroupLabel" DefaultValue="XDR"/>
                <bt:String id="encryptButtonLabel"  DefaultValue="Open XDR App"/>
                <bt:String id="encryptButtonTitle" DefaultValue="XDR Manager"/>
                <bt:String id="decryptButtonLabel" DefaultValue="Open XDR App"/>
                <bt:String id="decryptButtonTitle" DefaultValue="Decrypt your current email"/>
            </bt:ShortStrings>
            <bt:LongStrings>
                <bt:String id="residDescription" DefaultValue="XDR Plugin"/>
                <bt:String id="encryptButtonDesc" DefaultValue="Login, Compose, Encrypt and Send"/>
                <bt:String id="decryptButtonDesc" DefaultValue="Automatically decrypt current email and display output"/>
            </bt:LongStrings>
        </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

我已经阅读了文档,清单应该格式正确。我无法发现问题,谢谢您!

1 个答案:

答案 0 :(得分:0)

xsi:type元素中删除Group有助于解决该问题。 Group元素的文档在属性部分仅提及id,而没有提及xsi:type

仅供参考,Outlook Mobile 不支持撰写模式,因此MobileMessageComposeCommandSurface无效。