在Safari浏览器上使用ios 9.1添加到主屏幕图标不会填充在Ipad上

时间:2015-11-18 10:46:32

标签: ios ipad apple-touch-icon

我使用下面的代码行来填充添加到主屏幕图标,但是在点击添加到主屏幕图标时它仍会显示整个页面的图像。

@model TeamBuildingCompetition.ViewModels.EditGameVM

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout_new.cshtml";
}
<script>
    tinymce.init({ selector: '#description' });
    tinymce.init({ selector: '#gameRule' });
</script>

@using (Html.BeginForm("Update", "Game", FormMethod.Post))
{
    @Html.AntiForgeryToken()

    <section id="middle">
        <div class="container">
            <div class="form-horizontal">
                <div class="center"><h1>Edit Games </h1></div>
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                @Html.HiddenFor(model => model.gameID)
                <div class="form-group">
                    @Html.LabelFor(model => model.gameName, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-8">
                        @Html.EditorFor(model => model.gameName, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.gameName, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-8">
                        @Html.EditorFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.gameRule, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-8">
                        @Html.EditorFor(model => model.gameRule, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.gameRule, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.gamePicture, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-8">
                        @Html.EditorFor(model => model.gamePicture, new { htmlAttributes = new { @class = "form-control" }})
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="Create" class="btn btn-default" />
                    </div>
                </div>
            </div>
        </div>
    </section>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

我确信这张图片的路径是正确的。

我已尝试过几乎所有可在互联网上使用的解决方案,包括这个网站,但似乎并没有让它发挥作用。 如果需要提供任何其他信息,请通知我。

https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW4

任何帮助点都会有很大的帮助。

2 个答案:

答案 0 :(得分:2)

请确保您不在开发服务器或您需要获取证书的站点上。我遇到了类似的问题,最终通过将资产转移到生产srvr来解决。

我在物理(实时)设备上进行了测试,并使用BrowserStack来访问我没有的设备和浏览器,一切都按预期工作。

答案 1 :(得分:1)

由于 https证书问题,我无法在“添加到主屏幕”选项中填充图像。虽然我可以使用图像的路径浏览图像,但令人惊讶的是它没有填充主屏幕图像在ipad上。

想了解如何在ipad中调试safari浏览器的几个答案。

我为设备添加了新证书,并且添加到主屏幕图标图像开始按预期显示。

相关问题