LoginSignup
13
9

More than 5 years have passed since last update.

Xcodeのデバックでよく使うコマンドたち

Last updated at Posted at 2018-09-22

Xcodeのデバックでよく使うコマンドたち

環境

  • Xcode 9.4.1
  • Swift 4.1

po String(data: data, encoding: .utf8)

通信で返ってきたData型を文字列でコンソール表示 Codableでパースする前のデータ確認など

po dump(hogeEntity)

printではなくbumpを使う
自作のEntityやJSONをprintで見ると平文になってしまうが、 dumpなら構造を維持したママみれる

po deviceToken.map { String(format: "%.2hhx", $0) }.joined()

デバイストークンを調べる

exp hoge = "fuga"

デバック中に変数の値を書き換えるときに使う。 ユースケースとしては、API返り値が固定でデバッグしにくいので書き換えるとか。

13
9
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
13
9