Latest | 1.0.0 |
---|---|
Homepage | https://github.com/ifactorylab/IFTimeoutBlock |
License | MIT |
Platforms | ios 6.0, osx 10.8 |
Authors |
Asynchronous execution block with timeout support
Getting Started
Install the Prerequisites
- OS X is requried for all iOS development
- XCODE from the App Store.
- GIT is required.
- CocoaPods is required for the iOS dependency management. You should have ruby installed on your machine before install CocoaPods
Install the library
Source code for the SDK is available on GitHub
$ git clone [email protected]:ifactorylab/IFTimeoutBlock.git
Run CocoaPods
CocoaPods installs all dependencies for the library project
$ cd IFTimeoutBlock
$ pod install
$ open IFTimeoutBlock.xcodeproj
Add rtmp-wrapper to your project
Create a Podfile if not exist, add the line below
pod 'IFTimeoutBlock', '~> 1.0.0'
Example
#import "IFTimeoutBlock.h"
IFTimeoutBlock *block = [[IFTimeoutBlock alloc] init];
IFTimeoutHandler timeoutBlock = ^(IFTimeoutBlock *block) {
// do something to notify timeout.....
};
IFExecutionBlock executionBlock = ^(IFTimeoutBlock *block) {
// send signal to the module to stop timeout timer
[block signal];
// If timedout, block.timedOut should be true
XCTAssertFalse(block.timedOut);
};
[block setExecuteAsyncWithTimeout:2 // timeout in seconds
WithHandler:timeoutBlock
andExecutionBlock:executionBlock];
[block release];
Version detail
1.0.0
- first version
Latest podspec
{ "name": "IFTimeoutBlock", "version": "1.0.0", "license": "MIT", "summary": "Asynchronous execution block with timeout support", "homepage": "https://github.com/ifactorylab/IFTimeoutBlock", "authors": { "Min Kim": "[email protected]" }, "source": { "git": "https://github.com/ifactorylab/IFTimeoutBlock.git", "tag": "1.0.0", "submodules": true }, "requires_arc": false, "platforms": { "ios": "6.0", "osx": "10.8" }, "public_header_files": "IFTimeoutBlock/IFTimeoutBlock.h", "source_files": "IFTimeoutBlock/{*}.{h,m}" }
Sat, 27 Feb 2016 01:32:03 +0000