Skip to content

Commit

Permalink
Updated to version 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed May 9, 2013
1 parent 9c3433f commit b55e79a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LICENCE.md
@@ -1,6 +1,6 @@
StandardPaths

Version 1.5.2, May 6th 2013
Version 1.5.3, May 9th 2013

Copyright (C) 2011 Charcoal Design

Expand Down
4 changes: 4 additions & 0 deletions RELEASE NOTES.md
@@ -1,3 +1,7 @@
Version 1.5.3

- Fixed bug in swizzled initWithImage: method that meant it was never called

Version 1.5.2

- Fixed swizzling crash when using storyboards
Expand Down
4 changes: 2 additions & 2 deletions StandardPaths.podspec
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = 'StandardPaths'
s.version = '1.5.2'
s.version = '1.5.3'
s.summary = 'Category on NSFileManager for simple consistent access to standard application directories.'
s.description = 'StandardPaths is a category on NSFileManager for simplifying access to standard application directories on iOS and Mac OS and abstracting the iCloud backup flags on iOS. It also provides support for working with device-specific file suffixes, such as the @2x suffix for Retina displays, or the -568h suffix for iPhone 5 and can optionally swizzle certain UIKit methods to support these suffixes more consistently.'
s.homepage = 'https://github.com/nicklockwood/StandardPaths'
s.author = { 'Nick Lockwood' => 'http://charcoaldesign.co.uk/' }
s.source = { :git => 'https://github.com/nicklockwood/StandardPaths.git', :tag => '1.5.2'}
s.source = { :git => 'https://github.com/nicklockwood/StandardPaths.git', :tag => '1.5.3'}
s.source_files = 'StandardPaths/*.{h,m}'
s.license = { :type => 'Zlib License', :file => 'LICENCE.md' }
s.requires_arc = false
Expand Down
2 changes: 1 addition & 1 deletion StandardPaths/StandardPaths.h
@@ -1,7 +1,7 @@
//
// StandardPaths.h
//
// Version 1.5.2
// Version 1.5.3
//
// Created by Nick Lockwood on 10/11/2011.
// Copyright (C) 2012 Charcoal Design
Expand Down
18 changes: 11 additions & 7 deletions StandardPaths/StandardPaths.m
@@ -1,7 +1,7 @@
//
// StandardPaths.h
//
// Version 1.5.2
// Version 1.5.3
//
// Created by Nick Lockwood on 10/11/2011.
// Copyright (C) 2012 Charcoal Design
Expand Down Expand Up @@ -32,7 +32,7 @@


#import "StandardPaths.h"
#import <objc/runtime.h>
#import <objc/runtime.h>
#include <sys/xattr.h>


Expand Down Expand Up @@ -164,13 +164,13 @@ - (NSString *)offlineDataPath
NSURL *URL = [NSURL fileURLWithPath:path isDirectory:YES];
[URL setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:NULL];
}
else
else
{
//use the iOS 5.0.1 mobile backup flag to exclude file from backp
u_int8_t b = 1;
setxattr([path fileSystemRepresentation], "com.apple.MobileBackup", &b, 1, 0, 0);
}

//retain path
path = [[NSString alloc] initWithString:path];
}
Expand Down Expand Up @@ -750,7 +750,7 @@ @implementation UIImage (StandardPaths)

+ (void)load
{
SP_swizzleInstanceMethod(self, @selector(initWithContentsOfFile:), @selector(SP_initWithContentsOfFile));
SP_swizzleInstanceMethod(self, @selector(initWithContentsOfFile:), @selector(SP_initWithContentsOfFile:));
SP_swizzleClassMethod(self, @selector(imageNamed:), @selector(SP_imageNamed:));
}

Expand All @@ -765,7 +765,9 @@ - (UIImage *)SP_initWithContentsOfFile:(NSString *)file
{
//need to handle loading ourselves
NSData *data = [NSData dataWithContentsOfFile:file];
return [self initWithData:data scale:scale];
UIImage *image = [self initWithData:data];
[image setValue:@(scale) forKey:@"scale"];
return image;
}
}
if ([path hasRetina4Suffix] && ![file hasRetina4Suffix])
Expand All @@ -788,7 +790,9 @@ + (UIImage *)SP_imageNamed:(NSString *)name
UIImage *image = [cache objectForKey:name];
if (!image)
{
image = [UIImage imageWithContentsOfFile:path];
NSData *data = [NSData dataWithContentsOfFile:path];
image = [UIImage imageWithData:data];
[image setValue:@(scale) forKey:@"scale"];
if (image) [cache setObject:image forKey:name];
}
return image;
Expand Down
Expand Up @@ -469,6 +469,10 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
SDKROOT = iphoneos;
WARNING_CFLAGS = (
"-Wall",
"-Wextra",
);
};
name = Debug;
};
Expand All @@ -493,6 +497,10 @@
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
WARNING_CFLAGS = (
"-Wall",
"-Wextra",
);
};
name = Release;
};
Expand Down

0 comments on commit b55e79a

Please sign in to comment.