iOS-添加功能

1.add crash日志      接口
2.add 本地通知        相关接口
3.add 地理位置上报 接口
This commit is contained in:
E.B
2016-03-09 13:18:09 +08:00
parent afe2230ed9
commit 6cee953edd
3 changed files with 65 additions and 0 deletions
+26
View File
@@ -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;