Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Removed methods deprecated in v1.9 (Issue #90, PR #92)
* Fixed behavior of `-extractFilesTo:overwrite:error:`, so it shows the progress of each individual file as they extract (Issue #91, PR #94)
* Deprecated the initializers that take a file path instead of an `NSURL` (Issue #90, PR #95)

## 1.9

Expand Down
8 changes: 4 additions & 4 deletions Source/UZKArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ extern NSString *UZKErrorDomain;


/**
* Creates and returns an archive at the given path
* DEPRECATED: Creates and returns an archive at the given path
*
* @param filePath A path to the archive file
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error;
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error __deprecated_msg("Use -initWithURL:error: instead");

/**
* Creates and returns an archive at the given URL
Expand All @@ -199,15 +199,15 @@ extern NSString *UZKErrorDomain;
- (nullable instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;

/**
* Creates and returns an archive at the given path, with a given password
* DEPRECATED: Creates and returns an archive at the given path, with a given password
*
* @param filePath A path to the archive file
* @param password The password of the given archive
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
- (nullable instancetype)initWithPath:(NSString *)filePath password:(nullable NSString *)password error:(NSError **)error;
- (nullable instancetype)initWithPath:(NSString *)filePath password:(nullable NSString *)password error:(NSError **)error __deprecated_msg("Use -initWithURL:password:error: instead");

/**
* Creates and returns an archive at the given URL, with a given password
Expand Down
4 changes: 2 additions & 2 deletions Tests/WriteDataTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class WriteDataTests: UZKArchiveTestCase {
let testArchiveURL = tempDirectory.appendingPathComponent("SwiftWriteDataTest.zip")
let password = "111111"

let writeArchive = try! UZKArchive(path: testArchiveURL.path, password: password)
let writeArchive = try! UZKArchive(url: testArchiveURL, password: password)

for testFilePath in testFilePaths {
let fileData = try? Data(contentsOf: testFileURLs[testFilePath] as! URL)
Expand All @@ -398,7 +398,7 @@ class WriteDataTests: UZKArchiveTestCase {

// Read with UnzipKit

let readArchive = try! UZKArchive(path: testArchiveURL.path, password: password)
let readArchive = try! UZKArchive(url: testArchiveURL, password: password)
XCTAssertTrue(readArchive.isPasswordProtected(), "Archive is not marked as password-protected")

var index = 0
Expand Down
3 changes: 2 additions & 1 deletion beta-notes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* Removed methods deprecated in v1.9 (Issue #90, PR #92)
* Fixed behavior of `-extractFilesTo:overwrite:error:`, so it shows the progress of each individual file as they extract (Issue #91, PR #94)
* Fixed behavior of `-extractFilesTo:overwrite:error:`, so it shows the progress of each individual file as they extract (Issue #91, PR #94)
* Deprecated the initializers that take a file path instead of an `NSURL` (Issue #90, PR #95)