본문 바로가기
ios

How to show <private> in os_log

by 고고 2022. 5. 10.

Problem

this will display Some string: <private>

os_log(logger, "Some string: %s", "text that will display <private>")

 

Solve
In order for the text to display as expected, it would need to be declared with the public tag:

os_log(logger, "Some string: %{public}s", "text that will display as expected")

댓글