Skip to content

Commit

Permalink
Merge pull request #51 from weiruiyang/master
Browse files Browse the repository at this point in the history
升级
  • Loading branch information
weiruiyang authored Jan 2, 2020
2 parents 07ec805 + 72b68e8 commit 8ff2fde
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Examples/PluginsDemo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public class PluginsDemo : MonoBehaviour
void Start()
{
gameObject.name = "Main Camera";
JPushBinding.Init(gameObject.name);
JPushBinding.SetDebug(true);
JPushBinding.Init(gameObject.name);
}

// Update is called once per frame
Expand Down
Binary file removed JPushUnityPlugin_v3.2.9.unitypackage
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion Plugins/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@

<application
android:allowBackup="false"
android:label="@string/app_name">
android:label="@string/app_name"
android:icon="@drawable/app_icon">

<!-- For test only. Demo 的主程序 start -->
<activity
Expand Down
Binary file modified Plugins/Android/jpush.aar
Binary file not shown.
36 changes: 31 additions & 5 deletions Plugins/iOS/JPUSHService.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
*/

#define JPUSH_VERSION_NUMBER 3.2.1
#define JPUSH_VERSION_NUMBER 3.2.8

#import <Foundation/Foundation.h>

Expand Down Expand Up @@ -45,7 +45,14 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
JPAuthorizationOptionCriticalAlert NS_AVAILABLE_IOS(12.0) = (1 << 4) , //The ability to play sounds for critical alerts.
JPAuthorizationOptionProvidesAppNotificationSettings NS_AVAILABLE_IOS(12.0) = (1 << 5) , //An option indicating the system should display a button for in-app notification settings.
JPAuthorizationOptionProvisional NS_AVAILABLE_IOS(12.0) = (1 << 6) , //The ability to post noninterrupting notifications provisionally to the Notification Center.

JPAuthorizationOptionAnnouncement NS_AVAILABLE_IOS(13.0) = (1 << 7) , //The ability for Siri to automatically read out messages over AirPods.
};

typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) {
JPAuthorizationNotDetermined = 0, // The user has not yet made a choice regarding whether the application may post user notifications.
JPAuthorizationStatusDenied, // The application is not authorized to post user notifications.
JPAuthorizationStatusAuthorized, // The application is authorized to post user notifications.
JPAuthorizationStatusProvisional NS_AVAILABLE_IOS(12.0), // The application is authorized to post non-interruptive user notifications.
};

/*!
Expand Down Expand Up @@ -108,6 +115,7 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
@property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 启动图片名,iOS10以上有效,从推送启动时将会用到
@property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。
@property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。
@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.

@end

Expand Down Expand Up @@ -217,6 +225,17 @@ typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
*/
+ (void)handleRemoteNotification:(NSDictionary *)remoteInfo;

/*!
* @abstract 检测通知授权状态
* @param completion 授权结果通过status值返回,详见JPAuthorizationStatus
*/
+ (void)requestNotificationAuthorization:(void (^)(JPAuthorizationStatus status))completion;

/*!
* @abstract 跳转至系统设置页面,iOS8及以上有效
*/
+ (void)openSettingsForNotification:(void (^)(BOOL success))completionHandler NS_AVAILABLE_IOS(8_0);

/*!
* Tags操作接口
* 支持增加/覆盖/删除/清空/查询操作
Expand Down Expand Up @@ -659,7 +678,14 @@ callbackSelector:(SEL)cbSelector
* @param center [UNUserNotificationCenter currentNotificationCenter] 新特性用户通知中心
* @param notification 当前管理的通知对象
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(nullable UNNotification *)notification NS_AVAILABLE_IOS(12.0);
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification NS_AVAILABLE_IOS(12.0);

/**
* 监测通知授权状态返回的结果
* @param status 授权通知状态,详见JPAuthorizationStatus
* @param info 更多信息,预留参数
*/
- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info;

@end

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

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

@end
Binary file renamed Plugins/iOS/jcore-ios-2.1.1.a → Plugins/iOS/jcore-ios-2.1.8.a
100755 → 100644
Binary file not shown.
Binary file renamed Plugins/iOS/jpush-ios-3.2.1.a → Plugins/iOS/jpush-ios-3.2.8.a
100755 → 100644
Binary file not shown.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

## 集成

运行插件目录下的 JPushUnityPlugin_vX.X.X.unitypackage

或者

把Plugins文件夹里的文件合并到您自己的项目Assets/Plugins文件夹下面

### Android
Expand Down

0 comments on commit 8ff2fde

Please sign in to comment.