Commit 607955ba authored by 井庆林's avatar 井庆林

。。

parent 825ef0d0
<?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>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
......@@ -8,6 +8,16 @@
#import "GMViewController.h"
#import <GMPhobos/Phobos.h>
@import GMCache;
@import GMPhobos.PhobosUtil;
@import GMPhobos.Phobos;
#define PhobosCacheKey @"PhobosCacheKey"
NSString *const MockAppName = @"gengmei_test";
NSString *const MockChannelId = @"AppStore";
NSString *const MockEventId = @"eventId";
NSString *const MockUserId = @"1";
NSString *const MockCityId = @"beijing";
@interface GMViewController ()
......@@ -24,8 +34,40 @@
#else
NSString *url = @"http://log.test.gengmei.cc/log/collect";
#endif
[Phobos sharedClient].serverAPI = url;
[GMCache removeObjectAtDocumentPathWithkey:PhobosCacheKey];
Phobos *phobos = [Phobos clientWithAppName:MockAppName channelId:MockChannelId];
phobos.serverAPI = url;
[phobos setLogEnabled:NO]; // 调试打Log模式,看情况开启
phobos.signingType = PhobosSigningTypeDebug;
phobos.userId = @"";
[Phobos setSharedClient:phobos];
NSString *inDate = [PhobosUtil currentTime];
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setObject:[PhobosUtil currentTime] forKey:@"out"];
[dict setObject:inDate forKey:@"in"];
[dict setObject:@"test" forKey:@"page_name"];
[dict setObject:@"" forKey:@"business_id"];
[dict setObject:@"" forKey:@"referrer"];
[dict setObject:@(0) forKey:@"fake"];
[dict setObject:@"" forKey:@"referrer_id"];
[dict setObject:@"" forKey:@"extra_param"];
[dict setObject:@"" forKey:@"referrer_tab_name"];
[dict setObject:@(0) forKey:@"is_push"];
[Phobos track:@"page_view" attributes:dict];
NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
[Phobos track:@"page_view" attributes:dict];
array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
[dict setObject:[PhobosUtil currentTime] forKey:@"in"];
[dict setObject:[PhobosUtil currentTime] forKey:@"out"];
[Phobos track:@"page_view" attributes:dict];
array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
[Phobos track:@"test" attributes:dict];
array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
}
- (void)didReceiveMemoryWarning
......
......@@ -35,7 +35,7 @@ PODS:
- GMKit/Protocol (0.8.4):
- Masonry (= 1.1.0)
- SDWebImage (= 3.7.6)
- GMPhobos (1.1.5):
- GMPhobos (1.1.6):
- GMCache (= 0.2.3)
- GMKit
- Masonry (1.1.0)
......@@ -63,7 +63,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
GMCache: 09a3029c96fe130e3a21faef70b3d9d2ce92d639
GMKit: a30da06b84e5c4a357d427c70d1b5ec672a1f6a1
GMPhobos: 521efaf970f708b24407d39864095338f4dc59f3
GMPhobos: cdc1ac3bd8dbc57eb2efe4ac9a7e6ae9d128fc8f
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
......
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