Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Expanded API for submitting operations with a delay
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Aug 22, 2019
1 parent acb7563 commit 9d479a3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions OperationPlus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.2.2;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
Expand All @@ -573,6 +574,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.2.2;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
};
Expand Down
10 changes: 10 additions & 0 deletions OperationPlus/Extensions/OperationQueue+Enqueuing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,14 @@ extension OperationQueue {
self.addOperation(op)
}
}

/// Invokes the block on the queue after a delay.
///
/// This method schedules an `addOperation` call after the specified delay.
///
/// - Parameter delay: The amount of time to wait before scheduling op.
/// - Parameter block: The block to be invoked on the queue.
public func addOperation(afterDelay delay: TimeInterval, block: @escaping () -> Void) {
addOperation(BlockOperation(block: block), afterDelay: delay)
}
}
2 changes: 1 addition & 1 deletion OperationPlus/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
Expand Down
2 changes: 1 addition & 1 deletion OperationPlus/OperationPlus.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PRODUCT_NAME = OperationPlus
PRODUCT_BUNDLE_IDENTIFIER = com.chimehq.OperationPlus
PRODUCT_MODULE_NAME = OperationPlus
CURRENT_PROJECT_VERSION = 5
CURRENT_PROJECT_VERSION = 6

INFOPLIST_FILE = OperationPlus/Info.plist

Expand Down

0 comments on commit 9d479a3

Please sign in to comment.