ShortenedURLExpander 1.0.3

ShortenedURLExpander 1.0.3

Maintained by retriable.



  • By
  • retriable

ShortenedURLExpander

License MIT Build Status Carthage compatible Pod Version Pod Platform

Shortened URL Expander

Cocoapods

Add the following to your project's Podfile:

pod 'ShortenedURLExpander'

Carthage

Add the following to your project's Cartfile:

github "retriable/ShortenedURLExpander"

Example

    self.expander=[[ShortenedURLExpander alloc] initWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] isURLShortened:^bool(NSURL *url) {
        return [url.host isEqualToString:@"t.cn"];
    }];
    self.operation=[self.expander expand:[NSURL URLWithString:@"http://t.cn/RnWLQVx"] maximumRetries:2 completion:^(NSURL *originalUrl,NSURL *expandedUrl, NSError *error) {
        NSLog(@"%@",expandedUrl);
    }];