2012-01-15 11 views
1

解析プッシュ通知のiOS私は私のアプリでgetingプッシュを解析しようとotの

しかし、私はここにいくつかの問題を得る:

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);