2012-01-15 6 views
1

내가 내 앱으로 가져 오는 푸시 구문을 분석하려고합니다.구문 분석 푸시 알림 iOS

하지만 난 여기에 몇 가지 문제를 얻을 :

NSString *resourcePath = [[launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey] objectForKey:@"aps"]; 
NSLog(@"resourcePath: %@", resourcePath); 

NSLog

{ 
     alert = cb; 
     badge = 1; 
     sound = default; 
     url = cxb; } 

내가 문자열로 NSLog ... 어떻게 URL을 얻으려면?

감사합니다.

답변

10

사전 개체입니다. url 키의 오브젝트를 취득합니다. 좋아요 :

NSString *resourcePathURL = [[[launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey] objectForKey:@"aps"] objectForKey:@"url"] ; 

NSLog(@"URL : %@",resourcePathURL);