Commit 0700bf37 authored by 翟国钧's avatar 翟国钧

增加了用户类型的dictionary

parent 23de3964
......@@ -10,7 +10,7 @@ PODS:
- Masonry (= 1.0.1)
- SDWebImage (= 3.7.6)
- GMOCConstant (0.0.3)
- GMPhobos (0.2.26):
- GMPhobos (0.3.0):
- GMCache (~> 0.1.1)
- GMKit
- Masonry (1.0.1)
......@@ -32,7 +32,7 @@ SPEC CHECKSUMS:
GMFoundation: 08b2e6e12c211ed37aa5dce3588f645a133b9165
GMKit: 04a30d67c6b5468f07c8d9f60d0f8b12dd90b162
GMOCConstant: 39371248b4d8d54929391bfcd2c5883776436c4b
GMPhobos: 853ef8239bee6c908286c9cbb3d8b39fa1c70e97
GMPhobos: a18a0cabb9531e216f6964649faeaa3eda5f9e90
Masonry: a1a931a0d08870ed8ae415a2ea5ea68ebcac77df
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
......
{
"name": "GMPhobos",
"version": "0.2.26",
"version": "0.3.0",
"summary": "GM statistic data sdk",
"description": "GM event track sdk.",
"homepage": "http://git.gengmei.cc/gengmeiios/GMPhobos",
......@@ -10,7 +10,7 @@
},
"source": {
"git": "git@git.gengmei.cc:gengmeiios/GMPhobos.git",
"tag": "0.2.26"
"tag": "0.3.0"
},
"platforms": {
"ios": "8.0"
......
......@@ -10,7 +10,7 @@ PODS:
- Masonry (= 1.0.1)
- SDWebImage (= 3.7.6)
- GMOCConstant (0.0.3)
- GMPhobos (0.2.26):
- GMPhobos (0.3.0):
- GMCache (~> 0.1.1)
- GMKit
- Masonry (1.0.1)
......@@ -32,7 +32,7 @@ SPEC CHECKSUMS:
GMFoundation: 08b2e6e12c211ed37aa5dce3588f645a133b9165
GMKit: 04a30d67c6b5468f07c8d9f60d0f8b12dd90b162
GMOCConstant: 39371248b4d8d54929391bfcd2c5883776436c4b
GMPhobos: 853ef8239bee6c908286c9cbb3d8b39fa1c70e97
GMPhobos: a18a0cabb9531e216f6964649faeaa3eda5f9e90
Masonry: a1a931a0d08870ed8ae415a2ea5ea68ebcac77df
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.2.26</string>
<string>0.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -104,12 +104,12 @@ THE SOFTWARE.
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2016 &#21271;&#20140;&#26356;&#32654;&#20114;&#21160;&#20449;&#24687;&#31185;&#25216;&#26377;&#38480;&#20844;&#21496;
<string>Copyright (c) 2016 北京更美互动信息科技有限公司
&#20165;&#38480;&#21271;&#20140;&#26356;&#32654;&#20114;&#21160;&#20449;&#24687;&#31185;&#25216;&#26377;&#38480;&#20844;&#21496;&#20869;&#37096;&#20351;&#29992;
仅限北京更美互动信息科技有限公司内部使用
</string>
<key>License</key>
<string>&#20165;&#38480;&#21271;&#20140;&#26356;&#32654;&#20114;&#21160;&#20449;&#24687;&#31185;&#25216;&#26377;&#38480;&#20844;&#21496;&#20869;&#37096;&#20351;&#29992;</string>
<string>仅限北京更美互动信息科技有限公司内部使用</string>
<key>Title</key>
<string>GMKit</string>
<key>Type</key>
......
......@@ -71,6 +71,11 @@
@property (strong, nonatomic) CLLocation *gps;
/**
* 记录用户类型
*/
@property (strong, nonatomic) NSMutableDictionary *userType;
#pragma mark - 事件采集
/**
......
......@@ -14,6 +14,7 @@
#import "UIResponder+PhobosPV.h"
#import "UIDevice+Resolutions.h"
#import "PhobosUtil.h"
#import <GMFoundation/NSString+GM.h>
static Phobos *sharedClient = nil;
static NSString *sdkVersion = @"110";
......@@ -52,6 +53,7 @@ static NSString *sdkVersion = @"110";
_userId = 0;
_netStatus = @"";
_currentCityId = @"";
_userType = [[NSMutableDictionary alloc] initWithCapacity:0];
_appVersion = [PhobosUtil getAppVersion];
[self setupNotification];
[self handleSessionStart];
......@@ -67,6 +69,25 @@ static NSString *sdkVersion = @"110";
}
}
- (void)setUserType:(NSMutableDictionary *)userType {
if (userType == nil && userType.count == 0) {
return;
}
NSArray *newKeys = userType.allKeys;
NSArray *oldKeys = _userType.allKeys;
for (NSString *newKey in newKeys) {
if ([oldKeys containsObject:newKey]) {
NSString *newValue = [[userType objectForKey:newKey] stringValue];
NSString *oldValue = [[_userType objectForKey:newKey] stringValue];
if (![newValue isEqualToString:oldValue]) {
[_userType setObject:[userType objectForKey:newKey] forKey:newKey];
}
} else {
[_userType setObject:[userType objectForKey:newKey] forKey:newKey];
}
}
}
- (void)handleEventAfterInit{
WMCacheService *cache = [WMCacheService sharedInstance];
......@@ -321,6 +342,7 @@ static NSString *sdkVersion = @"110";
self.appName, @"name",
self.appVersion, @"version",
self.channelId,@"channel",
[NSString dataToJsonString:_userType],@"user_type",
self.currentCityId,@"current_city_id", nil];
[dict setObject:eventId forKey:@"type"];
[dict setObject:appParams forKey:@"app"];
......
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