-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #691 from zapcannon87/master
feat(storage): clear default/current installation's persistent cache
- Loading branch information
Showing
7 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// LCInstallationTestCase.swift | ||
// LeanCloudObjcTests | ||
// | ||
// Created by zapcannon87 on 2022/05/12. | ||
// Copyright © 2022 LeanCloud Inc. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
@testable import LeanCloudObjc | ||
|
||
class LCInstallationTestCase: BaseTestCase { | ||
|
||
func testClearPersistentCache() { | ||
let installation = LCInstallation.default() | ||
installation.setDeviceTokenFrom(uuid.data(using: .utf8)!, teamId: "LeanCloud") | ||
XCTAssertTrue(installation.save()) | ||
XCTAssertTrue(FileManager.default.fileExists(atPath: LCPersistenceUtils.currentInstallationArchivePath())) | ||
LCInstallation.clearPersistentCache() | ||
XCTAssertFalse(FileManager.default.fileExists(atPath: LCPersistenceUtils.currentInstallationArchivePath())) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#define SDK_VERSION @"13.7.1" | ||
#define SDK_VERSION @"13.8.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters