Commit aee43e6f authored by Thierry's avatar Thierry

Release 0.0.8.

parent bb9ada8d
...@@ -28,7 +28,7 @@ PODS: ...@@ -28,7 +28,7 @@ PODS:
- GMLibrary/Network (0.0.1): - GMLibrary/Network (0.0.1):
- AFNetworking (~> 2.6.1) - AFNetworking (~> 2.6.1)
- GMLibrary/Cache (~> 0.0.1) - GMLibrary/Cache (~> 0.0.1)
- GMPhobos (0.0.6): - GMPhobos (0.0.7):
- GMLibrary (~> 0.0.1) - GMLibrary (~> 0.0.1)
- TMCache (2.1.0) - TMCache (2.1.0)
...@@ -37,12 +37,12 @@ DEPENDENCIES: ...@@ -37,12 +37,12 @@ DEPENDENCIES:
EXTERNAL SOURCES: EXTERNAL SOURCES:
GMPhobos: GMPhobos:
:path: ../ :path: "../"
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60 AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60
GMLibrary: c31039ad32bc93f866d6c3052c20acb8cf9c1568 GMLibrary: c31039ad32bc93f866d6c3052c20acb8cf9c1568
GMPhobos: 99ff08c5770ebb1a8c15579a2e0ac260a24ea386 GMPhobos: 0deddf9803485afce92be86985e9d13f045b2ccd
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
COCOAPODS: 0.39.0 COCOAPODS: 0.39.0
{ {
"name": "GMPhobos", "name": "GMPhobos",
"version": "0.0.6", "version": "0.0.7",
"summary": "GM statistic data sdk", "summary": "GM statistic data sdk",
"description": "GM statistic data sdk.", "description": "GM event track sdk.",
"homepage": "http://git.gengmei.cc/gengmeiios/GMPhobos", "homepage": "http://git.gengmei.cc/gengmeiios/GMPhobos",
"license": "MIT", "license": "MIT",
"authors": { "authors": {
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
}, },
"source": { "source": {
"git": "http://git.gengmei.cc/gengmeiios/GMPhobos.git", "git": "http://git.gengmei.cc/gengmeiios/GMPhobos.git",
"tag": "0.0.6" "tag": "0.0.7"
}, },
"platforms": { "platforms": {
"ios": "7.0" "ios": "7.0"
......
...@@ -28,7 +28,7 @@ PODS: ...@@ -28,7 +28,7 @@ PODS:
- GMLibrary/Network (0.0.1): - GMLibrary/Network (0.0.1):
- AFNetworking (~> 2.6.1) - AFNetworking (~> 2.6.1)
- GMLibrary/Cache (~> 0.0.1) - GMLibrary/Cache (~> 0.0.1)
- GMPhobos (0.0.6): - GMPhobos (0.0.7):
- GMLibrary (~> 0.0.1) - GMLibrary (~> 0.0.1)
- TMCache (2.1.0) - TMCache (2.1.0)
...@@ -37,12 +37,12 @@ DEPENDENCIES: ...@@ -37,12 +37,12 @@ DEPENDENCIES:
EXTERNAL SOURCES: EXTERNAL SOURCES:
GMPhobos: GMPhobos:
:path: ../ :path: "../"
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60 AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60
GMLibrary: c31039ad32bc93f866d6c3052c20acb8cf9c1568 GMLibrary: c31039ad32bc93f866d6c3052c20acb8cf9c1568
GMPhobos: 99ff08c5770ebb1a8c15579a2e0ac260a24ea386 GMPhobos: 0deddf9803485afce92be86985e9d13f045b2ccd
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
COCOAPODS: 0.39.0 COCOAPODS: 0.39.0
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
buildForArchiving = "YES"> buildForArchiving = "YES">
<BuildableReference <BuildableReference
BuildableIdentifier = 'primary' BuildableIdentifier = 'primary'
BlueprintIdentifier = '958B62752352F89538A448C9' BlueprintIdentifier = '1E27E082AA9394BADBC763A5'
BlueprintName = 'GMPhobos' BlueprintName = 'GMPhobos'
ReferencedContainer = 'container:Pods.xcodeproj' ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'GMPhobos.framework'> BuildableName = 'GMPhobos.framework'>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.0.6</string> <string>0.0.7</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "GMPhobos" s.name = "GMPhobos"
s.version = "0.0.7" s.version = "0.0.8"
s.summary = "GM statistic data sdk" s.summary = "GM statistic data sdk"
# This description is used to generate tags and improve search results. # This description is used to generate tags and improve search results.
...@@ -18,7 +18,7 @@ Pod::Spec.new do |s| ...@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
# * Finally, don't worry about the indent, CocoaPods strips it! # * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC s.description = <<-DESC
GM statistic data sdk. GM event track sdk.
DESC DESC
...@@ -26,7 +26,7 @@ Pod::Spec.new do |s| ...@@ -26,7 +26,7 @@ Pod::Spec.new do |s|
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT' s.license = 'MIT'
s.author = { "licong" => "licong@gmei.com" } s.author = { "licong" => "licong@gmei.com" }
s.source = { :git => "http://git.gengmei.cc/gengmeiios/GMPhobos.git", :tag => "0.0.7" } s.source = { :git => "http://git.gengmei.cc/gengmeiios/GMPhobos.git", :tag => "0.0.8" }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.platform = :ios, '7.0' s.platform = :ios, '7.0'
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
- (void)track:(NSString *)eventId; - (void)track:(NSString *)eventId;
- (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes; - (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes;
- (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow; - (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow;
/** /**
* @author 翟国钧, 16-02-03 16:02:30 * @author 翟国钧, 16-02-03 16:02:30
* *
...@@ -68,5 +69,24 @@ ...@@ -68,5 +69,24 @@
*/ */
- (void)trackJsEvent:(NSString *)jsonString; - (void)trackJsEvent:(NSString *)jsonString;
/**
* @brief 当页面加载时的PV处理
*
* @param pageName 页面唯一编码
* @param businessId 页面中的业务ID,比如美购详情页美购ID
*
* @since 0.0.8
*/
- (void)onPageStart:(NSString *)pageName businessId:(NSString *)businessId;
/**
* @brief 当页面结束时的PV处理
*
* @param pageName 页面唯一编码
* @param businessId 页面中的业务ID,比如美购详情页美购ID
*
* @since 0.0.8
*/
- (void)onPageEnd:(NSString *)pageName;
@end @end
...@@ -24,6 +24,12 @@ static NSString *sdkVersion = @"110"; ...@@ -24,6 +24,12 @@ static NSString *sdkVersion = @"110";
@property (strong, nonatomic) NSString *appVersion; @property (strong, nonatomic) NSString *appVersion;
@property (assign, nonatomic) NSInteger userId; @property (assign, nonatomic) NSInteger userId;
@property (assign, nonatomic) BOOL logEnabled; @property (assign, nonatomic) BOOL logEnabled;
@property (strong, nonatomic) NSString *businessId;
@property (strong, nonatomic) NSString *sessionId;
@property (strong, nonatomic) NSString *pageName;
@property (strong, nonatomic) NSString *pageEnterTime;
@property (strong, nonatomic) NSString *pageExitTime;
@end @end
...@@ -98,6 +104,7 @@ static NSString *sdkVersion = @"110"; ...@@ -98,6 +104,7 @@ static NSString *sdkVersion = @"110";
* @since 0.0.1 * @since 0.0.1
*/ */
- (void)handleSessionStart{ - (void)handleSessionStart{
_sessionId = [[NSUUID UUID] UUIDString];
WMCacheService *cache = [WMCacheService sharedInstance]; WMCacheService *cache = [WMCacheService sharedInstance];
[cache storeObjectAtDiskWithkey:PhobosBeginTime object:[self currentTime]]; [cache storeObjectAtDiskWithkey:PhobosBeginTime object:[self currentTime]];
} }
...@@ -208,6 +215,16 @@ static NSString *sdkVersion = @"110"; ...@@ -208,6 +215,16 @@ static NSString *sdkVersion = @"110";
} }
} }
#pragma - mark pv
- (void)onPageStart:(NSString *)pageName businessId:(NSString *)businessId{
}
- (void)onPageEnd:(NSString *)pageName{
}
/** /**
* @brief 将埋点时间封装成词典数据 * @brief 将埋点时间封装成词典数据
...@@ -234,6 +251,7 @@ static NSString *sdkVersion = @"110"; ...@@ -234,6 +251,7 @@ static NSString *sdkVersion = @"110";
[dict setObject:@(_userId) forKey:@"user_id"]; [dict setObject:@(_userId) forKey:@"user_id"];
[dict setObject:currentTime forKey:@"create_at"]; [dict setObject:currentTime forKey:@"create_at"];
[dict setObject:attributes forKey:@"params"]; [dict setObject:attributes forKey:@"params"];
[dict setObject:_sessionId forKey:@"app_session_id"];
} }
@catch (NSException *exception) { @catch (NSException *exception) {
phobosLog(exception); phobosLog(exception);
...@@ -347,6 +365,7 @@ static NSString *sdkVersion = @"110"; ...@@ -347,6 +365,7 @@ static NSString *sdkVersion = @"110";
} }
} }
- (void)dealloc{ - (void)dealloc{
if (self) { if (self) {
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
......
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