Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS的example害人 #926

Open
diamont1001 opened this issue Aug 16, 2023 · 1 comment
Open

iOS的example害人 #926

diamont1001 opened this issue Aug 16, 2023 · 1 comment

Comments

@diamont1001
Copy link

你的运行环境

  • 插件版本:
  • react-native 版本:

期望效果

iOS 的 example 这里 这句 entity.types = JPAuthorizationOptionNone; 害人不浅,真机怎么都没有弹通知权限。

// APNS
  JPUSHRegisterEntity * entity = [[JPUSHRegisterEntity alloc] init];
  if (@available(iOS 12.0, *)) {
    entity.types = JPAuthorizationOptionNone; //JPAuthorizationOptionAlert|JPAuthorizationOptionBadge|JPAuthorizationOptionSou//nd|JPAuthorizationOptionProvidesAppNotificationSettings;
  }
  [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];

再看看文档:https://docs.jiguang.cn/jpush/client/iOS/ios_jghgzy

WeChatWorkScreenshot_05708072-b991-45bf-b8d8-72ba9400d64e

需要改成下面这样就可以获取到通知权限了:

entity.types = JPAuthorizationOptionAlert|JPAuthorizationOptionBadge|JPAuthorizationOptionSound;

实际效果

没弹窗

重现步骤

  1. ...
  2. ...
  3. ...
  4. ...

Debug logs

包括 Android 或 iOS 的日志:

@Go4fun
Copy link

Go4fun commented Aug 16, 2023

good~
不能起到很好示范作用的example,真是很浪费时间。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants