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】UIDeviceを使った端末情報、バージョンの取得方法

Posted at

はじめに

お問い合わせメールを送信するとき、端末情報端末のバージョンを自動で記入する機能を実装した。

この記事では、UIDeviceを使った端末情報の取得処理を備忘録として記録。

実装

ViewController.swift
let device = UIDevice.current
print(device.model)
// iPhone
print(device.systemVersion)
// 15.2.1

プレビュー

上記の実装, 【Swift】アプリ内でメールを送信するを活用すると以下のようなお問い合わせメールを送信できる。

おわりに

端末、バージョンを自動で記入することで、ユーザーからのお問い合わせ対応が行いやすいメリットがある。

参考リンク

UIDevice | Apple Developer Documentation

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?