Commit dfe48e19 authored by 井庆林's avatar 井庆林

修改清除缓存机制

parent 89aa4c0a
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
63EFAB1122658352005EEAC6 /* GMPhobos_ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63EFAB1022658352005EEAC6 /* GMPhobos_ExampleTests.m */; };
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
9822812B60126E270C6B388F /* Pods_GMPhobos_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3D30FF32AFC059EC87D69DA /* Pods_GMPhobos_Tests.framework */; }; 9822812B60126E270C6B388F /* Pods_GMPhobos_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3D30FF32AFC059EC87D69DA /* Pods_GMPhobos_Tests.framework */; };
D321A04F1F4A8F4100A6B934 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D321A04E1F4A8F4100A6B934 /* Launch Screen.storyboard */; }; D321A04F1F4A8F4100A6B934 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D321A04E1F4A8F4100A6B934 /* Launch Screen.storyboard */; };
...@@ -37,6 +38,13 @@ ...@@ -37,6 +38,13 @@
remoteGlobalIDString = 6003F589195388D20070C39A; remoteGlobalIDString = 6003F589195388D20070C39A;
remoteInfo = GMPhobos; remoteInfo = GMPhobos;
}; };
63EFAB1322658352005EEAC6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6003F582195388D10070C39A /* Project object */;
proxyType = 1;
remoteGlobalIDString = 6003F589195388D20070C39A;
remoteInfo = GMPhobos_Example;
};
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
...@@ -65,6 +73,9 @@ ...@@ -65,6 +73,9 @@
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; }; 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
63EFAB0E22658352005EEAC6 /* GMPhobos_ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GMPhobos_ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
63EFAB1022658352005EEAC6 /* GMPhobos_ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GMPhobos_ExampleTests.m; sourceTree = "<group>"; };
63EFAB1222658352005EEAC6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; }; 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
94F09197043C44CCA8756031 /* Pods-GMPhobos_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMPhobos_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GMPhobos_Example/Pods-GMPhobos_Example.debug.xcconfig"; sourceTree = "<group>"; }; 94F09197043C44CCA8756031 /* Pods-GMPhobos_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMPhobos_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GMPhobos_Example/Pods-GMPhobos_Example.debug.xcconfig"; sourceTree = "<group>"; };
D321A04E1F4A8F4100A6B934 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; }; D321A04E1F4A8F4100A6B934 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
...@@ -100,6 +111,13 @@ ...@@ -100,6 +111,13 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
63EFAB0B22658352005EEAC6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
...@@ -109,6 +127,7 @@ ...@@ -109,6 +127,7 @@
60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
6003F593195388D20070C39A /* Example for GMPhobos */, 6003F593195388D20070C39A /* Example for GMPhobos */,
6003F5B5195388D20070C39A /* Tests */, 6003F5B5195388D20070C39A /* Tests */,
63EFAB0F22658352005EEAC6 /* GMPhobos_ExampleTests */,
6003F58C195388D20070C39A /* Frameworks */, 6003F58C195388D20070C39A /* Frameworks */,
6003F58B195388D20070C39A /* Products */, 6003F58B195388D20070C39A /* Products */,
F0A9B46EC6044F749D0CDBCA /* Pods */, F0A9B46EC6044F749D0CDBCA /* Pods */,
...@@ -120,6 +139,7 @@ ...@@ -120,6 +139,7 @@
children = ( children = (
6003F58A195388D20070C39A /* GMPhobos_Example.app */, 6003F58A195388D20070C39A /* GMPhobos_Example.app */,
6003F5AE195388D20070C39A /* GMPhobos_Tests.xctest */, 6003F5AE195388D20070C39A /* GMPhobos_Tests.xctest */,
63EFAB0E22658352005EEAC6 /* GMPhobos_ExampleTests.xctest */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -198,6 +218,15 @@ ...@@ -198,6 +218,15 @@
name = "Podspec Metadata"; name = "Podspec Metadata";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
63EFAB0F22658352005EEAC6 /* GMPhobos_ExampleTests */ = {
isa = PBXGroup;
children = (
63EFAB1022658352005EEAC6 /* GMPhobos_ExampleTests.m */,
63EFAB1222658352005EEAC6 /* Info.plist */,
);
path = GMPhobos_ExampleTests;
sourceTree = "<group>";
};
F0A9B46EC6044F749D0CDBCA /* Pods */ = { F0A9B46EC6044F749D0CDBCA /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -250,6 +279,24 @@ ...@@ -250,6 +279,24 @@
productReference = 6003F5AE195388D20070C39A /* GMPhobos_Tests.xctest */; productReference = 6003F5AE195388D20070C39A /* GMPhobos_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test"; productType = "com.apple.product-type.bundle.unit-test";
}; };
63EFAB0D22658352005EEAC6 /* GMPhobos_ExampleTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 63EFAB1722658352005EEAC6 /* Build configuration list for PBXNativeTarget "GMPhobos_ExampleTests" */;
buildPhases = (
63EFAB0A22658352005EEAC6 /* Sources */,
63EFAB0B22658352005EEAC6 /* Frameworks */,
63EFAB0C22658352005EEAC6 /* Resources */,
);
buildRules = (
);
dependencies = (
63EFAB1422658352005EEAC6 /* PBXTargetDependency */,
);
name = GMPhobos_ExampleTests;
productName = GMPhobos_ExampleTests;
productReference = 63EFAB0E22658352005EEAC6 /* GMPhobos_ExampleTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
/* Begin PBXProject section */ /* Begin PBXProject section */
...@@ -267,6 +314,12 @@ ...@@ -267,6 +314,12 @@
DevelopmentTeam = 86R4V3XFLU; DevelopmentTeam = 86R4V3XFLU;
TestTargetID = 6003F589195388D20070C39A; TestTargetID = 6003F589195388D20070C39A;
}; };
63EFAB0D22658352005EEAC6 = {
CreatedOnToolsVersion = 10.2;
DevelopmentTeam = 4ZRMWCTP7J;
ProvisioningStyle = Automatic;
TestTargetID = 6003F589195388D20070C39A;
};
}; };
}; };
buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "GMPhobos" */; buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "GMPhobos" */;
...@@ -274,6 +327,7 @@ ...@@ -274,6 +327,7 @@
developmentRegion = English; developmentRegion = English;
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
knownRegions = ( knownRegions = (
English,
en, en,
Base, Base,
); );
...@@ -284,6 +338,7 @@ ...@@ -284,6 +338,7 @@
targets = ( targets = (
6003F589195388D20070C39A /* GMPhobos_Example */, 6003F589195388D20070C39A /* GMPhobos_Example */,
6003F5AD195388D20070C39A /* GMPhobos_Tests */, 6003F5AD195388D20070C39A /* GMPhobos_Tests */,
63EFAB0D22658352005EEAC6 /* GMPhobos_ExampleTests */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
...@@ -308,6 +363,13 @@ ...@@ -308,6 +363,13 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
63EFAB0C22658352005EEAC6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
...@@ -399,6 +461,14 @@ ...@@ -399,6 +461,14 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
63EFAB0A22658352005EEAC6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
63EFAB1122658352005EEAC6 /* GMPhobos_ExampleTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */ /* Begin PBXTargetDependency section */
...@@ -407,6 +477,11 @@ ...@@ -407,6 +477,11 @@
target = 6003F589195388D20070C39A /* GMPhobos_Example */; target = 6003F589195388D20070C39A /* GMPhobos_Example */;
targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */;
}; };
63EFAB1422658352005EEAC6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 6003F589195388D20070C39A /* GMPhobos_Example */;
targetProxy = 63EFAB1322658352005EEAC6 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */ /* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */ /* Begin PBXVariantGroup section */
...@@ -614,6 +689,65 @@ ...@@ -614,6 +689,65 @@
}; };
name = Release; name = Release;
}; };
63EFAB1522658352005EEAC6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 4ZRMWCTP7J;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = GMPhobos_ExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.gengmei.GMPhobos-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMPhobos_Example.app/GMPhobos_Example";
};
name = Debug;
};
63EFAB1622658352005EEAC6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 4ZRMWCTP7J;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = GMPhobos_ExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.gengmei.GMPhobos-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMPhobos_Example.app/GMPhobos_Example";
};
name = Release;
};
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
...@@ -644,6 +778,15 @@ ...@@ -644,6 +778,15 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
63EFAB1722658352005EEAC6 /* Build configuration list for PBXNativeTarget "GMPhobos_ExampleTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
63EFAB1522658352005EEAC6 /* Debug */,
63EFAB1622658352005EEAC6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */ /* End XCConfigurationList section */
}; };
rootObject = 6003F582195388D10070C39A /* Project object */; rootObject = 6003F582195388D10070C39A /* Project object */;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables> <Testables>
<TestableReference <TestableReference
...@@ -44,6 +43,16 @@ ...@@ -44,6 +43,16 @@
</Test> </Test>
</SkippedTests> </SkippedTests>
</TestableReference> </TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "63EFAB0D22658352005EEAC6"
BuildableName = "GMPhobos_ExampleTests.xctest"
BlueprintName = "GMPhobos_ExampleTests"
ReferencedContainer = "container:GMPhobos.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables> </Testables>
<MacroExpansion> <MacroExpansion>
<BuildableReference <BuildableReference
...@@ -61,7 +70,6 @@ ...@@ -61,7 +70,6 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
......
//
// GMPhobos_ExampleTests.m
// GMPhobos_ExampleTests
//
// Created by Jing on 2019/4/16.
// Copyright © 2019 licong. All rights reserved.
//
#import <XCTest/XCTest.h>
@interface GMPhobos_ExampleTests : XCTestCase
@end
@implementation GMPhobos_ExampleTests
- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
...@@ -35,7 +35,7 @@ PODS: ...@@ -35,7 +35,7 @@ PODS:
- GMKit/Protocol (0.8.4): - GMKit/Protocol (0.8.4):
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMPhobos (1.0.7): - GMPhobos (1.1.2):
- GMCache (= 0.2.3) - GMCache (= 0.2.3)
- GMKit - GMKit
- Masonry (1.1.0) - Masonry (1.1.0)
...@@ -63,11 +63,11 @@ EXTERNAL SOURCES: ...@@ -63,11 +63,11 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
GMCache: 09a3029c96fe130e3a21faef70b3d9d2ce92d639 GMCache: 09a3029c96fe130e3a21faef70b3d9d2ce92d639
GMKit: a30da06b84e5c4a357d427c70d1b5ec672a1f6a1 GMKit: a30da06b84e5c4a357d427c70d1b5ec672a1f6a1
GMPhobos: dd0026c837b0909013a9002b7f3e04f28786e24b GMPhobos: 5d9b29fb16fb7b8f3b2983aaab8b42cefc510baa
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9 SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
PODFILE CHECKSUM: ea0fac2144ac80baf8f21576cde49526c19991ad PODFILE CHECKSUM: ea0fac2144ac80baf8f21576cde49526c19991ad
COCOAPODS: 1.6.0.beta.2 COCOAPODS: 1.6.1
...@@ -33,7 +33,7 @@ NSString *const MockCityId = @"beijing"; ...@@ -33,7 +33,7 @@ NSString *const MockCityId = @"beijing";
- (void)tearDown { - (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class. // Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown]; [super tearDown];
[GMCache removeObjectAtDucmentPathWithkey:PhobosCacheKey]; [GMCache removeObjectAtDocumentPathWithkey:PhobosCacheKey];
} }
/** /**
...@@ -45,7 +45,7 @@ NSString *const MockCityId = @"beijing"; ...@@ -45,7 +45,7 @@ NSString *const MockCityId = @"beijing";
[_client setUserId:MockUserId]; [_client setUserId:MockUserId];
[_client setCurrentCityId:MockCityId]; [_client setCurrentCityId:MockCityId];
[Phobos track:MockEventId]; [Phobos track:MockEventId];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey]; NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array is empty"); XCTAssertTrue(array.count == 1, @"array is empty");
NSDictionary *dict = [array objectAtIndex:0]; NSDictionary *dict = [array objectAtIndex:0];
[self verfiyDict:dict]; [self verfiyDict:dict];
...@@ -59,7 +59,7 @@ NSString *const MockCityId = @"beijing"; ...@@ -59,7 +59,7 @@ NSString *const MockCityId = @"beijing";
*/ */
- (void)testTrackEventWithoutAttr{ - (void)testTrackEventWithoutAttr{
[Phobos track:MockEventId]; [Phobos track:MockEventId];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey]; NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array is empty"); XCTAssertTrue(array.count == 1, @"array is empty");
NSDictionary *dict = [array objectAtIndex:0]; NSDictionary *dict = [array objectAtIndex:0];
[self verfiyDict:dict]; [self verfiyDict:dict];
...@@ -74,7 +74,7 @@ NSString *const MockCityId = @"beijing"; ...@@ -74,7 +74,7 @@ NSString *const MockCityId = @"beijing";
- (void)testTrackEventWithAttr{ - (void)testTrackEventWithAttr{
NSDictionary *attr = @{@"attr":@"track_attr"}; NSDictionary *attr = @{@"attr":@"track_attr"};
[Phobos track:MockEventId attributes:attr]; [Phobos track:MockEventId attributes:attr];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey]; NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array is empty"); XCTAssertTrue(array.count == 1, @"array is empty");
NSDictionary *dict = [array objectAtIndex:0]; NSDictionary *dict = [array objectAtIndex:0];
[self verfiyDict:dict]; [self verfiyDict:dict];
...@@ -95,10 +95,77 @@ NSString *const MockCityId = @"beijing"; ...@@ -95,10 +95,77 @@ NSString *const MockCityId = @"beijing";
// When // When
[Phobos track:MockEventId attributes:attr sendNow:YES]; [Phobos track:MockEventId attributes:attr sendNow:YES];
// Then // Then
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey]; NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 0, @"array should be empty"); XCTAssertTrue(array.count == 0, @"array should be empty");
} }
/**
* @brief 测试立即发送带参数事件成功,不应该清除不立即发送的埋点
*
* @since 1.1.4
*/
- (void)testTrackEventWithAttrAndSendNowDonotClearNormal {
// Given
NSDictionary *attr = @{@"attr":@"track_attr"};
// When
[Phobos track:MockEventId attributes:attr sendNow:NO];
// When
[Phobos track:MockEventId attributes:attr sendNow:YES];
NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count != 0, @"array shouldn't be empty");
}
/**
* @brief 测试二次立即发送带参数事件成功,不应该重复发送上一条
*
* @since 1.1.4
*/
- (void)testTrackEventWithDoubleAttrAndSendNow {
// Given
NSDictionary *attr = @{@"attr":@"track_attr"};
// When
[Phobos track:MockEventId attributes:attr sendNow:YES];
NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosTempCacheKey];
XCTAssertTrue(array.count == 0, @"array shouldn't be empty");
// When
[Phobos track:MockEventId attributes:attr sendNow:YES];
array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosTempCacheKey];
XCTAssertTrue(array.count == 0, @"array shouldn't be empty");
array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 0, @"array shouldn't be empty");
}
/**
* @brief 测试不立即发送带参数事件成功后,数据会被清除
*
* @since 1.1.4
*/
- (void)testTrackEventWithDoubleAttrAndNoSendNow {
// remove 保证PhobosCacheKey起始数据为空
[GMCache removeObjectAtDocumentPathWithkey:PhobosCacheKey];
NSDictionary *attr = @{@"attr":@"track_attr"};
//
[Phobos track:MockEventId attributes:attr];
NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array shouldn't be empty");
// PhobosCacheKey超过50条数据会自动上报,模拟此情况
for (int i = 0; i < 50; i++) {
[Phobos track:MockEventId attributes:attr];
}
array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 0, @"array shouldn't be empty");
[Phobos track:MockEventId attributes:attr];
array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array shouldn't be empty");
}
- (void)verfiyDict:(NSDictionary *)dict{ - (void)verfiyDict:(NSDictionary *)dict{
NSArray *keys = [dict allKeys]; NSArray *keys = [dict allKeys];
XCTAssertTrue([keys containsObject:@"type"], @"Missing type"); XCTAssertTrue([keys containsObject:@"type"], @"Missing type");
...@@ -139,7 +206,7 @@ NSString *const MockCityId = @"beijing"; ...@@ -139,7 +206,7 @@ NSString *const MockCityId = @"beijing";
[controller viewWillAppear:true]; [controller viewWillAppear:true];
[controller viewWillDisappear:true]; [controller viewWillDisappear:true];
[self paramUnNilCheck]; [self paramUnNilCheck];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey]; NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count != 0, @"PhobosCacheKey 下面应该有数据"); XCTAssertTrue(array.count != 0, @"PhobosCacheKey 下面应该有数据");
NSDictionary *dic = array[0][@"params"]; NSDictionary *dic = array[0][@"params"];
...@@ -153,7 +220,7 @@ NSString *const MockCityId = @"beijing"; ...@@ -153,7 +220,7 @@ NSString *const MockCityId = @"beijing";
} }
- (void)paramUnNilCheck { - (void)paramUnNilCheck {
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey]; NSArray *array = [GMCache fetchObjectAtDocumentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count != 0, @"PhobosCacheKey 下面应该有数据"); XCTAssertTrue(array.count != 0, @"PhobosCacheKey 下面应该有数据");
NSDictionary *dic = array[0][@"params"]; NSDictionary *dic = array[0][@"params"];
......
...@@ -565,7 +565,6 @@ static NSString *sdkVersion = @"110"; ...@@ -565,7 +565,6 @@ static NSString *sdkVersion = @"110";
//2.把缓存区的数据发送给服务器 //2.把缓存区的数据发送给服务器
[self sendArray]; [self sendArray];
//3.把原有的数据删除 //3.把原有的数据删除
[GMCache removeObjectAtDocumentPathWithkey:PhobosTempCacheKey];
if (clean) { if (clean) {
[GMCache removeObjectAtDocumentPathWithkey:PhobosCacheKey]; [GMCache removeObjectAtDocumentPathWithkey:PhobosCacheKey];
} }
......
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