'ionic cordova resources' fails on iOS


#1

‘ionic cordova resources’ fails on iOS with the following error:

Error: encountered bad status code (400) for https://res.ionic.io/api/v1/transform
body: {"Error":"source image 48x48 too small for icon-50@2x.png, requires at least 100x100 source file"}

My system info:

global packages:

    @ionic/cli-utils : 1.5.0
    Cordova CLI      : 7.0.1 
    Ionic CLI        : 3.5.0

local packages:

    @ionic/app-scripts              : 2.0.2
    @ionic/cli-plugin-cordova       : 1.4.1
    @ionic/cli-plugin-ionic-angular : 1.3.2
    Cordova Platforms               : ios 4.4.0
    Ionic Framework                 : ionic-angular 3.5.3

System:

    Node       : v8.1.3
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b 
    ios-deploy : 1.9.1 
    ios-sim    : not installed
    npm        : 5.3.0 

The fact that it tries to run something from V1 looks suspicious, but for the life of mine, I can’t understand where the problem is. I performed quite extensive search on the internet which turned out nothing helpful and I ran out of options by now.

Any help will be highly appreciated.

Thanks.


#2

seems like your source file is too small, try it with a higher resolution file and name it to icon.png and place it under your resources folder


#3

Thanks for your reply @menghao93.

I have icon.png file in resource folder. It works fine on Android and it worked on iOS before. It stopped working on iOS after I updated everything to latest versions.

As for resolution, what resolution exactly you’re referring to? Can you please give me the numbers? Also, isn’t it what ‘resources’ command supposed to do? To build png files that are best suited for each platform?


#4

The required size is right in the error message:


#5

Well, I replaced my icon.png file with original ionic icon file and now I’m getting this error:

Error: encountered bad status code (400) for https://res.ionic.io/api/v1/transform
body: {"Error":"source image 2208x2208 too small for Default-Landscape@~ipadpro.png, requires at least 2732x2048 source file"}```


Default-Landscape@~ipadpro.png is a file which is supposed to be generated by this command from splash.png, which, in my case,  is the default ionic file . Which means it's supposed to work ( and it did before) without any problems. 

It seems to me these errors has nothing to do with real files sizes.  It's something else.  

More ideas?

#6

How big was your previous icon?

Also the real, current default splash.png is exactly 2732x2732 px big:
https://raw.githubusercontent.com/ionic-team/ionic2-app-base/master/resources/splash.png

Maybe you have an older one… these tend to change whenever Apple or Google release bigger devices that show even more pixels by default.