Commit 8140cbe6 authored by zhu's avatar zhu

Merge branch 'DEV_20150805_001' of http://121.42.32.57/root/xffruit into DEV_20150805_001

Conflicts:
	XFFruit/AppDelegate/ICRAppDelegate.m
	XFFruit/Info.plist
parents 90e5cc6c e388169f
platform :ios, '8.1'
platform :ios, '7.1'
pod 'AFNetworking', '~> 2.5.4'
pod 'SDWebImage', '~> 3.7.2'
pod 'MBProgressHUD', '~> 0.9.1'
......@@ -8,6 +8,6 @@ pod 'SSKeychain', '~> 1.2.3'
pod 'FMDB', '~> 2.5'
pod 'Base64nl', '~> 1.2'
pod 'Reveal-iOS-SDK', '~> 1.5.1'
pod 'BaiduMapAPI', '~> 2.7.0'
pod 'BaiduMapAPI', '~> 2.8.1'
pod 'MJRefresh', '~> 2.2.0'
pod 'IQKeyboardManager', '~> 3.2.3'
......@@ -20,7 +20,11 @@ PODS:
- AFNetworking/UIKit (2.5.4):
- AFNetworking/NSURLConnection
- AFNetworking/NSURLSession
- BaiduMapAPI (2.7.0)
- BaiduMapAPI (2.8.1):
- BaiduMapAPI/Default (= 2.8.1)
- BaiduMapAPI/Default (2.8.1):
- BaiduMapAPI/Universal
- BaiduMapAPI/Universal (2.8.1)
- Base64nl (1.2)
- FMDB (2.5):
- FMDB/standard (= 2.5)
......@@ -38,7 +42,7 @@ PODS:
DEPENDENCIES:
- AFNetworking (~> 2.5.4)
- BaiduMapAPI (~> 2.7.0)
- BaiduMapAPI (~> 2.8.1)
- Base64nl (~> 1.2)
- FMDB (~> 2.5)
- IQKeyboardManager (~> 3.2.3)
......@@ -50,7 +54,7 @@ DEPENDENCIES:
SPEC CHECKSUMS:
AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
BaiduMapAPI: d6433624b0b4dd156f2d842f394a5011b02a6401
BaiduMapAPI: 2d03e12a51d5c6c49ece555c6bdda8562635cc02
Base64nl: a497bdcd1c01ea793d36b399016195a8713c0e95
FMDB: 96e8f1bcc1329e269330f99770ad4285d9003e52
IQKeyboardManager: 555b1231fefafb21b19278d7cca72986a27b748b
......@@ -60,4 +64,4 @@ SPEC CHECKSUMS:
SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
COCOAPODS: 0.38.2
COCOAPODS: 0.39.0
......@@ -61,12 +61,17 @@
35321F671B97EF1100E5C670 /* GXFPopNewMaterialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 35321F661B97EF1100E5C670 /* GXFPopNewMaterialViewController.m */; };
35321F6A1B97EF3600E5C670 /* GXFPopNewProductViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 35321F691B97EF3600E5C670 /* GXFPopNewProductViewController.m */; };
35321F6D1B98C66400E5C670 /* GXFButtonAndLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35321F6C1B98C66400E5C670 /* GXFButtonAndLineView.m */; };
3557F96B1BDF7E4A00078AF4 /* libPushSDK-1.8.7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3557F96A1BDF7E4A00078AF4 /* libPushSDK-1.8.7.a */; };
358432EE1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432ED1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.m */; };
358432F11B993BD8007E73ED /* GXFProcessProductTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F01B993BD8007E73ED /* GXFProcessProductTableViewCell.m */; };
358432F41B994EDD007E73ED /* GXFSeeProcessViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F31B994EDD007E73ED /* GXFSeeProcessViewController.m */; };
358432F71B998ED2007E73ED /* GXFProductUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F61B998ED2007E73ED /* GXFProductUnit.m */; };
35A1C3551B8EFBBF004AC9F7 /* PermissionJson in Resources */ = {isa = PBXBuildFile; fileRef = 35A1C3541B8EFBBF004AC9F7 /* PermissionJson */; };
35A1C3581B8F09D2004AC9F7 /* GXFFunctionDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A1C3571B8F09D2004AC9F7 /* GXFFunctionDB.m */; };
35A57A071BE0880C008F3818 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35A57A061BE0880C008F3818 /* CFNetwork.framework */; };
35A57A091BE08819008F3818 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35A57A081BE08819008F3818 /* CoreFoundation.framework */; };
35A57A0B1BE08823008F3818 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35A57A0A1BE08823008F3818 /* CoreTelephony.framework */; };
35ADF29D1BDE62BA00E2A7E4 /* PushConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = 35ADF29C1BDE62BA00E2A7E4 /* PushConfig.plist */; };
35B448DF1B9B0A73001209E2 /* ProductBillCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B448DE1B9B0A73001209E2 /* ProductBillCell.m */; };
35B9B40E1B8FFB59009851CC /* GXFFunctionDBHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B9B40D1B8FFB59009851CC /* GXFFunctionDBHelper.m */; };
35C3C0AC1AE956040035AC8A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35C3C0AB1AE956040035AC8A /* Security.framework */; };
......@@ -549,6 +554,8 @@
35321F691B97EF3600E5C670 /* GXFPopNewProductViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GXFPopNewProductViewController.m; path = ../Views/GXFPopNewProductViewController.m; sourceTree = "<group>"; };
35321F6B1B98C66400E5C670 /* GXFButtonAndLineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFButtonAndLineView.h; sourceTree = "<group>"; };
35321F6C1B98C66400E5C670 /* GXFButtonAndLineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFButtonAndLineView.m; sourceTree = "<group>"; };
3557F9691BDF7E4A00078AF4 /* APService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APService.h; sourceTree = "<group>"; };
3557F96A1BDF7E4A00078AF4 /* libPushSDK-1.8.7.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libPushSDK-1.8.7.a"; sourceTree = "<group>"; };
358432EC1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProcessMaterialTableViewCell.h; sourceTree = "<group>"; };
358432ED1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProcessMaterialTableViewCell.m; sourceTree = "<group>"; };
358432EF1B993BD8007E73ED /* GXFProcessProductTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProcessProductTableViewCell.h; sourceTree = "<group>"; };
......@@ -560,6 +567,10 @@
35A1C3541B8EFBBF004AC9F7 /* PermissionJson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PermissionJson; sourceTree = "<group>"; };
35A1C3561B8F09D2004AC9F7 /* GXFFunctionDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFFunctionDB.h; sourceTree = "<group>"; };
35A1C3571B8F09D2004AC9F7 /* GXFFunctionDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFFunctionDB.m; sourceTree = "<group>"; };
35A57A061BE0880C008F3818 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
35A57A081BE08819008F3818 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
35A57A0A1BE08823008F3818 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
35ADF29C1BDE62BA00E2A7E4 /* PushConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = PushConfig.plist; sourceTree = "<group>"; };
35B448DD1B9B0A73001209E2 /* ProductBillCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductBillCell.h; sourceTree = "<group>"; };
35B448DE1B9B0A73001209E2 /* ProductBillCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductBillCell.m; sourceTree = "<group>"; };
35B9B40C1B8FFB59009851CC /* GXFFunctionDBHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFFunctionDBHelper.h; sourceTree = "<group>"; };
......@@ -1079,11 +1090,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
35C3C0AE1AE9560E0035AC8A /* CoreGraphics.framework in Frameworks */,
35C3C0B01AE9561E0035AC8A /* SystemConfiguration.framework in Frameworks */,
35A57A0B1BE08823008F3818 /* CoreTelephony.framework in Frameworks */,
35A57A091BE08819008F3818 /* CoreFoundation.framework in Frameworks */,
35A57A071BE0880C008F3818 /* CFNetwork.framework in Frameworks */,
35C3C0B61AE956390035AC8A /* CoreLocation.framework in Frameworks */,
35C3C0B41AE956300035AC8A /* QuartzCore.framework in Frameworks */,
35C3C0B21AE956290035AC8A /* OpenGLES.framework in Frameworks */,
35C3C0B01AE9561E0035AC8A /* SystemConfiguration.framework in Frameworks */,
35C3C0AE1AE9560E0035AC8A /* CoreGraphics.framework in Frameworks */,
3557F96B1BDF7E4A00078AF4 /* libPushSDK-1.8.7.a in Frameworks */,
35C3C0AC1AE956040035AC8A /* Security.framework in Frameworks */,
871F9F047CDDAC523E4358DC /* libPods.a in Frameworks */,
);
......@@ -1194,6 +1209,23 @@
path = Views;
sourceTree = "<group>";
};
3557F9671BDF7E4A00078AF4 /* JiGuang */ = {
isa = PBXGroup;
children = (
3557F9681BDF7E4A00078AF4 /* lib */,
);
path = JiGuang;
sourceTree = "<group>";
};
3557F9681BDF7E4A00078AF4 /* lib */ = {
isa = PBXGroup;
children = (
3557F9691BDF7E4A00078AF4 /* APService.h */,
3557F96A1BDF7E4A00078AF4 /* libPushSDK-1.8.7.a */,
);
path = lib;
sourceTree = "<group>";
};
35C3C0BA1AE9587F0035AC8A /* Navigation */ = {
isa = PBXGroup;
children = (
......@@ -1641,6 +1673,9 @@
8CDB3C30A601E08F91ED44F8 /* Frameworks */ = {
isa = PBXGroup;
children = (
35A57A0A1BE08823008F3818 /* CoreTelephony.framework */,
35A57A081BE08819008F3818 /* CoreFoundation.framework */,
35A57A061BE0880C008F3818 /* CFNetwork.framework */,
35C3C0B51AE956390035AC8A /* CoreLocation.framework */,
35C3C0B31AE956300035AC8A /* QuartzCore.framework */,
35C3C0B11AE956290035AC8A /* OpenGLES.framework */,
......@@ -2382,6 +2417,7 @@
C1F696081AB870B400F9F5DD /* main.m */,
C15918571AC068110013B391 /* XFFruit-Prefix.pch */,
C1E0930D1AC8FC94003B7126 /* Localizable.strings */,
35ADF29C1BDE62BA00E2A7E4 /* PushConfig.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
......@@ -2415,6 +2451,7 @@
C1FE50291ADD887400C18080 /* Vendors */ = {
isa = PBXGroup;
children = (
3557F9671BDF7E4A00078AF4 /* JiGuang */,
C1E9F5751B2E440A00BF1356 /* JTRecordView */,
C1E9F55B1B2E3B9200BF1356 /* ImagePreview */,
C123A9031B25CBAD003C0C36 /* ASStarRatingView */,
......@@ -2521,6 +2558,7 @@
C1F696001AB870B400F9F5DD /* Frameworks */,
C1F696011AB870B400F9F5DD /* Resources */,
1454647E6246AB3D8AAE6FF2 /* Copy Pods Resources */,
D17DB74B89F4D8DFDFC2E29A /* Embed Pods Frameworks */,
);
buildRules = (
);
......@@ -2561,6 +2599,11 @@
C1F696021AB870B400F9F5DD = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = W54V2VB863;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
};
};
};
C1F6961B1AB870B400F9F5DD = {
CreatedOnToolsVersion = 6.2;
......@@ -2604,6 +2647,7 @@
C123A9191B25CBAD003C0C36 /* selected_star@2x.png in Resources */,
7217E9EF1B72364300FE5C1D /* maskEnable.png in Resources */,
7217E9F61B724A7600FE5C1D /* mask.png in Resources */,
35ADF29D1BDE62BA00E2A7E4 /* PushConfig.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -2654,6 +2698,21 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
D17DB74B89F4D8DFDFC2E29A /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
......@@ -3209,8 +3268,8 @@
baseConfigurationReference = 1B0B22845F5CD40B5CF655F2 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist;
......@@ -3219,9 +3278,10 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/XFFruit/Vendors/JiGuang/lib",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
PROVISIONING_PROFILE = "";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Debug;
......@@ -3231,8 +3291,8 @@
baseConfigurationReference = 7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist;
......@@ -3241,9 +3301,10 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/XFFruit/Vendors/JiGuang/lib",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
PROVISIONING_PROFILE = "";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Release;
......
......@@ -11,6 +11,7 @@
#import "ICRURLProtocol.h"
#import "BMKMapManager.h"
#import "ICRHTTPController.h"
#import "APService.h"
@interface ICRAppDelegate ()
@property (strong, nonatomic) BMKMapManager *mapManager;
......@@ -34,6 +35,35 @@
NSString * path = [NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES) lastObject];
CLog(@"%@",path);
// Required
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_1
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
//categories
[APService
registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
UIUserNotificationTypeSound |
UIUserNotificationTypeAlert)
categories:nil];
} else {
//categories nil
[APService
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)
#else
//categories nil
categories:nil];
[APService
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)
#endif
// Required
categories:nil];
}
[APService setupWithOption:launchOptions];
[self setupBMKMapMgr];
_m_appViewControllerMgr = [ICRAppViewControllerManager getAppViewControllerManager];
......@@ -172,6 +202,25 @@ clickedButtonAtIndex:(NSInteger)buttonIndex {
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
[application setApplicationIconBadgeNumber:0];
[application cancelAllLocalNotifications];
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
CLog (@"%@", [NSString stringWithFormat:@"Device Token: %@", deviceToken]);
[APService registerDeviceToken:deviceToken];
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
// Required
[APService handleRemoteNotification:userInfo];
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void(^)(UIBackgroundFetchResult))completionHandler {
// IOS 7 Support Required
[APService handleRemoteNotification:userInfo];
completionHandler(UIBackgroundFetchResultNewData);
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>APS_FOR_PRODUCTION</key>
<string>1</string>
<key>APP_KEY</key>
<string>fff3aa690885884dda20f7fb</string>
<key>CHANNEL</key>
<string></string>
</dict>
</plist>
//
// APService.h
// APService
//
// Created by JPush on 12-8-15.
// Copyright (c) 2012年 HXHG. All rights reserved.
// Version: 1.8.7
@class CLRegion;
@class UILocalNotification;
extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接
extern NSString *const kJPFNetworkDidCloseNotification; // 关闭连接
extern NSString *const kJPFNetworkDidRegisterNotification; // 注册成功
extern NSString *const kJPFNetworkDidLoginNotification; // 登录成功
extern NSString *const
kJPFNetworkDidReceiveMessageNotification; // 收到消息(非APNS)
extern NSString *const kJPFServiceErrorNotification; // 错误提示
@class CLLocation;
@interface APService : NSObject
#pragma - mark 基本功能
// 以下四个接口是必须调用的
+ (void)setupWithOption:(NSDictionary *)launchingOption; // 初始化
+ (void)registerForRemoteNotificationTypes:(NSUInteger)types
categories:(NSSet *)categories; // 注册APNS类型
+ (void)registerDeviceToken:(NSData *)deviceToken; // 向服务器上报Device Token
+ (void)handleRemoteNotification:(NSDictionary *)
remoteInfo; // 处理收到的APNS消息,向服务器上报收到APNS消息
// 下面的接口是可选的
// 设置标签和(或)别名(若参数为nil,则忽略;若是空对象,则清空;详情请参考文档:http://docs.jpush.cn/pages/viewpage.action?pageId=3309913)
+ (void)setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
target:(id)theTarget;
+ (void)setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget;
+ (void)setTags:(NSSet *)tags
callbackSelector:(SEL)cbSelector
object:(id)theTarget;
+ (void)setAlias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget;
// 用于过滤出正确可用的tags,如果总数量超出最大限制则返回最大数量的靠前的可用tags
+ (NSSet *)filterValidTags:(NSSet *)tags;
#pragma - mark 上报日志
/**
* 记录页面停留时间功能。
* startLogPageView和stopLogPageView为自动计算停留时间
* beginLogPageView为手动自己输入停留时间
*
* @param pageName 页面名称
* @param seconds 页面停留时间
*/
+ (void)startLogPageView:(NSString *)pageName;
+ (void)stopLogPageView:(NSString *)pageName;
+ (void)beginLogPageView:(NSString *)pageName duration:(int)seconds;
/**
* 开启Crash日志收集, 默认是关闭状态.
*/
+ (void)crashLogON;
/**
* 地理位置设置
* 为了更精确的统计用户地理位置,可以调用此方法传入经纬度信息
* 需要链接 CoreLocation.framework 并且 #import <CoreLocation/CoreLocation.h>
* @param latitude 纬度.
* @param longitude 经度.
* @param location 直接传递CLLocation *型的地理信息
*/
+ (void)setLatitude:(double)latitude longitude:(double)longitude;
+ (void)setLocation:(CLLocation *)location;
#pragma - mark 本地通知
/**
* 本地推送,最多支持64个
* @param fireDate 本地推送触发的时间
* @param alertBody 本地推送需要显示的内容
* @param badge 角标的数字。如果不需要改变角标传-1
* @param alertAction 弹框的按钮显示的内容(IOS 8默认为"打开",其他默认为"启动")
* @param notificationKey 本地推送标示符
* @param userInfo 自定义参数,可以用来标识推送和增加附加信息
* @param soundName 自定义通知声音,设置为nil为默认声音
* IOS8新参数
* @param region 自定义参数
* @param regionTriggersOnce 自定义参数
* @param category 自定义参数
*/
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName;
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName
region:(CLRegion *)region
regionTriggersOnce:(BOOL)regionTriggersOnce
category:(NSString *)category
NS_AVAILABLE_IOS(8_0);
/**
* 本地推送在前台推送。默认App在前台运行时不会进行弹窗,在程序接收通知调用此接口可实现指定的推送弹窗。
* @param notification 本地推送对象
* @param notificationKey 需要前台显示的本地推送通知的标示符
*/
+ (void)showLocalNotificationAtFront:(UILocalNotification *)notification
identifierKey:(NSString *)notificationKey;
/**
* 删除本地推送
* @param notificationKey 本地推送标示符
* @param myUILocalNotification 本地推送对象
*/
+ (void)deleteLocalNotificationWithIdentifierKey:(NSString *)notificationKey;
+ (void)deleteLocalNotification:(UILocalNotification *)localNotification;
/**
* 获取指定通知
* @param notificationKey 本地推送标示符
* @return 本地推送对象数组,[array count]为0时表示没找到
*/
+ (NSArray *)findLocalNotificationWithIdentifier:(NSString *)notificationKey;
/**
* 清除所有本地推送对象
*/
+ (void)clearAllLocalNotifications;
#pragma - mark 设置Badge
/**
* set setBadge
* @param value 设置JPush服务器的badge的值
* 本地仍须调用UIApplication:setApplicationIconBadgeNumber函数,来设置脚标
*/
+ (BOOL)setBadge:(NSInteger)value;
/**
* set setBadge
* @param value 清除JPush服务器对badge值的设定.
* 本地仍须调用UIApplication:setApplicationIconBadgeNumber函数,来设置脚标
*/
+ (void)resetBadge;
/**
* get RegistrationID
*/
+ (NSString *)registrationID;
#pragma - mark 打印日志信息配置
/**
* setDebugMode获取更多的Log信息
* 开发过程中建议开启DebugMode
*
* setLogOFF关闭除了错误信息外的所有Log
* 发布时建议开启LogOFF用于节省性能开销
*
* 默认为不开启DebugLog,只显示基本的信息
*/
+ (void)setDebugMode;
+ (void)setLogOFF;
@end
......@@ -11,6 +11,7 @@
#import "GXFFunctionDB.h"
#import "GXFFunctionDBHelper.h"
#import "APService.h"
#define LOGIN_CONTAINER_LEFT_MARGIN (20)
#define LOGIN_CONTAINER_HEIGHT (450)
......@@ -176,6 +177,12 @@
}
//极光别名
NSSet *setTags = [NSSet setWithArray:@[@""]];
[APService setTags:setTags
alias:userUtil.userId
callbackSelector:nil object:nil];
};
void(^fail)(id) = ^(id data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment