崩溃“无效的参数不满足:bundleProxy!= nil” [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions ..]

mkw*_*won 6 iphone push-notification ios ios11

我无法重现此错误,但是我的一位用户因以下错误而崩溃(在iOS 11上)。

Fatal Exception: NSInternalInconsistencyException
Invalid parameter not satisfying: bundleProxy != nil
Run Code Online (Sandbox Code Playgroud)

调用以下代码段时:

[[UNUserNotificationCenter currentNotificationCenter]
  requestAuthorizationWithOptions:
    (UNAuthorizationOptionAlert | 
     UNAuthorizationOptionBadge |
     UNAuthorizationOptionSound)
  completionHandler:
    ^(BOOL granted, NSError * _Nullable error) {
      if (granted) {
        [self getNotificationSettings];
      }
}];
Run Code Online (Sandbox Code Playgroud)

我无法自己复制它。而且我在这里或网上找不到任何类似的东西。有没有其他人碰到这个可以阐明一些观点的人?

归档时间:

查看次数:

1777 次

最近记录:

6 年,8 月 前