简体   繁体   English

离子IOS图标无法复制到ios平台

[英]ionic IOS icons not copy to ios platform

i have created the icons and splash images with ionic resources and it worked fine. 我已经创建了图标,并用ionic resources飞溅了图像,并且效果很好。 But they got not copied to platforms/ios folder. 但是他们没有被复制到platforms/ios文件夹。

I tried to remove and add the ios platform with ionic cordova platform rm ios and then ionic cordova platform add ios 我试图删除并添加带有ionic cordova platform rm ios的ios平台,然后ionic cordova platform add ios

Here the config file: 这里的配置文件:

<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>

Is there a way to copy the files by hand or add them in xCode? 有没有办法手动复制文件或将其添加到xCode中? (using ionic version 3.19.1) (使用离子版本3.19.1)

This is the folder structure for where to manually copy your icons and splash images: 这是用于手动复制图标和启动图像的文件夹结构:

Place all your icons in the AppIcon.appiconset folder: 将所有图标放在AppIcon.appiconset文件夹中:

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

Place the Default@2x~universal~anyany.png splash in the LaunchStoryboard.imageset folder: 将Default@2x~universal~anyany.png启动画面放置在LaunchStoryboard.imageset文件夹中:

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

Place the rest of your splash images in the LaunchImage.launchimage folder: 将其余的启动画面放置在LaunchImage.launchimage文件夹中:

platforms/ios/YOURAPPNAME/Images.xcassets/LaunchImage.launchimage

Xcode should automatically detect the images and will load them into the app. Xcode应该会自动检测图像并将其加载到应用程序中。 I hope this helps! 我希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM