ios - Change appdelegate methods from SDK -
hi all.
i'm trying develop sdk register on events when app going background [like background fetch or significant location change]. reason need write code in appdelegate methods
- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions
and:
- (void)applicationdidenterbackground:(uiapplication *)application
the question is, how can without damaging hosting app app delegate.
i tried categorizing, in order need know appdelegate
i read bit methods swizzling can't figure out how change appdelegate method , not run over.
if can give example sample code or link clear things out appreciated.
thanks.
you can use 2 notifications:
uiapplicationdidfinishlaunchingnotification uiapplicationdidenterbackgroundnotification
you can read more them here: https://developer.apple.com/library/ios/documentation/uikit/reference/uiapplication_class/#//apple_ref/c/data/uiapplicationdidfinishlaunchingnotification
Comments
Post a Comment