Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios CustomPushHandler代表不被称为深度链接城市飞艇_Ios_Objective C_Urbanairship.com_Deep Linking - Fatal编程技术网

Ios CustomPushHandler代表不被称为深度链接城市飞艇

Ios CustomPushHandler代表不被称为深度链接城市飞艇,ios,objective-c,urbanairship.com,deep-linking,Ios,Objective C,Urbanairship.com,Deep Linking,你好,我正在尝试在我的应用程序中使用深度链接功能,但是当我点击通知并打开应用程序时,不会调用回调。 我正在学习本教程: 下面是appDelegate的外观: customPushHandler = [[CustomPushHandler alloc] init]; [UAPush shared].pushNotificationDelegate = customPushHandler; UAConfig *config = [UAConfig defaultConfig]; [UAirship

你好,我正在尝试在我的应用程序中使用深度链接功能,但是当我点击通知并打开应用程序时,不会调用回调。 我正在学习本教程:

下面是appDelegate的外观:

customPushHandler = [[CustomPushHandler alloc] init];
[UAPush shared].pushNotificationDelegate = customPushHandler;
UAConfig *config = [UAConfig defaultConfig];
[UAirship takeOff:config];
[UAPush shared].notificationTypes = (UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert 
);
[UAPush setDefaultPushEnabledValue:NO];
[[UAPush shared] setPushEnabled:YES];
[[UAPush shared] resetBadge];
以下是CustomPushHandler的标题:

- (void)displayNotificationAlert:(NSString *)alertMessage;
- (void)receivedBackgroundNotification:(NSDictionary *)notification fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler;

- (void)launchedFromNotification:(NSDictionary *)notification fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler;

- (void)receivedForegroundNotification:(NSDictionary *)notification fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler;
唯一调用的回调是displayNotificationAlert,该回调在应用程序运行时调用。当应用程序在后台时,我收到通知,我点击它,应用程序打开,但没有调用回调

我不知道我做错了什么。
感谢阅读。

正如dperconti在评论中所建议的:

为应用程序启用远程通知修复了以下问题:


这里也有同样的问题。您找到解决方案了吗?应用程序是否启用了远程通知?