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

【2024年6月】Xcodeでx64とarm64に対応した.appを書き出す方法 (macOSアプリ)

Posted at

こんにちは!
この記事では、Xcodeでx64とarm64に対応した.appを書き出す方法を紹介します!
(2024年06月19日 時点)

テスト環境

  • Xcode 16.0.0 Beta1 (おそらく、Xcode 15でも同じ)
  • Mac mini (2023, 32GB-RAM)

仕組み

XcodeのArchive機能では、App Store Connectにアプリをアップロードしたりできます。
そのアプリは、.xcarchive拡張子のファイルに入っています。
ということは、arm64とx86_64のどちらにも対応しているBuildとしてArchiveし、
その中の.app拡張子を取り出せばいいという発想です。
(2024年06月19日 時点では成功)

注意

AppleシリコンのMacで動作確認しています。
Intelでの動作はできるか分かりません。

手順

Any Mac (arm64, x86_64)に設定

スクリーンショット 2024-06-19 0.18.04.png
↑ デバイス設定を表示し、

スクリーンショット 2024-06-19 0.13.29.png
↑ Any Mac (arm64, x86_64)に設定

Archive

スクリーンショット 2024-06-19 0.13.00.png
↑ メニューバーからアーカイブ開始

Finderで表示

スクリーンショット 2024-06-19 0.22.13.png
↑ Finderで.xcarchive拡張子のファイルを表示

スクリーンショット 2024-06-19 0.23.35.png
↑ 内容物を表示

.app拡張子のファイルを取り出す

スクリーンショット 2024-06-19 0.25.44.png
↑ 現在の状態からProducts/Applicationsに移動し、IntelとAppleシリコンのMacに対応したアプリをコピー
(注意: Universal == AppleシリコンとIntelチップのMacに対応ということです)

好きなところにペースト

好きなところにペースト

以上

どうでしょうか?
うまく.appを書き出せましたか?
この方法を使えば、AppleシリコンとIntelチップのMac用に1つのアプリファイルを配布するだけでいいですね!
それではまた他の記事で!

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