Latest 0.0.1
Homepage https://github.com/alejandroivan/NSURL-RandValue
License MIT
Platforms ios 7.0, requires ARC
Authors

NSURL+RandValue

Category that adds a method to NSURL to get a randomized URL, in order to avoid caching.

Install

Installing is done using CocoaPods. To install this category, edit your Podfile and add this:

pod 'NSURL-RandValue'

Then just run pod install in the Terminal, at the same folder where your Podfile is.

Usage

#import <NSURL-RandValue/NSURL+RandValue.h>

- (void)someMethod {
    NSURL *theURL = [NSURL URLWithString:@"http://server/file.php?key1=value1"];
    NSURL *randomURL = [theURL randomizedURL];

    // Prints: http://server/file.php?key1=value1&rand=<random_integer>
    NSLog(@"%@", randomURL.absolutePath);
}

License

Released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "NSURL-RandValue",
    "version": "0.0.1",
    "summary": "Category that adds a method to NSURL to get a randomized URL, in order to avoid caching.",
    "description": "Category that adds a method to NSURL to get a randomized URL, in order to avoid caching.nBasically adds a "rand" query parameter to the URL, so this:nhttp://domain/file.extension?key1=value1&key2=value2nBecomes this:nhttp://domain/file.extension?key1=value1&key2=value2&rand=",
    "license": "MIT",
    "homepage": "https://github.com/alejandroivan/NSURL-RandValue",
    "authors": {
        "Alejandro Ivu00e1n Melo Domu00ednguez": "[email protected]"
    },
    "social_media_url": "https://twitter.com/alejandroivan",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/alejandroivan/NSURL-RandValue.git",
        "tag": "0.0.1"
    },
    "source_files": "Classes/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This