앱을 심사에 넣기 위해 xcode에서 빌드 중 The large app icon in the asset catalog in “Runner.app” can’t be transparent or contain an alpha channel.
이와 같은 에러가 발생하였습니다. 간단히 말하면 앱아이콘에서 투명이미지를 포함했기 때문에 발생한 에러입니다.
이 에러를 해결하기 위한 방법은 아래와 같습니다.
목차
2. flutter_icon 라이브러리 등록 및 앱 아이콘 등록
앱 아이콘 이미지 파일에서 투명 부분 없애기
https://onlinepngtools.com/fill-transparent-png-pixels
Fill Transparent PNG Regions
World's simplest online utility that replaces transparent color in PNGs. Free, quick, and powerful. Import a PNG – replace transparent PNG sections.
onlinepngtools.com
위 사이트에서 준비한 앱 아이콘 이미지 파일을 넣어 투명 부분을 없앤 이미지를 반환받습니다.
flutter_icon 라이브러리 등록 및 앱 아이콘 등록
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.7.5
flutter_icons:
image_path: "icon/icon.png"
android: true
ios: true
위와 같은 형식으로 flutter_launcher_icons 라이브러리와 flutter_icons 라이브러리를 등록합니다. 그리고 flutter_icons 하위에 image_path에 앱아이콘 이미지 디렉터리를 넣어주고, android, ios에 true를 넣어줍니다.
터미널 명령어 실행
아래 두 개의 명령을 터미널에서 실행해 줍니다.
두 번째 명령은 특히나 중요합니다. 그 이유는 pub get 명령어를 실행시켜 pubspec.yaml을 업데이트해도 runner에 각 해상도 별로 앱 아이콘 이미지를 생성해주지 않기 때문에 두번째 명령어를 실행시켜 각 해상도별 앱 아이콘 이미지를 생성해주어야 합니다.
$ flutter pub get
$ flutter pub pub run flutter_launcher_icons:main
이 포스팅은 아래 링크의 글을 참고하여 작성하였습니다.
https://github.com/fluttercommunity/flutter_launcher_icons/issues/172
iOS Icons Not Valid - Generated with transparency which is not allowed · Issue #172 · fluttercommunity/flutter_launcher_icons
ℹ️ Info Version: 0.7.5 💬 Description Receiving an error when attempting to validate my app during submission to App Store Connect. "Invalid App Store Icon. The App Store Icon in the asset catalog i...
github.com
'개발 > FLUTTER' 카테고리의 다른 글
[Flutter] 애플로그인 구현하기 (1) | 2024.03.23 |
---|---|
[Flutter] 깨진 한글 json string 정상적으로 디코딩 하기 (0) | 2024.03.22 |
[Flutter] dio로 쉽게 서버에 image 파일 업로드하기 (0) | 2024.02.13 |
[Flutter] image 파일의 image 사이즈 조절하기 (0) | 2024.02.11 |
[Flutter] 이미지 파일 용량 줄이기 (0) | 2024.02.11 |