1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Xcode】Macアプリをリリースしようとしたらアイコン関係でエラー出た

Posted at

状況

xcodeバージョン
14.1 Release Candidate 2

ちなみにRC版だからかと思ってリリース版の14.0でも試してみましたがダメでした

エラー

スクリーンショット 2022-10-26 20.09.38.png

Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 1fbe109c-5108-4ff3-9ad9-07d19a9a98bc)

原因

不明

解決方法

icon.icnsを作成して設定する

icon.icnsを作成する

どこでも良いのでicon.iconsetという名前でフォルダを作成します
スクリーンショット 2022-10-26 20.15.29.png

512x512サイズのアイコンをicon_512x512.png
1024x1024サイズのアイコンをicon_512x512@2x.png

という名前でicon.iconsetの中にいれます。

スクリーンショット 2022-10-26 20.17.53.png

icon.iconsetがあるディレクトリに移動します
スクリーンショット 2022-10-26 20.21.14.png

下記のコマンドを実行します
スクリーンショット 2022-10-26 20.21.45.png

iconutil --convert icns icon.iconset

作成できました
スクリーンショット 2022-10-26 20.22.25.png

icon.icnsを設定する

Assets内にあるAppIconを削除します
スクリーンショット 2022-10-26 20.25.00.png
削除しました
スクリーンショット 2022-10-26 20.25.22.png

先ほど作成したicon.icnsをXcode内にドラッグします
スクリーンショット 2022-10-26 20.26.08.png
下記の設定にして「Finish」を選択します
スクリーンショット 2022-10-26 20.26.15.png
Info.plistIcon fileを追加します
スクリーンショット 2022-10-26 20.28.24.png
Icon fileicon.icnsを設定します
スクリーンショット 2022-10-26 20.29.56.png

おわり

この対策方法が正しいかはわかりませんがエラーは出なくなりました

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?