I had the same problem, and looking at the code in more detail, I found that inside awakeFromNib xViewController I am running another yViewController. So viewDidLoad yViewController runs until didFinishLaunchingWithOptions:
Basically, the initial VC awakeFromNib is called before didFinishLaunchingWithOptions: You may have something similar to a setting. Look at this.
source share