2016-02-25 16 views
1

在我的應用程序有兩種模式如何在兩種模式下處理推送通知?

1. Driver Mode 
2. Passenger Mode 

2)乘客可以發送請求給司機

-Driver has two option 1)Accept 2)cancel 

if driver accepts invitation then passenger screen shows driver contact list. 

if driver cancels invitation then passenger shows Find New Driver Screen. 
+0

如果驅動程序接受邀請意味着然後發送api請求,從後端他們必須發送pushnotification使用您的pem文件。然後用接收通知進行管理。 –

+0

是,邀請表示發送Api請求 –

+0

是發送Api請求@kalpesh –

回答

2

當用戶觸摸通知你的反應會收到在這裏,這種方法被放置在AppDelegate.m文件。

-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo 
    { 
     NSLog(@"this is user info%@",userInfo); 
     //here you can handle those things. 
    }