Commit 1e69c3ee authored by licong's avatar licong

save

parent b094f8f2
......@@ -28,7 +28,7 @@ PODS:
- GMLibrary/Network (0.0.1):
- AFNetworking (~> 2.6.1)
- GMLibrary/Cache (~> 0.0.1)
- GMPhobos (0.0.2):
- GMPhobos (0.0.3):
- GMLibrary (~> 0.0.1)
- TMCache (2.1.0)
......@@ -42,7 +42,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60
GMLibrary: c31039ad32bc93f866d6c3052c20acb8cf9c1568
GMPhobos: fa1d3cf45aea2dfb7677bc8ce1fac91d2fb34bd3
GMPhobos: 323de3d8423310d8009ee291b694a3fe007fbd99
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
COCOAPODS: 0.39.0
../../../../../Pod/Classes/Phobos.h
\ No newline at end of file
../../../../../Pod/Classes/ReplaceMe.h
\ No newline at end of file
{
"name": "GMPhobos",
"version": "0.0.2",
"version": "0.0.3",
"summary": "A short description of GMPhobos.",
"homepage": "http://git.gengmei.cc/gengmeiios/GMPhobos",
"license": "MIT",
......@@ -9,7 +9,7 @@
},
"source": {
"git": "http://git.gengmei.cc/gengmeiios/GMPhobos.git",
"tag": "0.0.2"
"tag": "0.0.3"
},
"platforms": {
"ios": "7.0"
......
......@@ -28,7 +28,7 @@ PODS:
- GMLibrary/Network (0.0.1):
- AFNetworking (~> 2.6.1)
- GMLibrary/Cache (~> 0.0.1)
- GMPhobos (0.0.2):
- GMPhobos (0.0.3):
- GMLibrary (~> 0.0.1)
- TMCache (2.1.0)
......@@ -42,7 +42,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60
GMLibrary: c31039ad32bc93f866d6c3052c20acb8cf9c1568
GMPhobos: fa1d3cf45aea2dfb7677bc8ce1fac91d2fb34bd3
GMPhobos: 323de3d8423310d8009ee291b694a3fe007fbd99
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
COCOAPODS: 0.39.0
......@@ -32,6 +32,8 @@
4ED8DC93463804C08A46A7A34C849309 /* WMImageUploadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C1B2FF532F627FB43E102EC42B16C6 /* WMImageUploadOperation.m */; };
4F093F6FBA6E6B060CF66145CF214E14 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = AAA73E11469DB3C3207B87CD143E0F7D /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
56C8D4F00869E61F210A24E0EE8F3A13 /* UIActivityIndicatorView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 02C8CB3115437D8745294A18E932B697 /* UIActivityIndicatorView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
60193195AB2EA3EA1FE1ECE2D1795A90 /* Phobos.h in Headers */ = {isa = PBXBuildFile; fileRef = DBAB72630244F34E7D7626E4E0BA3E50 /* Phobos.h */; settings = {ATTRIBUTES = (Public, ); }; };
60A1DDCC5EC0FFAF0B0D978B1B29887D /* GMPhobos-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BE9CC8AC0694640A6257609F3B82CF83 /* GMPhobos-dummy.m */; };
61E6F3603DFE1E3A52990F50D691666A /* TMMemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = E3666B28367A83938E9062E69AE2D3FE /* TMMemoryCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
64C7860F562F2F4CD17D9630BFD90F74 /* TMCache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DA764386D2D1712F4ACDA7AB71CDB5B /* TMCache.framework */; };
66897DCA2FBD43731EA8423C27955915 /* WMImageUploadOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1004FF738D68A3C0E173085F5CFBDC28 /* WMImageUploadOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -43,7 +45,6 @@
7999F436677B92F6DDA1C3D45B67762F /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = B3689AF5BA5A89FB7407EFDD3818110C /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
79D287D48B2A81896F365CA21F0B27D6 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E541273E53984C9CC33FBE86B4DA484 /* UIWebView+AFNetworking.m */; };
7A63B92098857A59F07B594919512D6C /* WMCacheService.h in Headers */ = {isa = PBXBuildFile; fileRef = F90257EE80612DAF38DF325AD3512F69 /* WMCacheService.h */; settings = {ATTRIBUTES = (Public, ); }; };
80C91BED7192A279F2FDB154ADB37AB6 /* ReplaceMe.h in Headers */ = {isa = PBXBuildFile; fileRef = 16548779219A8C9E048C319ADD80856F /* ReplaceMe.h */; settings = {ATTRIBUTES = (Public, ); }; };
82666C40FB47AFA063060CF93DDC748F /* TMDiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D8B7A9994577FA6261406269DF3B5BC /* TMDiskCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
8BC1F22DDC491BA44775B54DDE5A689F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A8715B4CB57B0688290A19D84259EC4 /* Foundation.framework */; };
945C9834347A969CDD4FB9A5AB9FF0E0 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CB9A7A93D8FF31F47BF2EBCA55DA06AB /* AFURLSessionManager.m */; };
......@@ -53,7 +54,6 @@
A14EC27E12794E4A6D64862B07D187EE /* TMCache-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F5F3E47A7566485A49F63AA17884BE42 /* TMCache-dummy.m */; };
A85748FDBAB3D33C778AB7869AEF84FC /* WMCacheService.m in Sources */ = {isa = PBXBuildFile; fileRef = D51F3423CD40A7D9D24A84BB4A3DF1E1 /* WMCacheService.m */; };
AAA204FD1856B5F6D578B2BAC90C55FD /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A7F0F468A61AF3F8EC65F12E97476C3 /* AFNetworking.framework */; };
AB874B994E02D7A4F167580344216079 /* GMPhobos-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BE9CC8AC0694640A6257609F3B82CF83 /* GMPhobos-dummy.m */; };
AB8CAD7D7C77071D3880D4E157C407BC /* TMDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 47EAAFEA9D509432CBCB5E1FA214FAC3 /* TMDiskCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
AEA8306589956BC104EAD6E48AE786F1 /* TMCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 973AE0D925110E0B64B6D5B9F6D1F096 /* TMCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
AF7178D137E94C03E9ECDB77D4B192A6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A8715B4CB57B0688290A19D84259EC4 /* Foundation.framework */; };
......@@ -67,6 +67,7 @@
C70AC3CB2D21E9466D55F37D6167DBA5 /* UIKit+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = DC9C01E410A863A739674459F6066886 /* UIKit+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
C7B655603FB1089A5E2D28FCE12DF12F /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A3A3A13292E1BACE2707A2137EC71632 /* AFHTTPRequestOperationManager.m */; };
C92FFCE3C06282C2D08A98524079060D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A8715B4CB57B0688290A19D84259EC4 /* Foundation.framework */; };
CD723A2A2DFCBF408AEC60BD6199DAFC /* Phobos.m in Sources */ = {isa = PBXBuildFile; fileRef = AE2DA08F4868799D4BEF4B662B5495F9 /* Phobos.m */; };
CEDFE191DF66B8884828359B3494F8E9 /* UIAlertView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C327DDC22CE5523E14B351BA735B6A1 /* UIAlertView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
CF051D17275C20E0FBF5736E3C8A0573 /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFCDA0480467B4B4C80B2AE6F8BAA6 /* UIProgressView+AFNetworking.m */; };
D0AA390DB5B3A1766D8A27A78C310396 /* GMLibrary-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 870F3C5DFCDCEA43F4B71EBEBBEFC486 /* GMLibrary-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -82,13 +83,12 @@
E13B595DBD5150D4B49772197400C99F /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7450251DCE0F061D346CD974746D6192 /* MobileCoreServices.framework */; };
E20AF552CB383CF402C59ECF17E60668 /* Pods-GMPhobos_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 39D964FD1C49A18C25EFB0981D02027B /* Pods-GMPhobos_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
E5BFA83E7704EBE759441EEFD9EC46FD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A8715B4CB57B0688290A19D84259EC4 /* Foundation.framework */; };
E6272F54E92F68EE3A4B38FAF2DBC370 /* ReplaceMe.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AFA603BCF8450D9B55C79A82B238D9D /* ReplaceMe.m */; };
E7FA21C38D6A1CB113BE2DA22E73B845 /* UIAlertView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CE1DF41765CEA659D706AD2EEF9C1A9 /* UIAlertView+AFNetworking.m */; };
E84833FD62F4F3C9C99285C08F87DC45 /* WMNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F86EE5F940DDBC27CD07E41D8D09B77 /* WMNetworking.m */; };
E98855429843A74A1CDB80B0128F49E8 /* GMPhobos-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF4CA45B837E5F78BF43D996185823D /* GMPhobos-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
F09FC1C962397D10A789937A8E8321B3 /* WMDocumentCache.m in Sources */ = {isa = PBXBuildFile; fileRef = FA334511FAA273CCC0BDD4182AE804A6 /* WMDocumentCache.m */; };
F0C6723D838D7CE80D0B8686CC9EDD01 /* GMLibrary-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BD84270504109306E7EF0CA60F7AD335 /* GMLibrary-dummy.m */; };
F2E9945B7494E20ED7DC4720A2B8CDC9 /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 458C2837A3F481F27B03872FCB4740CE /* AFNetworkActivityIndicatorManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
FA14E7956FC09581D785B605E27590C9 /* GMPhobos-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF4CA45B837E5F78BF43D996185823D /* GMPhobos-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
FCF07AEEA46A8553B666B8E9CABEF8B7 /* WMNetService.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B8B253946EFC3C44115059EF551429B /* WMNetService.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
......@@ -183,7 +183,6 @@
0F380E78A6A6104BE8D69D550EFE0335 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
1004FF738D68A3C0E173085F5CFBDC28 /* WMImageUploadOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = WMImageUploadOperation.h; path = Pod/Classes/Network/WMImageUploadOperation.h; sourceTree = "<group>"; };
1039452EE78F366E55BD28493A04FA33 /* Pods-GMPhobos_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-GMPhobos_Tests-dummy.m"; sourceTree = "<group>"; };
16548779219A8C9E048C319ADD80856F /* ReplaceMe.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = ReplaceMe.h; sourceTree = "<group>"; };
16EF59421C5EC52A4FE200BCA9424CFD /* Pods-GMPhobos_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-GMPhobos_Tests-acknowledgements.markdown"; sourceTree = "<group>"; };
19692033DCFD06021947D65E5317DC37 /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIRefreshControl+AFNetworking.m"; path = "UIKit+AFNetworking/UIRefreshControl+AFNetworking.m"; sourceTree = "<group>"; };
1A8715B4CB57B0688290A19D84259EC4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
......@@ -208,7 +207,6 @@
43FAAB5F36DC3F20D4B7D8D527DC01FE /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = AFNetworking/AFURLRequestSerialization.m; sourceTree = "<group>"; };
458C2837A3F481F27B03872FCB4740CE /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkActivityIndicatorManager.h; path = "UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h"; sourceTree = "<group>"; };
47EAAFEA9D509432CBCB5E1FA214FAC3 /* TMDiskCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = TMDiskCache.m; path = TMCache/TMDiskCache.m; sourceTree = "<group>"; };
4AFA603BCF8450D9B55C79A82B238D9D /* ReplaceMe.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = ReplaceMe.m; sourceTree = "<group>"; };
4B83281B4137DA954D83EA220CDB90E2 /* GMPhobos.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GMPhobos.xcconfig; sourceTree = "<group>"; };
4C49103699A5F483AB70D803AE9DFA5F /* Pods-GMPhobos_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GMPhobos_Example.release.xcconfig"; sourceTree = "<group>"; };
4EF837DD095F0B1BA8E96EE6C71E14E1 /* TMCacheBackgroundTaskManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TMCacheBackgroundTaskManager.h; path = TMCache/TMCacheBackgroundTaskManager.h; sourceTree = "<group>"; };
......@@ -252,6 +250,7 @@
A973A96CDFFB3F92B0FB9EBC718A5C91 /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = AFNetworking/AFURLResponseSerialization.h; sourceTree = "<group>"; };
AAA73E11469DB3C3207B87CD143E0F7D /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = AFNetworking/AFNetworkReachabilityManager.h; sourceTree = "<group>"; };
AD1C6256FCA6BEFBC24DC592A8F912F8 /* Pods-GMPhobos_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GMPhobos_Tests.debug.xcconfig"; sourceTree = "<group>"; };
AE2DA08F4868799D4BEF4B662B5495F9 /* Phobos.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = Phobos.m; sourceTree = "<group>"; };
B00EC6E311267176A63291AD87994821 /* AFNetworking-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AFNetworking-umbrella.h"; sourceTree = "<group>"; };
B3689AF5BA5A89FB7407EFDD3818110C /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIProgressView+AFNetworking.h"; path = "UIKit+AFNetworking/UIProgressView+AFNetworking.h"; sourceTree = "<group>"; };
BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
......@@ -266,6 +265,7 @@
D51F3423CD40A7D9D24A84BB4A3DF1E1 /* WMCacheService.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = WMCacheService.m; path = Pod/Classes/Cache/WMCacheService.m; sourceTree = "<group>"; };
D7E68437B24D6AD438B13D29D6BE2F1C /* TMCache-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TMCache-prefix.pch"; sourceTree = "<group>"; };
D8D64E33C8EA69DF97172FC420385F3A /* WMDocumentCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = WMDocumentCache.h; path = Pod/Classes/Cache/WMDocumentCache.h; sourceTree = "<group>"; };
DBAB72630244F34E7D7626E4E0BA3E50 /* Phobos.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = Phobos.h; sourceTree = "<group>"; };
DC9C01E410A863A739674459F6066886 /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIKit+AFNetworking.h"; path = "UIKit+AFNetworking/UIKit+AFNetworking.h"; sourceTree = "<group>"; };
DD71F9F9028596F16E9146798EE16BC1 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIButton+AFNetworking.h"; path = "UIKit+AFNetworking/UIButton+AFNetworking.h"; sourceTree = "<group>"; };
DE040F43777E733952B2A8A2A722F1C0 /* Pods-GMPhobos_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-GMPhobos_Example-frameworks.sh"; sourceTree = "<group>"; };
......@@ -520,6 +520,15 @@
);
sourceTree = "<group>";
};
86A1AD6D14640EC36E9E91590E461882 /* Classes */ = {
isa = PBXGroup;
children = (
DBAB72630244F34E7D7626E4E0BA3E50 /* Phobos.h */,
AE2DA08F4868799D4BEF4B662B5495F9 /* Phobos.m */,
);
path = Classes;
sourceTree = "<group>";
};
8FD0EEF6FB18C4A469C5DC6D22528D2E /* Pods */ = {
isa = PBXGroup;
children = (
......@@ -579,15 +588,6 @@
name = Frameworks;
sourceTree = "<group>";
};
B5B3D2C6FF8C7E4F159EE337820050DD /* Classes */ = {
isa = PBXGroup;
children = (
16548779219A8C9E048C319ADD80856F /* ReplaceMe.h */,
4AFA603BCF8450D9B55C79A82B238D9D /* ReplaceMe.m */,
);
path = Classes;
sourceTree = "<group>";
};
BDA4D49112DC1C58E582D4E62B59D4F8 /* GMLibrary */ = {
isa = PBXGroup;
children = (
......@@ -675,7 +675,7 @@
ECC02FD91DFB99166459E30626593BB2 /* Pod */ = {
isa = PBXGroup;
children = (
B5B3D2C6FF8C7E4F159EE337820050DD /* Classes */,
86A1AD6D14640EC36E9E91590E461882 /* Classes */,
);
path = Pod;
sourceTree = "<group>";
......@@ -762,12 +762,12 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E1A9FAF93A7B7FC56DC9B49D472F8CD8 /* Headers */ = {
EC3BDA5889B0917BDA758F5241280E28 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
E98855429843A74A1CDB80B0128F49E8 /* GMPhobos-umbrella.h in Headers */,
80C91BED7192A279F2FDB154ADB37AB6 /* ReplaceMe.h in Headers */,
FA14E7956FC09581D785B605E27590C9 /* GMPhobos-umbrella.h in Headers */,
60193195AB2EA3EA1FE1ECE2D1795A90 /* Phobos.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -778,9 +778,9 @@
isa = PBXNativeTarget;
buildConfigurationList = 9E6E3429569E3E4D0451B897A774C8DB /* Build configuration list for PBXNativeTarget "GMPhobos" */;
buildPhases = (
BCF346B74626400C68811E36569A2C8A /* Sources */,
516C0AC721E2D28B013733AAB91BC476 /* Sources */,
6F963FFD6F481F5926ED7CF73F8476DF /* Frameworks */,
E1A9FAF93A7B7FC56DC9B49D472F8CD8 /* Headers */,
EC3BDA5889B0917BDA758F5241280E28 /* Headers */,
);
buildRules = (
);
......@@ -941,20 +941,20 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6579F8ABBB9712607DE6742992ACE4C9 /* Sources */ = {
516C0AC721E2D28B013733AAB91BC476 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0A6739A5C5E2BE2425B46F3FD8ED2AAF /* Pods-GMPhobos_Tests-dummy.m in Sources */,
60A1DDCC5EC0FFAF0B0D978B1B29887D /* GMPhobos-dummy.m in Sources */,
CD723A2A2DFCBF408AEC60BD6199DAFC /* Phobos.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BCF346B74626400C68811E36569A2C8A /* Sources */ = {
6579F8ABBB9712607DE6742992ACE4C9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
AB874B994E02D7A4F167580344216079 /* GMPhobos-dummy.m in Sources */,
E6272F54E92F68EE3A4B38FAF2DBC370 /* ReplaceMe.m in Sources */,
0A6739A5C5E2BE2425B46F3FD8ED2AAF /* Pods-GMPhobos_Tests-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = '3800332E5A7E07DE0DC419F7'
BlueprintIdentifier = '6878D0B263EF5483F564BFC8'
BlueprintName = 'GMPhobos'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'GMPhobos.framework'>
......
#import <UIKit/UIKit.h>
#import "ReplaceMe.h"
#import "Phobos.h"
FOUNDATION_EXPORT double GMPhobosVersionNumber;
FOUNDATION_EXPORT const unsigned char GMPhobosVersionString[];
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.0.2</string>
<string>0.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "GMPhobos"
s.version = "0.0.2"
s.version = "0.0.3"
s.summary = "A short description of GMPhobos."
# This description is used to generate tags and improve search results.
......@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "licong" => "licong@gmei.com" }
s.source = { :git => "http://git.gengmei.cc/gengmeiios/GMPhobos.git", :tag => "0.0.2" }
s.source = { :git => "http://git.gengmei.cc/gengmeiios/GMPhobos.git", :tag => "0.0.3" }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.platform = :ios, '7.0'
......
//
// Phobos.h
// GengmeiDoctor
// Data Statistic Client For Mars
// Created by Thierry on 16/1/26.
// Copyright © 2016年 wanmeizhensuo. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Phobos : NSObject
/**
* @brief 开启Phobos统计,默认以BATCH方式发送log.
*
* @param appName
* @param channelId
*
* @return
*
* @since <#1.8.0#>
*/
+ (Phobos *)clientWithAppName:(NSString *)appName channelId:(NSString *)channelId;
+ (instancetype)sharedClient;
+ (void)setSharedClient:(Phobos *)client;
/**
* @brief 设置是否打印sdk的log信息,默认不开启
*
* @param value 设置为YES,phobos SDK 会输出log信息,记得release产品时要设置回NO.
*
* @since <#1.8.0#>
*/
- (void)setLogEnabled:(BOOL)value;
/**
* @brief 自定义事件,数量统计.
*
* @param eventId 事件Id
* @attributes 参数
* @sendNow 是否实时发送,默认为NO
*
* @since <#1.8.0#>
*/
- (void)track:(NSString *)eventId;
- (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes;
- (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow;
@end
//
// Phobos.m
// GengmeiDoctor
//
// Created by Thierry on 16/1/26.
// Copyright © 2016年 wanmeizhensuo. All rights reserved.
//
#import "Phobos.h"
#import <AdSupport/AdSupport.h>
#import "zlib.h"
#import "WMCacheService.h"
#define PhobosHaveOpenApp @"PhobosHaveOpenApp" //是否打开过APP
#define PhobosBeginTime @"PhobosBeginTime" //记录APP打开|从后台启动时的时间戳
#define PhobosEndTime @"PhobosEndTime" //记录APP退出|退到后台时的时间戳
#define PhobosCacheKey @"PhobosCacheKey"
#define PhobosShardCount 50 //收集数据分段发送的个数
static Phobos *sharedClient = nil;
static NSString *sdkVersion = @"103";
@interface Phobos ()
@property (strong, nonatomic) NSDateFormatter *dateFormatter;
@property (strong, nonatomic) NSString *appName;
@property (strong, nonatomic) NSString *channelId;
@property (strong, nonatomic) NSString *appVersion;
@property (assign, nonatomic) BOOL logEnabled;
@end
@implementation Phobos
+ (Phobos *)clientWithAppName:(NSString *)appName channelId:(NSString *)channelId{
return [[self alloc] initWithAppName:appName channelId:channelId];
}
+ (Phobos *)sharedClient{
return sharedClient;
}
+ (void)setSharedClient:(Phobos *)client{
sharedClient = client;
}
- (instancetype)initWithAppName:(NSString *)appName channelId:(NSString *)channelId{
self = [super init];
if (self) {
_appName = appName;
_channelId = channelId;
_logEnabled = NO;
_appVersion = [self getAppVersion];
[self setupNotification];
[self handleEventAfterInit];
}
return self;
}
- (void)setLogEnabled:(BOOL)value{
_logEnabled = value;
}
- (void)handleEventAfterInit{
WMCacheService *cache = [WMCacheService sharedInstance];
/** 每次打开APP埋点 **/
[self track:@"device_opened" attributes:@{} sendNow:YES];
/** 第一次打开APP埋点 **/
if (![cache fetchObjectAtDiskWithkey:PhobosHaveOpenApp]) {
[self track:@"device_activated" attributes:@{} sendNow:YES];
[cache storeObjectAtDiskWithkey:PhobosHaveOpenApp object:PhobosHaveOpenApp];
}
}
#pragma - mark notification handler
/**
* @brief 设置对APP的通知监听
*
* @since <#1.8.0#>
*/
- (void)setupNotification{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInBackgound:) name:UIApplicationDidEnterBackgroundNotification object:nil];
}
/**
* @brief 应用进入前台的处理
*
* @param sender <#sender description#>
*
* @since <#1.8.0#>
*/
- (void)handleAppInForeground:(id)sender{
//记录每次打开APP的时间,也包括从后台进入前台
WMCacheService *cache = [WMCacheService sharedInstance];
[cache storeObjectAtDiskWithkey:PhobosBeginTime object:[self currentTime]];
[self fetchDataAndSend];
}
/**
* @brief 应用进入后台的处理
*
* @param sender <#sender description#>
*
* @since <#1.8.0#>
*/
- (void)handleAppInBackgound:(id)sender{
WMCacheService *cache = [WMCacheService sharedInstance];
//进入后台的同时,把记录时间同步到服务端,把已使用时间清空
double beginTime = [[cache fetchObjectAtDiskWithkey:PhobosBeginTime] doubleValue];
if (beginTime == 0) {
return;
}
NSDate *date = [NSDate date];
double endTime = [date timeIntervalSince1970];
NSString *usedTime = [NSString stringWithFormat:@"%f",endTime - beginTime];
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:usedTime,@"duration",nil];
[self track:@"on_app_session_over" attributes:dict];
[cache removeObjectAtDiskWithkey:PhobosBeginTime];
[self fetchDataAndSend];
}
#pragma - mark track event handler
- (void)track:(NSString *)eventId{
[self track:eventId attributes:@{}];
}
- (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes{
NSArray *array = [[WMCacheService sharedInstance] fetchObjectAtDiskWithkey:PhobosCacheKey];
//超过一定数量的话,统一发送一次
if (array.count > PhobosShardCount) {
[self sendArray:array];
}
[self track:eventId attributes:attributes sendNow:NO];
}
- (void)track:(NSString *)eventId attributes:(NSDictionary *)attributes sendNow:(BOOL)sendNow{
NSDictionary *dict = [self prepareDictionaryForEvent:eventId attributes:attributes];
if (sendNow) {
NSArray *array = @[dict];
[self sendArray:array];
}else{
[self save:dict];
}
}
/**
* @brief 将埋点时间封装成词典数据
*
* @return
*
* @since <#1.8.0#>
*/
- (NSDictionary *)prepareDictionaryForEvent:(NSString *)eventId attributes:(NSDictionary *)attributes{
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
@try {
NSString *currentTime = [self currentTime];
// long userId = [WMLoginManager shareInstance].user.userId;
NSMutableDictionary *deviceParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString],@"device_id",
@"ios",@"device_type",nil];
NSMutableDictionary *appParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
self.appName, @"name",
self.appVersion, @"version",
self.channelId,@"channel", nil];
[dict setObject:eventId forKey:@"type"];
[dict setObject:appParams forKey:@"app"];
[dict setObject:sdkVersion forKey:@"version"];
[dict setObject:deviceParams forKey:@"device"];
// [dict setObject:@(userId) forKey:@"user_id"];
[dict setObject:currentTime forKey:@"create_at"];
[dict setObject:attributes forKey:@"params"];
}
@catch (NSException *exception) {
NSLog(@"%@",exception.reason);
}
return dict;
}
/**
* @brief 保存数据到缓存层
*
* @param data 数据
*
* @since <#1.8.0#>
*/
- (void)save:(NSDictionary *)data
{
if (_logEnabled) {
NSLog(@"phobos save dictionary: %@",data);
}
WMCacheService *cache = [WMCacheService sharedInstance];
NSMutableArray *dataArray = [cache fetchObjectAtDiskWithkey:PhobosCacheKey];
if (dataArray) {
[dataArray addObject:data];
}else{
dataArray = [NSMutableArray arrayWithObject:data];
}
[cache storeObjectAtDiskWithkey:PhobosCacheKey object:dataArray];
}
/**
* @brief 从缓存中获取数据,并发送
*
* @since <#1.8.0#>
*/
- (void)fetchDataAndSend{
NSArray *paramsArray = [[WMCacheService sharedInstance] fetchObjectAtDiskWithkey:PhobosCacheKey];
[self sendArray:paramsArray];
}
/**
* @brief 发送数组
*
* @param array
*
* @since <#1.8.0#>
*/
- (void)sendArray:(NSArray *)array {
if (array.count>0) {
if (_logEnabled) {
NSLog(@"phobos send array:%@",array);
}
@try {
NSData *JSON = [self encodeJSON:array];
NSData *compressedData = [self compressData:JSON];
[self sendData:compressedData];
}
@catch (NSException *exception) {
NSLog(@"%@",exception);
}
}
}
/**
* @brief 上传数据
*
* @param data
*
* @since <#1.8.0#>
*/
- (void)sendData:(NSData *)data {
#ifdef DEBUG
NSString *url = @"http://log.test.gengmei.cc/log/collect";
#else
NSString *url = @"http://log.gengmei.cc/log/collect";
#endif
@try {
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
[request setValue:@"gzip" forHTTPHeaderField:@"Content-Encoding"];
request.HTTPBody = data;
request.HTTPMethod = @"POST";
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) {
NSHTTPURLResponse *res = (NSHTTPURLResponse *)response;
NSInteger code = res.statusCode;
if (code == 200) {
[[WMCacheService sharedInstance] removeObjectAtDiskWithkey:PhobosCacheKey];
}
}];
}
@catch (NSException *exception) {
NSLog(@"%@",exception);
}
}
/**
* @brief 压缩待上传的数据
*
* @param originData 压缩前的数据
*
* @return 压缩后的数据
*
* @since <#1.8.0#>
*/
- (NSData *)compressData:(NSData *)originData{
if (!originData || [originData length] == 0)
{
if (_logEnabled) {
NSLog(@"%s: Error: Can't compress an empty or null NSData object.", __func__);
}
return nil;
}
z_stream zlibStreamStruct;
zlibStreamStruct.zalloc = Z_NULL; // Set zalloc, zfree, and opaque to Z_NULL so
zlibStreamStruct.zfree = Z_NULL; // that when we call deflateInit2 they will be
zlibStreamStruct.opaque = Z_NULL; // updated to use default allocation functions.
zlibStreamStruct.total_out = 0; // Total number of output bytes produced so far
zlibStreamStruct.next_in = (Bytef*)[originData bytes]; // Pointer to input bytes
zlibStreamStruct.avail_in = (uInt)[originData length]; // Number of input bytes left to process
int initError = deflateInit2(&zlibStreamStruct, Z_DEFAULT_COMPRESSION, Z_DEFLATED, (15+16), 8, Z_DEFAULT_STRATEGY);
if (initError != Z_OK)
{
NSString *errorMsg = nil;
if (_logEnabled) {
switch (initError)
{
case Z_STREAM_ERROR:
errorMsg = @"Invalid parameter passed in to function.";
break;
case Z_MEM_ERROR:
errorMsg = @"Insufficient memory.";
break;
case Z_VERSION_ERROR:
errorMsg = @"The version of zlib.h and the version of the library linked do not match.";
break;
default:
errorMsg = @"Unknown error code.";
break;
}
}
return nil;
}
NSMutableData *compressedData = [NSMutableData dataWithLength:[originData length] * 1.01 + 12];
NSInteger deflateStatus;
do
{
zlibStreamStruct.next_out = [compressedData mutableBytes] + zlibStreamStruct.total_out;
zlibStreamStruct.avail_out = (uInt)([compressedData length] - zlibStreamStruct.total_out);
deflateStatus = deflate(&zlibStreamStruct, Z_FINISH);
} while ( deflateStatus == Z_OK );
// Check for zlib error and convert code to usable error message if appropriate
if (deflateStatus != Z_STREAM_END)
{
NSString *errorMsg = nil;
if (_logEnabled) {
switch (deflateStatus)
{
case Z_ERRNO:
errorMsg = @"Error occured while reading file.";
break;
case Z_STREAM_ERROR:
errorMsg = @"The stream state was inconsistent (e.g., next_in or next_out was NULL).";
break;
case Z_DATA_ERROR:
errorMsg = @"The deflate data was invalid or incomplete.";
break;
case Z_MEM_ERROR:
errorMsg = @"Memory could not be allocated for processing.";
break;
case Z_BUF_ERROR:
errorMsg = @"Ran out of output buffer for writing compressed bytes.";
break;
case Z_VERSION_ERROR:
errorMsg = @"The version of zlib.h and the version of the library linked do not match.";
break;
default:
errorMsg = @"Unknown error code.";
break;
}
}
deflateEnd(&zlibStreamStruct);
return nil;
}
deflateEnd(&zlibStreamStruct);
[compressedData setLength: zlibStreamStruct.total_out];
return compressedData;
}
#pragma mark - helpers
- (NSData *)encodeJSON:(id)obj {
NSData *data = [NSJSONSerialization dataWithJSONObject:obj options:0 error:nil];
return data;
}
- (NSString *)currentTime {
NSDate *date = [NSDate date];
NSTimeInterval interval = [date timeIntervalSince1970];
NSString *timeIntervalStr = [NSString stringWithFormat:@"%.0f",interval];
return timeIntervalStr;
}
- (NSString *)getAppVersion{
NSString *buildVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
if (buildVersion) {
return buildVersion;
}else{
return @"";
}
}
- (void)dealloc{
if (self) {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
}
@end
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