This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION | |
AD_HOC_CODE_SIGNING_ALLOWED | |
ALTERNATE_GROUP | |
ALTERNATE_MODE | |
ALTERNATE_OWNER | |
ALWAYS_SEARCH_USER_PATHS | |
ALWAYS_USE_SEPARATE_HEADERMAPS | |
APPLE_INTERNAL_DEVELOPER_DIR | |
APPLE_INTERNAL_DIR | |
APPLE_INTERNAL_DOCUMENTATION_DIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////////////////// | |
#pragma mark - Warn if we KVO a weak property | |
// Doesn't support key paths. | |
static BOOL PSPDFIsWeakProperty(id object, NSString *keyPath) { | |
objc_property_t property = class_getProperty([object class], keyPath.UTF8String); | |
if (property) { | |
// https://developer.apple.com/library/mac/documentation/cocoa/conceptual/objcruntimeguide/articles/ocrtpropertyintrospection.html | |
const char *attributes = property_getAttributes(property); | |
return attributes && strstr(attributes, ",W"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 | |
@interface NSString (PSPDFModernizer) | |
// Added in iOS 8, retrofitted for iOS 7 | |
- (BOOL)containsString:(NSString *)aString; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pod::Spec.new do |s| | |
s.name = 'POD_NAME' | |
s.version = '1.0.0' | |
s.license = { :type => 'MIT', :file => 'LICENSE' } | |
s.summary = 'Example of pod which installs a run script into the Xcode project (first target)' | |
s.homepage = 'https://github.com/phatblat/POD_NAME' | |
s.authors = { 'Ben Chatelain' => '[email protected]' } | |
s.source = { :git => 'https://github.com/phatblat/POD_NAME.git', :tag => s.version.to_s } | |
s.ios.deployment_target = '6.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL PSPDFSystemFunctionOverriddenInCategory(Class theClass, SEL selector, NSString *__autoreleasing* categoryName) { | |
NSCParameterAssert(theClass); | |
NSCParameterAssert(selector); | |
Dl_info info; | |
if (dladdr(class_getMethodImplementation(theClass, selector), &info)) { | |
// /System/Library/Frameworks is a common denominator, some methods are in /usr/lib/libobjc.A.dylib | |
// Custom app is in /private/var/mobile/Containers/Bundle/Application/<UID>/PSPDFCatalog.app/PSPDFCatalog | |
if (!strstr(info.dli_fname, "/System/Library") && !strstr(info.dli_fname, "/usr/lib")) { | |
if (categoryName) *categoryName = @(info.dli_sname); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Aspects.h" | |
#import "fishhook.h" | |
#import <dlfcn.h> | |
// UIAnimationDragCoefficient | |
// UISimulatedApplicationResizeGestureEnabled | |
// UIExternalTouchSloppinessFactor | |
// UIEnableParallaxEffects | |
// UIDeviceUsesLowQualityGraphics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define PSPDF_NOT_DESIGNATED_INITIALIZER() PSPDF_NOT_DESIGNATED_INITIALIZER_CUSTOM(init) | |
#define PSPDF_NOT_DESIGNATED_INITIALIZER_CUSTOM(initName) \ | |
_Pragma("clang diagnostic push") \ | |
_Pragma("clang diagnostic ignored \"-Wobjc-designated-initializers\"") \ | |
- (instancetype)initName \ | |
{ do { \ | |
NSAssert2(NO, @"%@ is not the designated initializer for instances of %@.", NSStringFromSelector(_cmd), NSStringFromClass([self class])); \ | |
return nil; \ | |
} while (0); } \ | |
_Pragma("clang diagnostic pop") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MALLOC_UNIQUE_PTR_H | |
#define MALLOC_UNIQUE_PTR_H | |
/* | |
idea borrowed from http://www.codeproject.com/Articles/820931/Using-std-unique-ptr-RAII-with-malloc-and-free | |
*/ | |
#include<memory> | |
template<typename T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PSPDF_EXTERN BOOL PSPDFIsBlock(id _Nullable block) { | |
static Class blockClass; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
blockClass = [^{} class]; | |
while ([blockClass superclass] != NSObject.class) { | |
blockClass = [blockClass superclass]; | |
} | |
}); |
OlderNewer