USO400
  • Home
  • About
  • KH400
  • SuperSherpa
  • ZX-10
  • Todo
  • ALTO WORKS
  • KMX125
Sign in Subscribe

objective-c

A collection of 1 post
Swift(iOSアプリ)でprintと debugPrintとNSLog
swift

Swift(iOSアプリ)でprintと debugPrintとNSLog

iOSアプリを作っているときログ出力をするならprint|debugPrint|NSLogいずれかを使うけど、Releaseビルドではどれが出力されるのか確認したことが無かったので確認をした。 Objective-CでiOSアプリを作っているときNSLogの出力はReleaseビルドでもログ出力されることは確認していたのでよくあるifdefマクロで LOG(...) のようにしていた。 実装 実装はXcodeでFile > New > Project... > AppでSwiftを使ったアプリ作成 ViewController.swiftの viewDidLoad() に下記を追記 print(">>> this is test message from print") print(">>> this is test message from debugPrint") NSLog(">>> this is
2022年6月8日 2 min read
Page 1 of 1
USO400 © 2025
Powered by Ghost