2015-01-08 2 views
0

저는 PHP 응용 프로그램에서 구문 분석 나머지 API를 사용하여 응용 프로그램을 푸시합니다. 나는 성공적으로구문 분석 푸시 문제

enter image description here

을 구문 분석 pused 된 구문 분석에서 볼 수 그러나 어떻게 iOS 앱에 notificatioin이 밀어하지 구문 분석 와서?

+0

REST API 코드를 표시하십시오. – soulshined

+1

전송할 세그먼트가 다른 장치와 일치하지 않습니다. 네가 올바르게 등록 된 기기를 가지고 있다고 가정하고 있나? 세그먼트를 쿼리하기 위해 사용했던 매개 변수를 살펴보고 0 장치로 보내는 이유를 보여줘야합니다. – cjwirth

답변

0

아래 순서에 따라이 작업을 수행 할 수 있습니다 - 귀하의 요구 사항에 따라 그룹 채널 -

1) iOS 앱 AppDelegate.m

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 
{ 
    PFInstallation *currentInstallation = [PFInstallation currentInstallation]; 
    [currentInstallation setDeviceTokenFromData:deviceToken]; 
    [currentInstallation saveInBackground]; 
} 

2) 채널에 UDID를 구독에서 원격 통지 등록

PFInstallation *currentInstallation = [PFInstallation currentInstallation]; 
[currentInstallation addUniqueObject:@"ChannelName" forKey:@"channels"]; 
[currentInstallation saveInBackground]; 

3) 귀하의 PHP 앱에서 특정 채널로 알림을 보냅니다.