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?

More than 1 year has passed since last update.

【Swift】Apple Siliconを搭載しているか判定する

Last updated at Posted at 2023-02-23

はじめに

現在、apple/ml-stable-diffusionを使ったmacOSアプリを開発しています。
apple/ml-stable-diffusionはApple Siliconを搭載したmacでしか動かないので判定する必要がありました。
既にKyomeさんが記事にしてくれていたのですぐに実装することができました。
また使うことがあるかもしれないので記録しておきます。

実装

#if arch(x86_64)
    print("Intel")
#elseif arch(arm64)
    print("Apple Silicon")
#endif

おわり

macアプリ開発で困ったことがあれば、KyomeさんのZennを見るべし

参考記事

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?