ios – ‘userNotificationCenter:didReceiveNotificationResponse’实现中的冲突参数类型

ios – ‘userNotificationCenter:didReceiveNotificationResponse’实现中的冲突参数类型,第1张

概述此错误刚刚开始d出.是bug还是更新? Conflicting parameter types in implementation of 'userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:': 'void (^ _Nonnull __strong)(void)' vs 'void (^__str 此错误刚刚开始d出.是BUG还是更新?

Conflicting parameter types in implementation of 'userNotificationCenter:dIDReceiveNotificationResponse:withCompletionHandler:': 'voID (^ _Nonnull __strong)(voID)' vs 'voID (^__strong _Nonnull)()'

我的守则

// Handle notification messages after display notification is tapped by the user.- (voID)userNotificationCenter:(UNUserNotificationCenter *)centerdIDReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(voID (^)())completionHandler {

先前的定义(他们的代码)

// The method will be called on the delegate when the user responded to the notification by opening the application,dismissing the notification or choosing a UNNotificationAction. The delegate must be set before the application returns from application:dIDFinishLaunchingWithOptions:.- (voID)userNotificationCenter:(UNUserNotificationCenter *)center dIDReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(voID(^)(voID))completionHandler __IOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) __TVOS_PROHIBITED;
解决方法 我有同样的问题.我改成了:

- (voID)userNotificationCenter:(UNUserNotificationCenter *)center dIDReceiveNotificationResponse:(UNNotificationResponse *)response          withCompletionHandler:(voID (^)(voID))completionHandler;

现在警告消失了.

总结

以上是内存溢出为你收集整理的ios – ‘userNotificationCenter:didReceiveNotificationResponse’实现中的冲突参数类型全部内容,希望文章能够帮你解决ios – ‘userNotificationCenter:didReceiveNotificationResponse’实现中的冲突参数类型所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1006448.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存