Commit 035d5d66 authored by IOS-张 博's avatar IOS-张 博

设置清理launch缓存的版本号

parent fe02e289
......@@ -399,8 +399,6 @@
9E6E28A623A2165100085C21 /* QGUserCenterDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E6E28A523A2165100085C21 /* QGUserCenterDataModel.m */; };
9E6E28A923A21A2600085C21 /* QGUserCenterHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E6E28A823A21A2600085C21 /* QGUserCenterHeaderCell.m */; };
9E6E28AC23A21DCC00085C21 /* QGUserCenterMenuCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E6E28AB23A21DCC00085C21 /* QGUserCenterMenuCell.m */; };
9E70432C2463E627008BE76F /* screen_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9E70432A2463E627008BE76F /* screen_icon@2x.png */; };
9E70432D2463E627008BE76F /* screen_icon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9E70432B2463E627008BE76F /* screen_icon@3x.png */; };
9E704336246556FC008BE76F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9E70433424655462008BE76F /* LaunchScreen.storyboard */; };
9E7347B12404D94800083D5C /* QGMallHomepageNavigationCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E7347B02404D94800083D5C /* QGMallHomepageNavigationCell.m */; };
9E7347B42404E0AB00083D5C /* QGMallHomepageQuickEntryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E7347B32404E0AB00083D5C /* QGMallHomepageQuickEntryCell.m */; };
......@@ -1437,8 +1435,6 @@
9E6E28A823A21A2600085C21 /* QGUserCenterHeaderCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QGUserCenterHeaderCell.m; sourceTree = "<group>"; };
9E6E28AA23A21DCC00085C21 /* QGUserCenterMenuCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QGUserCenterMenuCell.h; sourceTree = "<group>"; };
9E6E28AB23A21DCC00085C21 /* QGUserCenterMenuCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QGUserCenterMenuCell.m; sourceTree = "<group>"; };
9E70432A2463E627008BE76F /* screen_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "screen_icon@2x.png"; sourceTree = "<group>"; };
9E70432B2463E627008BE76F /* screen_icon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "screen_icon@3x.png"; sourceTree = "<group>"; };
9E70433424655462008BE76F /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
9E7347AF2404D94800083D5C /* QGMallHomepageNavigationCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QGMallHomepageNavigationCell.h; sourceTree = "<group>"; };
9E7347B02404D94800083D5C /* QGMallHomepageNavigationCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QGMallHomepageNavigationCell.m; sourceTree = "<group>"; };
......@@ -4032,15 +4028,6 @@
path = Model;
sourceTree = "<group>";
};
9E7043252463E5DF008BE76F /* LaunchScreen */ = {
isa = PBXGroup;
children = (
9E70432A2463E627008BE76F /* screen_icon@2x.png */,
9E70432B2463E627008BE76F /* screen_icon@3x.png */,
);
path = LaunchScreen;
sourceTree = "<group>";
};
9E74E103237943D6006E4926 /* CardHeaderCell */ = {
isa = PBXGroup;
children = (
......@@ -4272,7 +4259,6 @@
isa = PBXGroup;
children = (
9E70433424655462008BE76F /* LaunchScreen.storyboard */,
9E7043252463E5DF008BE76F /* LaunchScreen */,
9EA79762227EBA1400CDCB80 /* AppDelegate.h */,
9EA79767227EBA1400CDCB80 /* AppDelegate.m */,
9EA79766227EBA1400CDCB80 /* main.m */,
......@@ -5856,7 +5842,6 @@
9E4609FB23B313B7004FD96E /* UMCommonLog.bundle in Resources */,
461B9343240E48340010ADEA /* AlibabaAuthSDK.bundle in Resources */,
7F4C811722CA02AA003B9D07 /* QGMessageCenterCell.xib in Resources */,
9E70432C2463E627008BE76F /* screen_icon@2x.png in Resources */,
46B6A93B23BB4FA700184B85 /* PEDat_wb.bundle in Resources */,
9E60751524187F5400D38978 /* GT3Captcha.bundle in Resources */,
461B9346240E48340010ADEA /* yw_1222.jpg in Resources */,
......@@ -5877,7 +5862,6 @@
461B9344240E48340010ADEA /* AlipaySDK.bundle in Resources */,
7F4C811B22CA02AA003B9D07 /* QGNotifyDetailContentCell.xib in Resources */,
46B6A8D623BB439A00184B85 /* WBOCRService.bundle in Resources */,
9E70432D2463E627008BE76F /* screen_icon@3x.png in Resources */,
46B6A93923BB4FA700184B85 /* ufa_wb.bundle in Resources */,
97CDB61C22891D3200257F77 /* MJRefresh.bundle in Resources */,
9EA79A6A228288AD00CDCB80 /* WeiboSDK.bundle in Resources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "launch_screen_image@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "launch_screen_image@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -19,7 +19,7 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="screen_icon.png" translatesAutoresizingMaskIntoConstraints="NO" id="pXO-8U-iLB">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_screen_image" translatesAutoresizingMaskIntoConstraints="NO" id="pXO-8U-iLB">
<rect key="frame" x="113" y="748" width="188" height="64"/>
<constraints>
<constraint firstAttribute="height" constant="64" id="fSI-65-tlf"/>
......@@ -40,6 +40,6 @@
</scene>
</scenes>
<resources>
<image name="screen_icon.png" width="188" height="64"/>
<image name="launch_screen_image" width="188" height="64"/>
</resources>
</document>
......@@ -46,6 +46,11 @@
//因为该包发版依赖于替换旧包,所以真实版本号很高。此处手动维护是因为产品要求版本号比较低。
#define XcodeAppVersion @"3.0.00"
//引导图版本号,每次替换引导图后修改此版本号
#define GuideKeyVersion @"3.0.00"
//闪屏图片版本号,每次替换闪屏图后更改此版本号,清理闪屏缓存
#define LaunchScreenVersion @"3.0.00"
#define XcodeAppBundleIdentifier [[NSBundle mainBundle] bundleIdentifier]
///渠道
......@@ -58,7 +63,7 @@
/// 极光推送AppKey
#define kJPushAppKey @"3591ee0bb906b9be14614404"
#define GuideKey @"3.0.00"
static NSString *const kDefaultIconUrl = @"http://7xodoz.dl1.z0.glb.clouddn.com/app/share/logo_120.png";
//Tencent
......
......@@ -37,13 +37,36 @@
[[QGWindowManager shareInstance] showPrivacyProtocol];
}
//当前Build首次登录
BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:GuideKey];
//引导图是否浏览过
BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:GuideKeyVersion];
if (!result) {
[[QGWindowManager shareInstance] showLaunchGuide];
}
//闪屏图缓存是否已清理
BOOL launchResult = [[NSUserDefaults standardUserDefaults] boolForKey:LaunchScreenVersion];
if (!launchResult) {
//清理闪屏缓存
[self clearLaunchScreenCache];
}
}
/// 清理闪屏图片
+ (void)clearLaunchScreenCache {
NSError *error;
[NSFileManager.defaultManager removeItemAtPath:[NSString stringWithFormat:@"%@/Library/SplashBoard",NSHomeDirectory()] error:&error];
if (error) {
NSLog(@"Failed to delete launch screen cache: %@",error);
}
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:LaunchScreenVersion];
[[NSUserDefaults standardUserDefaults] synchronize];
}
/**
欢迎页显示
*/
......@@ -62,7 +85,7 @@
- (void)dismissGuideWindowAnimated:(BOOL)animated {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:GuideKey];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:GuideKeyVersion];
[[NSUserDefaults standardUserDefaults] synchronize];
NSTimeInterval animationDuration = 0;
......
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