0
2

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 3 years have passed since last update.

iPhoneアプリ用アイコン

Last updated at Posted at 2021-06-10

はじめに

iPhoneアプリを新規に登録したのだけど
相変わらずめんどくさかったので
自分用の備忘録も兼ねた記録を残しておきます📝

もっとも時間がかかった事

アプリアイコンの用意

まぁ普通に絵心がないのでアイコンを作るのにも時間がかかるのですが
基本の画像を作ったあと、複数のサイズを用意する必要があります。

一番大きい 1024x1024だけ登録したら
いい感じにリサイズして他のサイズにも使ってくれればいいのに🥺

おそらく世の中には何か簡単なツールがあるのではないかと思うけど😅

以下のようなスクリプトを作って1つのアイコンイメージから
一気に作り出しました👍

resize.sh
# !/bin/sh
for size in 40 60 58 87 80 120 180 20 29 76 152 167 1024
do
    echo convert -resize $size $1 icon_$size.png
    convert -resize $size $1 icon_$size.png
done

自分古い人間なので ImageMagick 最強ですわ💪

スクリーンショットの用意

コレはiPhoneで実際に動かした画面をスナップショットで大丈夫だと思ったら
画像サイズが異なるからダメって😱
なんでなん?

シミュレータを使うと大丈夫なのかな?
ということでシミュレータの Save Screen で画像を取り出して...
もダメでした😵

ここはまた ImageMagick さんにお願いして🙏

 convert -resize 1242x2208 IMG_4608.PNG screen.png

ところが何故かこれもNGに😫
調べると 1241x2208 サイズになってました😵‍💫

 convert -resize 1242x2208! IMG_4608.PNG screen.png

これでOKでした✌️

必要なスクリーンショットは以下
iPhone6.5インチ iPhone6.5インチ iPadPro 12.9インチ(3世代) iPadPro 12.9インチ(2世代)
の4種類なのでスクリプトを作るほどのこともないかな

あとiPadProの2種類はどう違うのだろ🤔
そしてiPadProの画像はシミュレータの Save Screenがそのまま使えました😮‍💨

iPad対応

iPad対応は考えていなかったのですが、公開時にはiPadでの動作の確認も必要になります。
今回のアプリは縦方向固定にしていたのだけど、iPadで動かすと固定になっていなかった😳

この問題はアプリの TARGET > General > Deployment Info > Device Orientation の設定だけだと
Info.plist 内の iPhone用の設定しか変更されないようでした。

Info.plist(編集前)
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>

ここから UISupportedInterfaceOrientations~ipad 以下の内容を編集すると
iPadでも縦方向固定にできました。

Info.plist(編集後)
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
	</array>

最後に

WWDC21で話が出ていたXcode Cloud の項目が App Store Connect にも増えていて
ますます活気づいてきている感もあり、今後の SwiftUI, Xcode の発展を楽しみつつ
ついて行ける限りはついて行きたいものです🤗

追記

Guideline 2.1 - Information Needed
に引っかかり、Demo Video を取って再審査にかけました😰

無事に公開されました🤗

0
2
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
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?