用于支持移动设备(mobileFormFactor)安装的Outlook Web加载项清单更改失败 [英] Outlook web add-in manifest change to support mobile devices (mobileFormFactor) installation fails

查看:93
本文介绍了用于支持移动设备(mobileFormFactor)安装的Outlook Web加载项清单更改失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过在清单文件中进行以下更改来启用Outlook Web Add-in的移动设备,但安装失败并引发以下错误.

I'm trying to enable outlook web add-in for mobile by making below changes in manifest file but the installation fails and throws below error.

错误消息:

清单文件:

<?xml version="1.0" encoding="UTF-8"?>
    <!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
    <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">

 <!-- Begin Basic Settings: Add-in metadata, used for all versions of 
Office unless override provided. -->

 <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this 
  manifest ensure that you change this id to a new GUID. -->
  <Id>3a734653-a3ab-4021-ad93-8df9fce4e1e9</Id>

 <!--Version. Updates from the store only get triggered if there is a 
  version change. -->
 <Version>1.0.0.0</Version>
 <ProviderName>ABCTech</ProviderName>
 <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various 
  places of the Office UI such as the add-ins dialog. -->
 <DisplayName DefaultValue="testMobile" />
 <Description DefaultValue="testMobile"/>
 <IconUrl DefaultValue="~remoteAppUrl/Images/icon64.png"/>

 <SupportUrl DefaultValue="http://www.abctech.com" />
 <!-- Domains that will be allowed when navigating. For example, if you 
   use ShowTaskpane and then have an href link, navigation will only be 
 allowed if the domain is on this list. -->


    <AppDomains>
    <AppDomain>AppDomain1</AppDomain>
    <AppDomain>AppDomain2</AppDomain>
    <AppDomain>AppDomain3</AppDomain>
  </AppDomains>
  <!--End Basic Settings. -->
   <Hosts>
     <Host Name="Mailbox" />
    </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/MessageRead.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</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>
          <!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
          <FunctionFile resid="functionFile" />

          <!-- Message Read -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
            <OfficeTab id="TabDefault">
              <!-- Up to 6 Groups added per Tab -->
              <Group id="msgReadGroup">
                <Label resid="groupLabel" />
                <!-- Launch the add-in : task pane button -->
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <Label resid="paneReadButtonLabel" />
                  <Supertip>
                    <Title resid="paneReadSuperTipTitle" />
                    <Description resid="paneReadSuperTipDescription" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16" />
                    <bt:Image size="32" resid="icon32" />
                    <bt:Image size="80" resid="icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="messageReadTaskPaneUrl" />
                  </Action>
                </Control>
                <!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="~remoteAppUrl/Images/icon16.png"/>
        <bt:Image id="icon32" DefaultValue="~remoteAppUrl/Images/icon32.png"/>
        <bt:Image id="icon80" DefaultValue="~remoteAppUrl/Images/icon80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>
        <bt:Url id="messageReadTaskPaneUrl" DefaultValue="~remoteAppUrl/MessageRead.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="My Add-in Group"/>
        <bt:String id="customTabLabel"  DefaultValue="My Add-in Tab"/>
        <bt:String id="paneReadButtonLabel" DefaultValue="Display all properties"/>
        <bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available properties. This is an example of a button that opens a task pane."/>
      </bt:LongStrings>
    </Resources>

    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Hosts>
        <Host xsi:type="MailHost">
          <MobileFormFactor>
            <FunctionFile resid="functionFile" />
            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <Group id="mobileMsgRead">
                <Label resid="groupLabel"/>
              <Control id="mblRestButton" xsi:type="MobileButton">
                <Label resid="mblButtonLabel"/>
                <Icon xsi:type="bt:MobileIconList">
                  <bt:Image size="25" scale="1" resid="green-icon-32" />
                  <bt:Image size="25" scale="2" resid="green-icon-32" />
                  <bt:Image size="25" scale="3" resid="green-icon-32" />

                  <bt:Image size="32" scale="1" resid="green-icon-32" />
                  <bt:Image size="32" scale="2" resid="green-icon-32" />
                  <bt:Image size="32" scale="3" resid="green-icon-32" />

                  <bt:Image size="48" scale="1" resid="green-icon-32" />
                  <bt:Image size="48" scale="2" resid="green-icon-32" />
                  <bt:Image size="48" scale="3" resid="green-icon-32" />
                </Icon>
                <Action xsi:type="ShowTaskpane">
                  <SourceLocation resid="restMobileTaskPaneUrl"/>
                </Action>
              </Control>
              </Group>
            </ExtensionPoint>
          </MobileFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <!-- Green icon -->
          <bt:Image id="green-icon-16" DefaultValue="~remoteAppUrl/Images/icon16.png"/>
          <bt:Image id="green-icon-32" DefaultValue="~remoteAppUrl/Images/icon32.png"/>
          <bt:Image id="green-icon-80" DefaultValue="~remoteAppUrl/Images/icon80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="functionFile" DefaultValue="~remoteAppUrl/FunctionFile/Functions.html"/>
          <bt:Url id="restMobileTaskPaneUrl" DefaultValue="~remoteAppUrl/home.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue="Add-in Demo"/>
          <!-- Read mode -->
          <bt:String id="mblButtonLabel" DefaultValue="Test REST Calls"/>
        </bt:ShortStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

但是相同的清单文件适用于台式机版本.上面的清单与台式机生产版本中的清单具有相同的结构.

But the same manifest file works for the desktop version.The above manifest follows same structure as that of manifest in production which is a desktop version.

要求是为Android和IOS的移动设备支持相同的插件.

The requirement is to support the same plugin for mobile devices for both android and IOS.

这是链接,其中接下来,我添加了用于支持移动设备的mobileFormFactor元素.

This is the link which I followed to add mobileFormFactor element which is used to support Mobile Device.

------------------------------编辑后--------------- ---------------------

------------------------------After Edit ------------------------------------

这里是缺少的部分,需要在MobileFormFactor之前添加

Here is the missing part which needs to be added before MobileFormFactor

<DesktopFormFactor>
        <FunctionFile resid="functionFile" />
        <ExtensionPoint xsi:type="MessageReadCommandSurface">
          <!--Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
          <OfficeTab id="TabDefault">
            <!--  Up to 6 Groups added per Tab  -->
            <Group id="msgReadGroup">
              <Label resid="groupLabel"/>
              <!--  Launch the add-in : task pane button  -->
              <Control xsi:type="Button" id="msgReadOpenPaneButton">
                <Label resid="paneReadButtonLabel"/>
                <Supertip>
                  <Title resid="paneReadSuperTipTitle"/>
                  <Description resid="paneReadSuperTipDescription"/>
                </Supertip>
                <Icon>
                  <bt:Image size="16" resid="icon16"/>
                  <bt:Image size="32" resid="icon32"/>
                  <bt:Image size="80" resid="icon80"/>
                </Icon>
                <Action xsi:type="ShowTaskpane">
                  <SourceLocation resid="messageReadTaskPaneUrl"/>
                </Action>
              </Control>
              <!--Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
            </Group>
          </OfficeTab>
        </ExtensionPoint>
        <!--Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee-->
      </DesktopFormFactor>

推荐答案

将DesktopFormFactor及其相应资源添加到VersionOverridesV1_1类型的VersionOverride中有助于解决此问题.

Adding DesktopFormFactor and it's corresponding resources to VersionOverrides of type VersionOverridesV1_1 helps in overcoming this issue.

这篇关于用于支持移动设备(mobileFormFactor)安装的Outlook Web加载项清单更改失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆