을 도울 수있는 희망 didRegisterForRemoteNotificationsWithDeviceToken
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
UA_LINFO(@"APNS device token: %@", deviceToken);
// Updates the device token and registers the token with UA.
[[UAPush shared] registerDeviceToken:deviceToken];
}
여기
// Get the results out to open or close notification
bool storedresult = [defaults boolForKey:airShipKey];
if(storedresult){
[UAPush shared].pushEnabled=YES;
}else{
[UAPush shared].pushEnabled=NO;
}
// Override point for customization after application launch.
//Create Airship options directory and add the required UIApplication launchOptions
NSMutableDictionary *takeOffOptions = [NSMutableDictionary dictionary];
[takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey];
// Call takeOff (which creates the UAirship singleton), passing in the launch options so the
// library can properly record when the app i launched from a push notification. This call is
// required.
//
// Populate AirshipConfig.plist with your app's info from https://go.urbanairship.com
[UAirship takeOff:takeOffOptions];
// Set the icon badge to zero on startup (optional)
[[UAPush shared] resetBadge];
[[UAPush shared]
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)];
// Handle any incoming incoming push notifications.
// This will invoke `handleBackgroundNotification` on your UAPushNotificationDelegate.
[[UAPush shared] handleNotification:[launchOptions valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey]
applicationState:application.applicationState];
을하고있다? 어번 비행선 대시 보드, 또는이 방법에서있어서, 상기 엑스 코드 로그에서
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)newDeviceToken
...에 .. 그 – Twinkle
수 = ""속성의리스트 및 그들 중 하나의 장치 토큰 JSON 나를 준다 이 방법에 대한 코드를 게시 하시겠습니까? – bachonk
너무 오래 .. 아래에 게시했습니다. – Twinkle