mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-04-19 00:03:45 +08:00
iOS-添加功能
1.add crash日志 接口 2.add 本地通知 相关接口 3.add 地理位置上报 接口
This commit is contained in:
@@ -233,6 +233,32 @@ static NSDictionary *_luanchOptions = nil;
|
||||
[JPUSHService setLogOFF];
|
||||
}
|
||||
|
||||
-(void)crashLogON:(CDVInvokedUrlCommand*)command{
|
||||
[JPUSHService crashLogON];
|
||||
}
|
||||
|
||||
-(void)setLocalNotification:(CDVInvokedUrlCommand*)command{
|
||||
NSArray *arguments = command.arguments;
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:[((NSString*)arguments[0]) intValue]];
|
||||
NSString *alertBody = (NSString*)arguments[1];
|
||||
int badge = [(NSString*)arguments[2] intValue];
|
||||
NSString *idKey = (NSString*)arguments[3];
|
||||
NSDictionary *dict = (NSDictionary*)arguments[4];
|
||||
[JPUSHService setLocalNotification:date alertBody:alertBody badge:badge alertAction:nil identifierKey:idKey userInfo:dict soundName:nil];
|
||||
}
|
||||
|
||||
-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command{
|
||||
[JPUSHService deleteLocalNotificationWithIdentifierKey:(NSString*)command.arguments[0]];
|
||||
}
|
||||
|
||||
-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command{
|
||||
[JPUSHService clearAllLocalNotifications];
|
||||
}
|
||||
|
||||
-(void)setLocation:(CDVInvokedUrlCommand*)command{
|
||||
[JPUSHService setLatitude:[((NSString*)command.arguments[0]) doubleValue] longitude:[((NSString*)command.arguments[1]) doubleValue]];
|
||||
}
|
||||
|
||||
#pragma mark- 内部方法
|
||||
+(void)setLaunchOptions:(NSDictionary *)theLaunchOptions{
|
||||
_luanchOptions = theLaunchOptions;
|
||||
|
||||
Reference in New Issue
Block a user