Authored by 周蓉君

整理宏和全局常量,增加预编译都文件,修改相关引用。Review by 阿瑟。

Showing 38 changed files with 172 additions and 185 deletions
... ... @@ -134,6 +134,7 @@
CA873DA91AEF51AE008095A4 /* YHNetworkServiceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHNetworkServiceTests.m; sourceTree = "<group>"; };
CA873DAB1AEF7059008095A4 /* YHAnalyticsMacro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YHAnalyticsMacro.h; sourceTree = "<group>"; };
CA873DAC1AEF7107008095A4 /* YH_Analytics-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YH_Analytics-Prefix.pch"; sourceTree = "<group>"; };
CA873DAD1AF08880008095A4 /* YH_AnalyticsTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YH_AnalyticsTests-Prefix.pch"; sourceTree = "<group>"; };
CAA6BD351AE4E857006C3332 /* FakeLocationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FakeLocationManager.h; sourceTree = "<group>"; };
CAA6BD361AE4E857006C3332 /* FakeLocationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FakeLocationManager.m; sourceTree = "<group>"; };
CAA6BD3D1AE79ECC006C3332 /* YHAssemblyAssistantLogicTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHAssemblyAssistantLogicTests.m; sourceTree = "<group>"; };
... ... @@ -314,6 +315,7 @@
isa = PBXGroup;
children = (
194EDC8E1A7F52D100421E6C /* Info.plist */,
CA873DAD1AF08880008095A4 /* YH_AnalyticsTests-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
... ... @@ -869,6 +871,8 @@
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "YH_AnalyticsTests/YH_AnalyticsTests-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
... ... @@ -903,6 +907,8 @@
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "YH_AnalyticsTests/YH_AnalyticsTests-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
... ...
... ... @@ -41,7 +41,7 @@
- (IBAction)error:(id)sender {
[[YH_Analytics sharedInstance]logError:@"NETWORK" parameters:
[[YH_Analytics sharedInstance]logError:kErrorTypeHTTP parameters:
@{JsonKeyErrorEC:@"503", // 错误码
JsonKeyErrorEI:@"getUserAvatar" //发生错误接口
}];
... ...
... ... @@ -14,7 +14,7 @@
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
#ifndef __IPHONE_6_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#warning "This project uses features only available in iOS SDK 6.0 and later."
#endif
#ifdef __OBJC__
... ...
... ... @@ -9,22 +9,6 @@
#import <Foundation/Foundation.h>
#import "YHAnalyItemData.h"
extern NSString * const JsonKeyDeviceSV;
extern NSString * const JsonKeyDeviceAK;
extern NSString * const JsonKeyDeviceCH;
extern NSString * const JsonKeyDeviceUDID;
extern NSString * const JsonKeyDeviceOS;
extern NSString * const JsonKeyDeviceOSV;
extern NSString * const JsonKeyDeviceDM;
extern NSString * const JsonKeyDeviceIFA;
extern NSString * const JsonKeyDeviceIFV;
extern NSString * const JsonKeyDeviceRES;
extern NSString * const JsonKeyDeviceMAC;
@interface YHDevice : YHAnalyItemData
@property (copy, nonatomic) NSString *ak; // App key 业务
... ...
... ... @@ -18,22 +18,6 @@
#import "YHDevice.h"
#define kYHAnalyticsSDKVersion @"1.0"
#define kDefalutChannelNum @"2119"
NSString * const JsonKeyDeviceSV = @"sv";
NSString * const JsonKeyDeviceAK = @"ak";
NSString * const JsonKeyDeviceCH = @"ch";
NSString * const JsonKeyDeviceOS = @"os";
NSString * const JsonKeyDeviceOSV = @"osv";
NSString * const JsonKeyDeviceDM = @"dm";
NSString * const JsonKeyDeviceUDID = @"udid";
NSString * const JsonKeyDeviceIFA = @"ifa";
NSString * const JsonKeyDeviceIFV = @"ifv";
NSString * const JsonKeyDeviceRES = @"res";
NSString * const JsonKeyDeviceMAC = @"mac";
@interface YHDevice ()
@property (copy, nonatomic) NSString *sv; // 采集数据sdk的版本
... ...
... ... @@ -9,15 +9,6 @@
#import <Foundation/Foundation.h>
#import "YHAnalyItemData.h"
extern NSString * const JsonKeyErrorUID;
extern NSString * const JsonKeyErrorTS;
extern NSString * const JsonKeyErrorSID;
extern NSString * const JsonKeyErrorET;
extern NSString * const JsonKeyErrorPARAM;
extern NSString * const JsonKeyErrorEC; // 错误码
extern NSString * const JsonKeyErrorST; // 错误堆栈(crash log)
extern NSString * const JsonKeyErrorEI; // 发生错误接口
@interface YHError : YHAnalyItemData
... ...
... ... @@ -8,16 +8,6 @@
#import "YHError.h"
NSString * const JsonKeyErrorUID = @"uid";
NSString * const JsonKeyErrorTS = @"ts";
NSString * const JsonKeyErrorSID = @"sid";
NSString * const JsonKeyErrorET = @"et";
NSString * const JsonKeyErrorPARAM = @"param";
NSString * const JsonKeyErrorEC = @"ec"; // 错误码
NSString * const JsonKeyErrorST = @"st"; // 错误堆栈(crash log)
NSString * const JsonKeyErrorEI = @"ei"; // 发生错误接口
@implementation YHError
- (id)init
... ...
... ... @@ -9,12 +9,6 @@
#import <Foundation/Foundation.h>
#import "YHAnalyItemData.h"
extern NSString * const JsonKeyEventUID;
extern NSString * const JsonKeyEventTS;
extern NSString * const JsonKeyEventSID;
extern NSString * const JsonKeyEventOP;
extern NSString * const JsonKeyEventPARAM;
extern NSString * const JsonKeyEventINDEX;
@interface YHEvent : YHAnalyItemData
... ...
... ... @@ -8,13 +8,6 @@
#import "YHEvent.h"
NSString * const JsonKeyEventUID = @"uid";
NSString * const JsonKeyEventTS = @"ts";
NSString * const JsonKeyEventSID = @"sid";
NSString * const JsonKeyEventOP = @"op";
NSString * const JsonKeyEventPARAM = @"param";
NSString * const JsonKeyEventINDEX = @"index";
@implementation YHEvent
- (id)init
... ...
... ... @@ -9,17 +9,6 @@
#import <Foundation/Foundation.h>
#import "YHAnalyItemData.h"
extern NSString * const JsonKeyStatusAV;
extern NSString * const JsonKeyStatusAB;
extern NSString * const JsonKeyStatusNET;
extern NSString * const JsonKeyStatusSID;
extern NSString * const JsonKeyStatusCA;
extern NSString * const JsonKeyStatusUDID;
extern NSString * const JsonKeyStatusCY;
extern NSString * const JsonKeyStatusLN;
extern NSString * const JsonKeyStatusLO;
extern NSString * const JsonKeyStatusLA;
@interface YHStatus : YHAnalyItemData
@property (copy, nonatomic, readonly) NSString *av; // App版本号
... ...
... ... @@ -12,24 +12,6 @@
#import "YHStatus.h"
#define kCarrierCodeChinaUnknown @"0"
#define kCarrierCodeChinaMobile @"1"
#define kCarrierCodeChinaTelecom @"2"
#define kCarrierCodeChinaUnicom @"3"
#define kCarrierCodeChinaTietong @"4"
NSString * const JsonKeyStatusAV = @"av";
NSString * const JsonKeyStatusAB = @"ab";
NSString * const JsonKeyStatusNET = @"net";
NSString * const JsonKeyStatusSID = @"sid";
NSString * const JsonKeyStatusCA = @"ca";
NSString * const JsonKeyStatusUDID = @"udid";
NSString * const JsonKeyStatusCY = @"cy";
NSString * const JsonKeyStatusLN = @"ln";
NSString * const JsonKeyStatusLO = @"lo";
NSString * const JsonKeyStatusLA = @"la";
@interface YHStatus ()
@property (copy, nonatomic) NSString *av; // App版本号
... ...
... ... @@ -9,23 +9,7 @@
#import <Foundation/Foundation.h>
#import "YHAnalyItemData.h"
//阀值
#define kMaxLocalEventsCount 3000 // 本地持久化event最大条数
#define kMaxLocalRecoderFileSize (1024 * 300) // 本地持久化文件大小(300KB)
extern NSString * const kNetWorkStatusUnknow;
extern NSString * const kNetWorkStatusWIFI;
extern NSString * const kNetWorkStatus2G;
extern NSString * const kNetWorkStatus3G;
extern NSString * const kNetWorkStatus4G;
extern NSString * const JsonKeyDataTypeDevice;
extern NSString * const JsonKeyDataTypeStatus;
extern NSString * const JsonKeyDataTypeEvents;
extern NSString * const JsonKeyDataTypeErrors;
/*!
/*
用于组装数据
*/
... ...
... ... @@ -15,29 +15,11 @@
//#import "YHEventFactory.h"
//#import "YHStatusFactory.h"
//#import "YHDeviceFactory.h"
#import "YHCrashReporter.h"
#import "YHEvent.h"
#import "YHError.h"
#import "YHDevice.h"
#import "YHStatus.h"
#define kPathCaches [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]
#define kPathLogSystem [kPathCaches stringByAppendingPathComponent:@"YHLogSystem"]
#define kYASApiMethod @"yas_mobile"
NSString * const kNetWorkStatusUnknow = @"0";
NSString * const kNetWorkStatusWIFI = @"1";
NSString * const kNetWorkStatus2G = @"2";
NSString * const kNetWorkStatus3G = @"3";
NSString * const kNetWorkStatus4G = @"4";
NSString * const JsonKeyDataTypeDevice = @"device";
NSString * const JsonKeyDataTypeStatus = @"status";
NSString * const JsonKeyDataTypeEvents = @"events";
NSString * const JsonKeyDataTypeErrors = @"errors";
static dispatch_queue_t persisting_queue() {
static dispatch_queue_t persisting_queue;
static dispatch_once_t onceToken;
... ... @@ -166,7 +148,7 @@ static dispatch_queue_t persisting_queue() {
- (NSString *)eventFileName
{
if (!_eventFileName || [_eventFileName isEqualToString:@""]) {
_eventFileName = [self.eventFilePath stringByAppendingPathComponent:@"LogSystem.plist"];
_eventFileName = [self.eventFilePath stringByAppendingPathComponent:kLogSystemName];
}
return _eventFileName;
}
... ... @@ -246,7 +228,7 @@ static dispatch_queue_t persisting_queue() {
YHError *errorData = (YHError *)itemData;
NSDictionary *st = [errorData.param objectForKey:JsonKeyErrorST];
if ([st.allKeys containsObject:CrashReporterKeyCallstack]) { //判断是否为crash 类型 error
if ([st.allKeys containsObject:JsonKeyCrashCallstack]) { //判断是否为crash 类型 error
// crash 类型error的本地化任务须在主线程中完成
[self writeErrorToFile:errorData];
... ...
... ... @@ -9,14 +9,6 @@
#import <Foundation/Foundation.h>
extern NSString * const CrashReporterKeyCallstack;
extern NSString * const CrashReporterKeySignal;
extern NSString * const CrashReporterKeySignalName;
extern NSString * const CrashReporterKeyExceptionName;
extern NSString * const CrashReporterKeyExceptionReason;
@interface YHCrashReporter : NSObject
+ (YHCrashReporter *)sharedInstance;
... ...
... ... @@ -12,15 +12,6 @@
#include <signal.h>
#include <execinfo.h>
NSString * const CrashReporterKeyCallstack = @"cs";
NSString * const CrashReporterKeySignal = @"sig";
NSString * const CrashReporterKeySignalName = @"sign";
NSString * const CrashReporterKeyExceptionName = @"exn";
NSString * const CrashReporterKeyExceptionReason = @"exr";
#pragma mark - C Fuctions
void sighandler(int signal)
... ... @@ -37,9 +28,9 @@ void sighandler(int signal)
NSArray *arr = [crash callstackAsArray];
NSDictionary *userInfo = @{
CrashReporterKeyCallstack : arr,
CrashReporterKeySignal : @(signal),
CrashReporterKeySignalName : [NSString stringWithUTF8String:names[signal]],
JsonKeyCrashCallstack : arr,
JsonKeyCrashSignal : @(signal),
JsonKeyCrashSignalName : [NSString stringWithUTF8String:names[signal]],
};
[crash performSelectorOnMainThread:@selector(handleSignal:) withObject:userInfo waitUntilDone:YES];
}
... ... @@ -50,9 +41,9 @@ void uncaughtCrashExceptionHandler(NSException *exception)
NSArray *arr = [exception callStackSymbols];
NSDictionary *userInfo = @{
CrashReporterKeyCallstack : arr,
CrashReporterKeyExceptionName : exception.name,
CrashReporterKeyExceptionReason : exception.reason,
JsonKeyCrashCallstack : arr,
JsonKeyCrashExceptionName : exception.name,
JsonKeyCrashExceptionReason : exception.reason,
};
[crash performSelectorOnMainThread:@selector(handleNSException:) withObject:userInfo waitUntilDone:YES];
}
... ... @@ -129,7 +120,7 @@ void uncaughtCrashExceptionHandler(NSException *exception)
return;
}
[[YH_Analytics sharedInstance] logError:@"CRASH" parameters:@{ JsonKeyErrorST: userInfo}];
[[YH_Analytics sharedInstance] logError:kErrorTypeCrash parameters:@{ JsonKeyErrorST: userInfo}];
}
- (void)handleNSException:(NSDictionary*)userInfo
... ... @@ -139,7 +130,7 @@ void uncaughtCrashExceptionHandler(NSException *exception)
return;
}
[[YH_Analytics sharedInstance] logError:@"CRASH" parameters:@{ JsonKeyErrorST: userInfo}];
[[YH_Analytics sharedInstance] logError:kErrorTypeCrash parameters:@{ JsonKeyErrorST: userInfo}];
}
@end
... ...
... ... @@ -8,10 +8,6 @@
#import "YHNetworkService.h"
#define kSafeValue(X) (!(X) ? [NSNull null] : (X))
#define kURLAnalyticsService @"http://analytics.yhurl.com/"
#define kYASApiMethodUploadData @"yas_mobile"
#define kYASApiMethodGetNewStrategy @""
@interface YHNetworkService ()
... ...
... ... @@ -9,10 +9,120 @@
#ifndef YH_Analytics_YHAnalyticsMacro_h
#define YH_Analytics_YHAnalyticsMacro_h
/**************** Debug Tool ***************/
#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define DLog(...)
#endif
/************* General Tool **************/
#define kSafeValue(X) (!(X) ? [NSNull null] : (X))
/*********** App Configuration ************/
#define kYHAnalyticsSDKVersion @"1.0" // 数据分析库版本
#define kDefalutChannelNum @"2119" // 推广渠道号
#define kMinInterval 60 // 间隔发送的最小时间周期,60秒
#define kMaxLocalEventsCount 3000 // 本地持久化event最大条数,3000条
#define kMaxLocalRecoderFileSize (1024 * 300) // 本地持久化文件大小(300KB)
/*********** Path and FileName *************/
#define kPathCaches [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]
#define kPathLogSystem [kPathCaches stringByAppendingPathComponent:@"YHLogSystem"] // 日志保存路径
#define kLogSystemName @"LogSystem.plist" // 日志文件名称
/********* Service and Interface *********/
#define kURLAnalyticsService @"http://analytics.yhurl.com/" // 数据分析服务器
#define kYASApiMethodUploadData @"yas_mobile" // 上传监测数据接口
#define kYASApiMethodGetNewStrategy @"" // 获取新发送策略,接口名未定
/************ UserDefault Key ************/
#define kKeyUserDefaultsLastUploadTimestamp @"lastSendTimestampKey" // 间隔发送的上次时间
#define kKeyUserDefaultsCustomInterval @"customInterval" // 间隔发送的时间周期
#define kKeyUserDefaultsLogStrategy @"LOGSTRATEGY" // 发送策略
/**************** Json Key ***************/
// 四种数据类型
#define JsonKeyDataTypeDevice @"device" // 终端信息,包括终端的状态
#define JsonKeyDataTypeStatus @"status" // 状态信息,包括一次操作时,用户的位置和网络等信息
#define JsonKeyDataTypeEvents @"events" // 事件信息,包括用户的操作日志
#define JsonKeyDataTypeErrors @"errors" // 错误信息,包括用户在使用过程中发生的错误
// 终端参数
#define JsonKeyDeviceSV @"sv" // 采集数据sdk的版本
#define JsonKeyDeviceAK @"ak" // App key 业务
#define JsonKeyDeviceCH @"ch" // 推广渠道号
#define JsonKeyDeviceOS @"os" // 操作系统
#define JsonKeyDeviceOSV @"osv" // 操作系统版本
#define JsonKeyDeviceDM @"dm" // 设备型号
#define JsonKeyDeviceUDID @"udid" // 设备标识
#define JsonKeyDeviceIFA @"ifa" // idfa
#define JsonKeyDeviceIFV @"ifv" // idfv
#define JsonKeyDeviceRES @"res" // 分辨率
#define JsonKeyDeviceMAC @"mac" // Mac地址
// 状态参数
#define JsonKeyStatusAV @"av" // App版本号
#define JsonKeyStatusAB @"ab" // App Build号
#define JsonKeyStatusNET @"net" // 当前网络状态 0 - 未知, 1 - WiFi, 2 - 2G, 3 - 3G,4 - 4G
#define JsonKeyStatusSID @"sid" // 会话id(由设备标识和启动时间戳md5)
#define JsonKeyStatusCA @"ca" // 运营商 0 - 未知, 1 - 中国移动, 2 - 中国电信, 3 - 中国联通
#define JsonKeyStatusUDID @"udid" // 设备标识
#define JsonKeyStatusCY @"cy" // 国家
#define JsonKeyStatusLN @"ln" // 语言
#define JsonKeyStatusLO @"lo" // 经度
#define JsonKeyStatusLA @"la" // 纬度
// 事件参数
#define JsonKeyEventUID @"uid" // 用户id
#define JsonKeyEventTS @"ts" // 时间戳
#define JsonKeyEventSID @"sid" // 会话id(由设备标识和启动时间戳md5)
#define JsonKeyEventOP @"op" // 操作id
#define JsonKeyEventPARAM @"param" // 操作参数
#define JsonKeyEventINDEX @"index" // 事件序号
// 错误参数
#define JsonKeyErrorUID @"uid" // 用户id
#define JsonKeyErrorTS @"ts" // 时间戳
#define JsonKeyErrorSID @"sid" // 会话id(由设备标识和启动时间戳做md5)
#define JsonKeyErrorET @"et" // 错误类型 error type
#define JsonKeyErrorEC @"ec" // 错误码
#define JsonKeyErrorST @"st" // 错误堆栈(crash log)
#define JsonKeyErrorEI @"ei" // 发生错误接口
#define JsonKeyErrorPARAM @"param" // 错误自定义参数
// 中断和异常参数,文档中没有定义
#define JsonKeyCrashCallstack @"cs" // 中断或异常堆栈
#define JsonKeyCrashSignal @"sig" // 中断信号量
#define JsonKeyCrashSignalName @"sign" // 中断信号名称
#define JsonKeyCrashExceptionName @"exn" // 异常名称
#define JsonKeyCrashExceptionReason @"exr" // 异常原因
/**************** Parameters ***************/
// 当前网络状态
#define kNetWorkStatusUnknow @"0" // 未知
#define kNetWorkStatusWIFI @"1" // WiFi
#define kNetWorkStatus2G @"2" // 2G
#define kNetWorkStatus3G @"3" // 3G
#define kNetWorkStatus4G @"4" // 4G
// 运营商
#define kCarrierCodeChinaUnknown @"0" // 未知
#define kCarrierCodeChinaMobile @"1" // 中国移动
#define kCarrierCodeChinaTelecom @"2" // 中国电信
#define kCarrierCodeChinaUnicom @"3" // 中国联通
#define kCarrierCodeChinaTietong @"4" // 中国铁通
#define kErrorTypeHTTP @"NETWORK" // HTTP返回非200的网络错误(et为NETWORK)
#define kErrorTypeCrash @"CRASH" // 客户端Crash错误(et为CRASH)
#endif
... ...
... ... @@ -11,11 +11,6 @@
#import "YHError.h"
#import "YHEvent.h"
#define kKeyUserDefaultsLastUploadTimestamp @"lastSendTimestampKey"
#define kKeyUserDefaultsCustomInterval @"customInterval"
#define kKeyUserDefaultsLogStrategy @"LOGSTRATEGY"
#define kMinInterval 60
typedef enum _YHLogStrategy {
LogStrategyAppLaunch = 0, //每次程序启动
... ...
... ... @@ -277,7 +277,7 @@
self.error.param = param;
// crash 不支持立即发送
if (self.logStrategy == LogStrategyImmedi && ![errorType isEqualToString:@"CRASH"]) {
if (self.logStrategy == LogStrategyImmedi && ![errorType isEqualToString:kErrorTypeCrash]) {
[[YHAssemblyAssistant sharedInstance] uploadImmedilyWithEvent:self.error];
} else {
[[YHAssemblyAssistant sharedInstance] saveItemData:self.error];
... ...
... ... @@ -8,7 +8,6 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "NSString+YHAnalytics.h"
@interface NSString_YHAnalyticsTests : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHAnalyItemData.h"
@interface YHAnalyItemDataTest : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import <CoreLocation/CoreLocation.h>
#import "YHAssemblyAssistant.h"
#import "YHDevice.h"
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHAssemblyAssistant.h"
#import "YHDevice.h"
#import "YHStatus.h"
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHCrashReporter.h"
#import "YH_Analytics.h"
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHDataFactory.h"
@interface YHDataFactoryTests : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHDeviceFactory.h"
@interface YHDeviceFactoryTests : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHDevice.h"
@interface YHDeviceTests : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHErrorFactory.h"
@interface YHErrorFactoryTests : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHError.h"
@interface YHErrorTests : XCTestCase{
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHEventFactory.h"
@interface YHEventFactoryTests : XCTestCase {
... ...
... ... @@ -8,7 +8,6 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHEvent.h"
@interface YHEventTests : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHNetworkService.h"
@interface YHNetworkService (XCTestCase)
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHNetworkUserAgent.h"
@interface YHNetworkUserAgentTests : XCTestCase
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHStatusFactory.h"
@interface YHStatusFactoryTests : XCTestCase {
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHStatus.h"
@interface YHStatusTests : XCTestCase {
... ...
... ... @@ -8,7 +8,6 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHCrashReporter.h"
#import "YHAssemblyAssistant.h"
#import "YH_Analytics.h"
... ...
//
// YH_AnalyticsTests-Prefix.pch
// YH_Analytics
//
// Created by Zhou Rongjun on 15/4/29.
// Copyright (c) 2015年 YOHO. All rights reserved.
//
#ifndef YH_Analytics_YH_AnalyticsTests_Prefix_pch
#define YH_Analytics_YH_AnalyticsTests_Prefix_pch
#import <Availability.h>
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
#ifndef __IPHONE_6_0
#warning "This project uses features only available in iOS SDK 6.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YHAnalyticsMacro.h"
#endif
#endif
... ...
... ... @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "OCMock.h"
#import "YH_Analytics.h"
@interface YH_AnalyticsTests : XCTestCase {
... ...