Skip to content

Commit 8ff2fde

Browse files
authored
Merge pull request #51 from weiruiyang/master
升级
2 parents 07ec805 + 72b68e8 commit 8ff2fde

19 files changed

+34
-11
lines changed

Examples/PluginsDemo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public class PluginsDemo : MonoBehaviour
1717
void Start()
1818
{
1919
gameObject.name = "Main Camera";
20-
JPushBinding.Init(gameObject.name);
2120
JPushBinding.SetDebug(true);
21+
JPushBinding.Init(gameObject.name);
2222
}
2323

2424
// Update is called once per frame

JPushUnityPlugin_v3.2.9.unitypackage

-18.1 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Plugins/Android/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333

3434
<application
3535
android:allowBackup="false"
36-
android:label="@string/app_name">
36+
android:label="@string/app_name"
37+
android:icon="@drawable/app_icon">
3738

3839
<!-- For test only. Demo 的主程序 start -->
3940
<activity

Plugins/Android/jpush.aar

61.8 KB
Binary file not shown.

Plugins/iOS/JPUSHService.h

100755100644
+31-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
1010
*/
1111

12-
#define JPUSH_VERSION_NUMBER 3.2.1
12+
#define JPUSH_VERSION_NUMBER 3.2.8
1313

1414
#import <Foundation/Foundation.h>
1515

@@ -45,7 +45,14 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
4545
JPAuthorizationOptionCriticalAlert NS_AVAILABLE_IOS(12.0) = (1 << 4) , //The ability to play sounds for critical alerts.
4646
JPAuthorizationOptionProvidesAppNotificationSettings NS_AVAILABLE_IOS(12.0) = (1 << 5) , //An option indicating the system should display a button for in-app notification settings.
4747
JPAuthorizationOptionProvisional NS_AVAILABLE_IOS(12.0) = (1 << 6) , //The ability to post noninterrupting notifications provisionally to the Notification Center.
48-
48+
JPAuthorizationOptionAnnouncement NS_AVAILABLE_IOS(13.0) = (1 << 7) , //The ability for Siri to automatically read out messages over AirPods.
49+
};
50+
51+
typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) {
52+
JPAuthorizationNotDetermined = 0, // The user has not yet made a choice regarding whether the application may post user notifications.
53+
JPAuthorizationStatusDenied, // The application is not authorized to post user notifications.
54+
JPAuthorizationStatusAuthorized, // The application is authorized to post user notifications.
55+
JPAuthorizationStatusProvisional NS_AVAILABLE_IOS(12.0), // The application is authorized to post non-interruptive user notifications.
4956
};
5057

5158
/*!
@@ -108,6 +115,7 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
108115
@property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 启动图片名,iOS10以上有效,从推送启动时将会用到
109116
@property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。
110117
@property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。
118+
@property (nonatomic, copy) NSString *targetContentIdentifier NS_AVAILABLE_IOS(13.0); // An identifier for the content of the notification used by the system to customize the scene to be activated when tapping on a notification.
111119

112120
@end
113121

@@ -217,6 +225,17 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
217225
*/
218226
+ (void)handleRemoteNotification:(NSDictionary *)remoteInfo;
219227

228+
/*!
229+
* @abstract 检测通知授权状态
230+
* @param completion 授权结果通过status值返回,详见JPAuthorizationStatus
231+
*/
232+
+ (void)requestNotificationAuthorization:(void (^)(JPAuthorizationStatus status))completion;
233+
234+
/*!
235+
* @abstract 跳转至系统设置页面,iOS8及以上有效
236+
*/
237+
+ (void)openSettingsForNotification:(void (^)(BOOL success))completionHandler NS_AVAILABLE_IOS(8_0);
238+
220239
/*!
221240
* Tags操作接口
222241
* 支持增加/覆盖/删除/清空/查询操作
@@ -659,7 +678,14 @@ callbackSelector:(SEL)cbSelector
659678
* @param center [UNUserNotificationCenter currentNotificationCenter] 新特性用户通知中心
660679
* @param notification 当前管理的通知对象
661680
*/
662-
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(nullable UNNotification *)notification NS_AVAILABLE_IOS(12.0);
681+
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification NS_AVAILABLE_IOS(12.0);
682+
683+
/**
684+
* 监测通知授权状态返回的结果
685+
* @param status 授权通知状态,详见JPAuthorizationStatus
686+
* @param info 更多信息,预留参数
687+
*/
688+
- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info;
663689

664690
@end
665691

@@ -672,7 +698,7 @@ callbackSelector:(SEL)cbSelector
672698
@param userInfo 地理围栏触发时返回的信息
673699
@param error 错误信息
674700
*/
675-
- (void)jpushGeofenceIdentifer:(NSString * _Nonnull)geofenceId didEnterRegion:(NSDictionary * _Nullable)userInfo error:(NSError * _Nullable)error;
701+
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didEnterRegion:(NSDictionary *)userInfo error:(NSError *)error;
676702

677703
/**
678704
离开地理围栏区域
@@ -681,6 +707,6 @@ callbackSelector:(SEL)cbSelector
681707
@param userInfo 地理围栏触发时返回的信息
682708
@param error 错误信息
683709
*/
684-
- (void)jpushGeofenceIdentifer:(NSString * _Nonnull)geofenceId didExitRegion:(NSDictionary * _Nullable)userInfo error:(NSError * _Nullable)error;
710+
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didExitRegion:(NSDictionary *)userInfo error:(NSError *)error;
685711

686712
@end
Binary file not shown.
Binary file not shown.

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
## 集成
99

10-
运行插件目录下的 JPushUnityPlugin_vX.X.X.unitypackage
11-
12-
或者
13-
1410
把Plugins文件夹里的文件合并到您自己的项目Assets/Plugins文件夹下面
1511

1612
### Android

0 commit comments

Comments
 (0)