43
37

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

iOS Simulatorのシステムログを確認する

Last updated at Posted at 2015-04-16

iOS実機のシステムログはiOS Consoleで簡単に確認できるが、iOS Consoleではシミュレータのログは確認できないらしい。ということでシミュレータのログをターミナルで表示してみる。

まずデバイスコードを調べる。ターミナルで

$ instruments -s devices

を実行する。すると下記のような結果が得られる。

Resizable iPad (8.1 Simulator) [032E0AF3-9943-41BF-BE07-6EBBAD29C292]
Resizable iPad (8.3 Simulator) [89E067A1-E066-4010-A8DA-4AB126321BD3]
Resizable iPhone (8.1 Simulator) [255FC585-6339-4822-A3BD-A4AD7F995353]
Resizable iPhone (8.3 Simulator) [F1925327-7810-4AC4-AB80-2336FE2ECCF9]
iPad 2 (7.1 Simulator) [278E9982-C4B7-403D-8135-F0293732D9B4]
iPad 2 (8.1 Simulator) [8E69F598-598A-48CB-869F-0B3A13D3187A]
iPad 2 (8.3 Simulator) [16678101-7A50-4C4E-912F-37C8598C17B7]
iPad Air (7.1 Simulator) [7EF8022A-2639-46BB-9D5E-DA35D7663F94]
iPad Air (8.1 Simulator) [4B2593CD-AB66-4CC6-B809-23D23F0B0662]
iPad Air (8.3 Simulator) [01FAB7AF-EE51-4030-8B2D-133CC84CB1AB]
iPad Retina (7.1 Simulator) [60B9AE25-9D7B-414D-80F4-84C78F3763B6]
iPad Retina (8.1 Simulator) [D5F24867-8030-4169-8230-CB152307B002]
iPad Retina (8.3 Simulator) [C5C4EA3D-26D1-4352-821F-F6F4F48BCD32]
iPhone 4s (7.1 Simulator) [DFA7624D-DDAA-42AA-9194-2ECDC64F30EE]
iPhone 4s (8.1 Simulator) [076A2837-ABFA-46F6-A73E-39E5BD64AFFE]
iPhone 4s (8.3 Simulator) [FF5F53D8-E26A-49A2-9EFD-CD1307A0CB7E]
iPhone 5 (7.1 Simulator) [8608D11B-795E-4CDF-ACDD-3183902DFA86]
iPhone 5 (8.1 Simulator) [1CB9AA79-0F70-495F-A61F-7373CA8C995C]
iPhone 5 (8.3 Simulator) [8C74777F-2388-4118-BC7C-F5AEBC9D4E55]
iPhone 5s (7.1 Simulator) [ED896B1E-8471-48BC-8841-C1551C2014C1]
iPhone 5s (8.1 Simulator) [D896BBDB-70BD-4270-927A-45F6C79DC28E]
iPhone 5s (8.3 Simulator) [9767F389-F5B1-4B9D-B476-4A5A26B46149]
iPhone 6 (8.1 Simulator) [CF9BE10F-10C9-43D5-8FD1-584A40C1C585]
iPhone 6 (8.3 Simulator) [690BBFDC-F913-46D7-B5C6-54291653076E]
iPhone 6 Plus (8.1 Simulator) [C2D24805-9803-40F5-B67C-62CE907E1D48]
iPhone 6 Plus (8.3 Simulator) [4A625DCE-E996-43E5-88ED-022DB6FC7305]

この場合一番下のiPhone 6 Plus iOS 8.3シミュレータであれば4A625DCE-E996-43E5-88ED-022DB6FC7305が私の環境でのデバイスコードである。

ログファイルのパスは~/Library/Logs/CoreSimulator/<DEVICE_CODE>/system.logである。なのでiPhone 6 Plus iOS 8.3シミュレータであればターミナルで

$ tail -f ~/Library/Logs/CoreSimulator/4A625DCE-E996-43E5-88ED-022DB6FC7305/system.log

と実行することで、ログを確認することができる。デバイスコードは各環境で違うのでそれぞれ置き換えて実行する。

43
37
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
43
37

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?