0

Is there any way for my app to detect if I got a push notification vs a local notification vs a phone call vs do not disturb phone call (the phone call is just silent when do not disturb is on).

Is there any method the app calls depending on which notification/phone call occurs.

So i know so far applicatonWillResignActive will be called when there is an incoming phone call. If the user takes the call applicationDidEnterBackground is called, if the user ignores the call applicationDidBecomeActive is called

Viper
  • 1,408
  • 9
  • 13
user3281743
  • 295
  • 1
  • 11

1 Answers1

0

When Push notification will come then below method will call if your app is running

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

When Local notification will come then below method will call if your app is running

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification

Both above methods you need to implement in appdelegate.m

Dhawal Dawar
  • 354
  • 2
  • 8