Assets.car can't contain 16-bit or P3 assets if the app supports iOS 8 or earlier?

前端 未结 14 528
执念已碎
执念已碎 2020-12-04 12:52

Has anyone come across this error when uploading to iTunesConnect. Upload precess gets to \"Verifying assets with iTunes store\" the I get the following error:

相关标签:
14条回答
  • 2020-12-04 12:56

    Fixing by one command via terminal:

    find . -type f -name '*.png' -print0 | while IFS= read -r -d '' file; do sips --matchTo '/System/Library/ColorSync/Profiles/sRGB Profile.icc' "$file" --out "$file"; done
    
    0 讨论(0)
  • 2020-12-04 12:57

    Once you identify the images as fancy explained in his/her reply, you can use the Preview app to change the color profile (in Preview app, go to Tools -> Assign profile...) from "Adobe RGB (1998)" (or whatever is your profile image) to "sRGB IEC61966-2.1"...then you only has to import the amended images in your project and rebuild it.

    0 讨论(0)
  • 2020-12-04 12:57

    My answer is simple, find 16-bit color images and convert to 8-bit depth color ones. If it's not 16-bit, it won't be converted again, since sips -m ... is not idempotent, which means the converted image will be modified again when executed again on the same image file.

    # before run the commands, cd to the folder which includes all suspicious images.
    while IFS= read -d '' -r file; do if [ $(file "$file" | grep -c '16-bit') -eq 1 ]; then sips -m '/System/Library/Colorsync/Profiles/sRGB Profile.icc' "$file"; fi done < <(find . -print0)
    

    Be more clear, save it as a bash shell file as follows,

    #/bin/bash
    
    # Before run the shell script, 
    # cd to the folder which includes all suspicious images
    
    while IFS= read -d '' -r file; do 
      if [ $(file "$file" | grep -c '16-bit') -eq 1 ]; then
        sips -m '/System/Library/Colorsync/Profiles/sRGB Profile.icc' "$file"; 
      fi 
    done < <(find . -print0)
    
    0 讨论(0)
  • 2020-12-04 12:59

    use these command to install imagemagick

    brew update
    brew install imagemagick --with-little-cms --with-little-cms2
    

    now, use following steps to check 16 depth assets used in project:

    1) Change the extension of .ipa to .zip. 
    
    2) Expand the .zip file. This will produce a Payload folder containing your .app bundle. 
    
    3) Open a terminal and change the working directory to the top level of your .app bundle cd path/to/Payload/your.app
    
    4) find . -name "*.png" -print0 | xargs -0 identify | grep "16-bit" | awk '{print $1;}' | xargs mogrify -depth 8
    
      this command will show you corrupted images. Replace these images with 8 depth images.
    
    0 讨论(0)
  • 2020-12-04 13:03

    Collect A Copy Of All Your Png’s For In A Folder

    For Ex. Name The Folder image and put it in the desktop

    Then Go To Terminal And Change Directory To The Folder you Have Moved The Photos In

    cd desktop/image

    Run This

    sips -g all *.png >print.txt

    You will Find A File Named Print.txt Is Created In The Folder (inside image)

    Open It And Search In It For

    bitsPerSample:

    If you find The Number Next To it Is Different Than 8 Then You Got The Mistaken Image

    Open This Image (Or Images) In The Preview App Then Export It To The Same Format And Make Sure To Select 8 Bit Color Depth (Note If You Select Multiple Images You Don't see The Color Depth Selection But It Is Still Working)

    Copy And Replace The New Images With The Old Once.

    Also Do The Following As An Addition To What I Have Posted Earlier

    This Step Is Applied For All Photos Open Each Or All Photos in Preview App Click On Tools > Adjust Size > Then set dpi to 72 And Tools > Assign Profile > Then Select Generic RGB Profile

    Thats All

    0 讨论(0)
  • 2020-12-04 13:09

    Thanks to @fancy answer I understood that problem was in image's property "space" that has value RGB 16bit. It needs to be changed to 8bit sRGB. I must support iOS7 clients, so I can't just change deployment target to 9.3.

    So what i did: 1) I used simple script (see below) to recursively find all *.png images and change property. 2) Then I have rebuild .ipa file. Application Loader didn't show any error.

    #!/bin/sh
    
    files=`find . -name "*.png"`
    
    for i in ${files[@]}; do
        SOURCE_FILE=${i}
        DESTINATION_FILE=$SOURCE_FILE
        sips \
        --matchTo '/System/Library/ColorSync/Profiles/sRGB Profile.icc' \
        "$SOURCE_FILE" \
        --out "$DESTINATION_FILE"
    done
    
    exit 0
    
    0 讨论(0)
提交回复
热议问题