IFTimeoutBlock 1.0.0

IFTimeoutBlock 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Min Kim.



  • By
  • Min Kim

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

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