jpush / jpush/jpush-react-native
iOS的example害人
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
你的运行环境
- 插件版本:
- 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
需要改成下面这样就可以获取到通知权限了:
entity.types = JPAuthorizationOptionAlert|JPAuthorizationOptionBadge|JPAuthorizationOptionSound;
实际效果
没弹窗
重现步骤
- ...
- ...
- ...
- ...
Debug logs
包括 Android 或 iOS 的日志:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open example/ios/example/AppDelegate.m at the referenced registration code and compare the authorization options with the linked iOS documentation. Update the example so a real iOS device requests notification permission, then verify that the permission prompt appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, objective-c, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100