How to debug a (freeze) bug showing only on --release build with iOS?

Something breaks when I do a release build for iOS. Bug description: the app totally freezes for about 10 seconds after starting.

  • My app works as expected (no freezing) if I use “ionic cordova run ios” to run the app on my iOS device.
  • But when I download the same app from AppStore (or build with --release and upload it to TestFlight or use ios-deploy to run it) the bug appears.
  • The problem happens only with iOS.

My “ionic info” output:

cli packages:

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

Cordova Platforms : android 6.4.0 ios 4.5.3
Ionic Framework   : ionic1 1.3.3

System:

ios-deploy : 1.9.2
ios-sim    : 5.0.13
Node       : v6.9.5
npm        : 3.10.10
OS         : macOS Sierra
Xcode      : Xcode 9.1 Build version 9B55

Do you have any suggestion on how to debug this situation? Or if you have any ideas what might cause this, please let me know.

http://rhult.github.io/articles/testing-release-builds/

Thanks! Correct me if I’m wrong but this setup probably does not let me to use Safari WebInspector though. Do you know if this is possible in any way with a --release build?