Dependency inversion if we have tabBarController

can anyone help with dependency inversion If we have a tab bar controller, how should I write the code in app delegate? I try many time the app keep crashing especially when I have a uinavigation controller