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’实现中的冲突参数类型所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)