离子IOS图标不能复制到ios平台

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了离子IOS图标不能复制到ios平台相关的知识,希望对你有一定的参考价值。

我用ionic resources创建了图标和启动图像,它工作正常。但他们没有被复制到platforms/ios文件夹。

我试图删除并添加qosxswpoi和ionic cordova platform rm ios的ios平台

这里是配置文件:

ionic cordova platform add ios

有没有办法手动复制文件或将它们添加到xCode? (使用离子版3.19.1)

答案

这是手动复制图标和启动图像的文件夹结构:

将所有图标放在AppIcon.appiconset文件夹中:

<platform name="ios">
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>

将Default@2x~universal~anyany.png启动放在LaunchStoryboard.imageset文件夹中:

platforms/ios/YOURAPPNAME/Images.xcassets/AppIcon.appiconset

将其余的启动图像放在LaunchImage.launchimage文件夹中:

platforms/ios/YOURAPPNAME/Images.xcassets/LaunchStoryboard.imageset

Xcode应该自动检测图像并将它们加载到应用程序中。我希望这有帮助!

以上是关于离子IOS图标不能复制到ios平台的主要内容,如果未能解决你的问题,请参考以下文章

如何更改类似于ios-outline的材料设计的离子图标?

关于键盘下一步并使用离子框架进入ios平台

如何在带有电容器的离子中重命名平台“App”

在 Windows 上安装离子推送插件(适用于 iOS)时出错

iOS)我应该在哪里复制和粘贴 facebook XML 片段?

尽管成功运行了离子资源命令,离子应用程序图标和闪屏仍显示科尔多瓦默认图标