ฉันกำลังสร้างแอปพลิเคชันที่ฉันต้องการใช้บริการแจ้งเตือนแบบพุชของ Apple ฉันกำลังทำตามคำแนะนำทีละขั้นตอนที่ให้ไว้ในบทช่วยสอนนี้
แต่ถึงกระนั้นก็ยังไม่มีการเรียกวิธีการดังกล่าว ฉันไม่รู้ว่าอะไรเป็นสาเหตุของปัญหา ใครสามารถช่วยฉัน?
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
//NSString * token = [[NSString alloc] initWithData:deviceTokenencoding:NSUTF8StringEncoding];
NSString *str = [NSString stringWithFormat:@"Device Token=%@",deviceToken];
NSLog(@"Device Token:%@",str);
//NSLog(@"Device token is called");
//const void *devTokenBytes = [deviceToken bytes];
//NSLog(@"Device Token");
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)err {
NSString *str = [NSString stringWithFormat: @"Error: %@", err];
NSLog(@"Error:%@",str);
}