Commit 3d8cb6e5 authored by yueming lu's avatar yueming lu

Merge branch 'master' into lym/master

* master:
  Bump version to 2.1.4
  修改isFirst 避免冲突
  Bump version to 2.1.3
  修改isFirst 问题
  Bump version to 2.1.2
  修改is_first赋值位置
  Bump version to 2.1.1
  modify phobos isfirst 类型
  Bump version to 2.1.0
  暂提
  修改is_first逻辑
  Bump version to 2.0.9
  修改类型转换
  暂提
  Bump version to 2.0.8
  新增is_first字段
  Bump version to 2.0.7
  修改崩溃
parents 33c9f7a4 568b3ba0
......@@ -60,6 +60,7 @@ NSString *const MockCityId = @"beijing";
[dict setObject:@"" forKey:@"extra_param"];
[dict setObject:@"" forKey:@"referrer_tab_name"];
[dict setObject:@(0) forKey:@"is_push"];
[dict setObject:@(0) forKey:@"is_first"];
// [Phobos track:@"page_view" attributes:dict];
// NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
//
......
PODS:
- GMCache (1.0.1):
- TMCache (= 2.1.0)
- GMPhobos (2.0.6):
- GMPhobos (2.1.2):
- GMCache
- MagicalRecord
- MJExtension
......@@ -28,7 +28,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMPhobos: e70f78a492eca95a5c5152620deda65e49f4e216
GMPhobos: b86a68a2d1d5a40cebc0f1d89306fe86907371cf
MagicalRecord: 53bed74b4323b930992a725be713e53b37d19755
MJExtension: 635f2c663dcb1bf76fa4b715b2570a5710aec545
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
......
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "GMPhobos"
s.version = "2.0.6"
s.version = "2.1.4"
s.summary = "GM statistic data sdk"
s.description = <<-DESC
......
......@@ -262,6 +262,9 @@ static dispatch_semaphore_t _phobos_semaphore;
- (void)onPVEnd:(UIResponder<PhobosPVProtocol> *)page {
if (![PhobosUtil isNonEmpty:page.pageName] || !page.needLogPV) {
if (!page.isFirstEntry) {
page.isFirstEntry = YES;
}
return;
}
// 业务层更新
......@@ -284,7 +287,11 @@ static dispatch_semaphore_t _phobos_semaphore;
[dict setObject:PhobosSafeString(page.messageId) forKey:@"message_id"];
[dict setObject:PhobosSafeString(page.inTimeMillis) forKey:@"in_time_millis"];
[dict setObject:PhobosSafeString([PhobosUtil currentMMTime]) forKey:@"out_time_millis"];
//首次进来为1,再次进入的时候都为0
[dict setObject:page.isFirstEntry ? @(0):@(1) forKey:@"is_first"];
if (!page.isFirstEntry) {
page.isFirstEntry = YES;
}
if (page.inTime.length > 0) {
// 页面显示时间为空时不记录页面pv事件
[NewPhobos track:@"page_view" attributes:dict];
......
......@@ -340,6 +340,9 @@ static OldPhobos *sharedClient = nil;
- (void)onPVEnd:(UIResponder<PhobosPVProtocol> *)page {
if (![PhobosUtil isNonEmpty:page.pageName] || !page.needLogPV) {
if (!page.isFirstEntry) {
page.isFirstEntry = YES;
}
return;
}
// 业务层更新
......@@ -362,7 +365,11 @@ static OldPhobos *sharedClient = nil;
[dict setObject:PhobosSafeString(page.messageId) forKey:@"message_id"];
[dict setObject:PhobosSafeString(page.inTimeMillis) forKey:@"in_time_millis"];
[dict setObject:PhobosSafeString([PhobosUtil currentMMTime]) forKey:@"out_time_millis"];
//首次进来为1,再次进入的时候都为0
[dict setObject:page.isFirstEntry ? @(0):@(1) forKey:@"is_first"];
if (!page.isFirstEntry) {
page.isFirstEntry = YES;
}
if (page.inTime.length > 0) {
// 页面显示时间为空时不记录页面pv事件
[OldPhobos track:@"page_view" attributes:dict];
......
......@@ -89,6 +89,11 @@ typedef void(^PhobosUpdatePVBlock)(void);
获取上一个页面链路的page_name link by 7.20.0 如果有此页面有page_name则添加 , 没有添加""
*/
@property (nonatomic, strong) NSArray *referrerLink;
/**
是否是第一次来到这个页面,在viewDidLoad赋值为1
在即将消失的方法赋值为0 (是否是首次上报)
*/
@property (nonatomic, assign) BOOL isFirstEntry;
/// 业务层更新PVStart信息
@property (nonatomic, copy) PhobosUpdatePVBlock updatePVStartBlock;
......
......@@ -214,6 +214,9 @@
if (!string) {
return NO;
}
if (![string isKindOfClass:[NSString class]]) {
string = [NSString stringWithFormat:@"%@", string];
}
NSMutableCharacterSet *emptyStringSet = [[NSMutableCharacterSet alloc] init];
[emptyStringSet formUnionWithCharacterSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
[emptyStringSet formUnionWithCharacterSet: [NSCharacterSet characterSetWithCharactersInString: @" "]];
......
......@@ -254,6 +254,15 @@
objc_setAssociatedObject(self, @selector(updatePVStartBlock), updatePVStartBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
- (void)setIsFirstEntry:(BOOL)isFirstEntry {
objc_setAssociatedObject(self, @selector(isFirstEntry), @(isFirstEntry), OBJC_ASSOCIATION_ASSIGN);
}
-(BOOL)isFirstEntry {
NSNumber *num = objc_getAssociatedObject(self, _cmd);
return [num boolValue];
}
- (PhobosUpdatePVBlock)updatePVStartBlock {
PhobosUpdatePVBlock updatePVBlock = objc_getAssociatedObject(self, @selector(updatePVStartBlock));
return updatePVBlock;
......
......@@ -5,57 +5,57 @@
<testcase classname="fastlane.lanes" name="00: Verifying fastlane version" time="0.006756">
<testcase classname="fastlane.lanes" name="00: Verifying fastlane version" time="0.020189">
</testcase>
<testcase classname="fastlane.lanes" name="01: default_platform" time="0.00161">
<testcase classname="fastlane.lanes" name="01: default_platform" time="0.004282">
</testcase>
<testcase classname="fastlane.lanes" name="02: git_pull" time="1.473714">
<testcase classname="fastlane.lanes" name="02: git_pull" time="1.228125">
</testcase>
<testcase classname="fastlane.lanes" name="03: pod_repo_update" time="1.628077">
<testcase classname="fastlane.lanes" name="03: pod_repo_update" time="2.093921">
</testcase>
<testcase classname="fastlane.lanes" name="04: pod_lib_lint" time="10.35343">
<testcase classname="fastlane.lanes" name="04: pod_lib_lint" time="9.748885">
</testcase>
<testcase classname="fastlane.lanes" name="05: version_bump_podspec" time="0.002677">
<testcase classname="fastlane.lanes" name="05: version_bump_podspec" time="0.00653">
</testcase>
<testcase classname="fastlane.lanes" name="06: git_commit_all" time="0.027839">
<testcase classname="fastlane.lanes" name="06: git_commit_all" time="0.0233">
</testcase>
<testcase classname="fastlane.lanes" name="07: add_git_tag" time="0.012609">
<testcase classname="fastlane.lanes" name="07: add_git_tag" time="0.016803">
</testcase>
<testcase classname="fastlane.lanes" name="08: push_to_git_remote" time="0.951956">
<testcase classname="fastlane.lanes" name="08: push_to_git_remote" time="0.933305">
</testcase>
<testcase classname="fastlane.lanes" name="09: pod_push" time="9.592703">
<testcase classname="fastlane.lanes" name="09: pod_push" time="10.6375">
</testcase>
<testcase classname="fastlane.lanes" name="10: pod_repo_update" time="1.328229">
<testcase classname="fastlane.lanes" name="10: pod_repo_update" time="1.73052">
</testcase>
......
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