DYLD_PRINT_STATISTICS not working / Xcode 13.0 beta / iOS 15.0 beta 8

Hello!

I'm working on a new app, and DYLD_PRINT_STATISTICS=1 is not working - i.e., not producing any output.

Build platform:

  • MacBook Pro (15-inch, 2018)
  • macOS Monterey, 12.0 beta 6 (21A5506j)
  • Xcode 13.0 beta 5 (13A5212g)

Test device:

  • iPad 8th generation
  • iPadOS 15.0 beta 8 (19A5340a)

I'm setting it as usual in Product -> Scheme -> Edit Scheme, then going to "Run" tab on the left and choosing "Arguments" on the top. In that screen I enter "DYLD_PRINT_STATISTICS" for Name and "YES" for Value. Nothing prints.

I also tried:

  • Using "1" for Value instead of "YES"
  • Entering "DYLD_PRINT_STATISTICS=YES" as Name and leaving Value blank
  • Entering "DYLD_PRINT_STATISTICS=1" as Name and leaving Value blank
  • Every combination of the above, but as command-line arguments instead of environment variables.

Also, I tried "DYLD_PRINT_APIS" as Name and "YES" as Value, and that works normally.

What's going on here?

Is it something with the all-SwiftUI lifecycle?

An issue with the beta macOS/Xcode/iPadOS?

Thanks!

iOS 15 and macOS Monterey have a new version of dyld. You can see the man page for dyld in macOS Monterey to see the current set of environment variables that you can use.

Several years ago, the Time Profiler instrument gained the ability to profile the time spent during app launch before main(). You should profile your app launches this way instead.

would you be able to point us to the relivant documentation and/or environment variables?

Unfortunately that info is only available in man pages and those aren’t available elsewhere (r. 16512537).

However, I happen to have a copy of macOS 12.0b6 handy so I ran man dyld for you (-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I have a same problem. So we can't use "DYLD_PRINT_STATISTICS" anymore with iOS15+xcode13 ?

Instrument:App Launch & Time Profiler tool instead

DYLD_PRINT_STATISTICS not working / Xcode 13.0 beta / iOS 15.0 beta 8
 
 
Q