ios - Not able to load my view controller after completed ~10 min in background -


i putting app in background ~10 min (using beginbackgroundtaskwithexpirationhandler) after home button pressed. @ end of 10 min setting local notification launch app again same view controller.

but when interact local notification not able come on same view controller. it's called applicationwillenterforeground , didreceivelocalnotification. in didreceivelocalnotification setting view controller no success.

edit

code in didreceivelocalnotification

nf1abccontroller *abc = [[nf1abccontroller alloc]init];  [self.navigationmanager.defaultnavigationcontroller pushviewcontroller:abc animated:yes]; 

you have make sure abc view controller not nill, check defaultnavigationcontroller not nil.

the appropriate way such thing send notification of type nsnotifcation inside applicationdidrevievelocalnotification method

also have register last view controller visible before app entered background ,when view controller receives notification pushes desired view controller

more on in apple notification programming guide


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -