Skip to content

Instantly share code, notes, and snippets.

@zqqf16
Created March 28, 2017 07:41
Show Gist options
  • Save zqqf16/84a35db2098ba8684f5197486fff8439 to your computer and use it in GitHub Desktop.
Save zqqf16/84a35db2098ba8684f5197486fff8439 to your computer and use it in GitHub Desktop.
A "post action" script to check Assets.cer in iOS App
#!/bin/bash
# Add this script to your Scheme->Build->Post Actions
ASSETS_PATH=${CODESIGNING_FOLDER_PATH}/Assets.car
xcrun --sdk ${PLATFORM_NAME} assetutil --info ${ASSETS_PATH} | grep -q "DisplayGamut.*P3"
if [ $? -eq 0 ]; then
osascript -e 'tell app "System Events" to display dialog "Some images are in Display P3 gamut, which is not supported in iOS 9.0~9.2"'
# xcrun --sdk ${PLATFORM_NAME} assetutil --info ${ASSETS_PATH} > /tmp/assets.json
# open /tmp/assets.json
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment