Permalink
Browse files

Removed the loadable category hack

This started to show warnings on new Xcode, also everybody using external libs is using the all_load linker flag anyway
  • Loading branch information...
1 parent bd3851f commit c2375f158270fc473d58c5a8c1307d58b4dbc5ec @odrobnik odrobnik committed Dec 21, 2012
@@ -9,14 +9,12 @@
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
- #import <MobileCoreServices/MobileCoreServices.h>
#else
#import <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
#endif
#import <Foundation/Foundation.h>
- #import "LoadableCategory.h"
// DTDownloadCache
#import <CoreData/CoreData.h>
@@ -1,34 +0,0 @@
-//
-// LoadableCategory.h
-// Objective-Gems
-//
-// Copyright 2011 Karl Stenerud
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// Note: You are NOT required to make the license available from within your
-// iOS application. Including it in your project is sufficient.
-//
-// Attribution is not required, but appreciated :)
-//
-
-
-/** Make all categories in the current file loadable without using -load-all.
- *
- * Normally, compilers will skip linking files that contain only categories.
- * Adding a call to this macro adds a dummy class, which causes the linker
- * to add the file.
- *
- * @param UNIQUE_NAME A globally unique name.
- */
-#define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME @end @implementation FORCELOAD_##UNIQUE_NAME @end
@@ -9,12 +9,8 @@
#import "NSArray+DTError.h"
#import "DTFoundationConstants.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSArray_DTError);
-
@implementation NSArray (DTError)
-
+ (NSArray *)arrayWithContentsOfURL:(NSURL *)URL error:(NSError **)error
{
NSData *readData = [NSData dataWithContentsOfURL:URL options:0 error:error];
@@ -9,9 +9,6 @@
#import "NSDictionary+DTError.h"
#import "DTFoundationConstants.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSDictionary_DTError);
-
@implementation NSDictionary (DTError)
+ (NSDictionary *)dictionaryWithContentsOfURL:(NSURL *)URL error:(NSError **)error
@@ -8,9 +8,6 @@
#import "NSString+DTFormatNumbers.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSString_DTFormatNumbers);
-
@implementation NSString (DTFormatNumbers)
+ (NSString *)stringByFormattingBytes:(long long)bytes
@@ -8,9 +8,6 @@
#import "NSString+DTPaths.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSString_DTPaths);
-
@implementation NSString (DTPaths)
#pragma mark Standard Paths
@@ -8,9 +8,6 @@
#import "NSString+DTURLEncoding.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSString_DTURLEncoding);
-
@implementation NSString (DTURLEncoding)
- (NSString *)stringByURLEncoding
@@ -7,6 +7,7 @@
//
#import "NSString+DTUTI.h"
+#import <MobileCoreServices/MobileCoreServices.h>
@implementation NSString (DTUTI)
@@ -10,9 +10,6 @@
#import <CommonCrypto/CommonDigest.h>
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSString_DTUtilites);
-
@implementation NSString (DTUtilities)
+ (NSString *)stringWithUUID
@@ -8,10 +8,6 @@
#import "NSURL+DTAppLinks.h"
-
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSURL_DTAppLinks);
-
@implementation NSURL (DTAppLinks)
+ (NSURL *)appStoreURLforApplicationIdentifier:(NSString *)identifier
@@ -8,9 +8,6 @@
#import "NSURL+DTUnshorten.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(NSURL_DTUnshorten);
-
@implementation NSURL (DTUnshorten)
- (void)unshortenWithCompletion:(NSURLUnshortenCompletionHandler)completion
@@ -8,9 +8,6 @@
#import "UIApplication+DTNetworkActivity.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(UIApplication_DTNetworkActivity);
-
static NSUInteger __internalOperationCount = 0;
@implementation UIApplication (DTNetworkActivity)
@@ -8,11 +8,6 @@
#import "UIImage+DTFoundation.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(UIImage_DTFoundation);
-
-
-
@implementation UIImage (DTFoundation)
#pragma mark Loading
@@ -10,9 +10,6 @@
#import <objc/runtime.h>
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(UIView_DTActionHandlers);
-
static char kDTActionHandlerTapBlockKey;
static char kDTActionHandlerTapGestureKey;
static char kDTActionHandlerLongPressBlockKey;
@@ -9,10 +9,6 @@
#import "UIView+DTFoundation.h"
#import <QuartzCore/QuartzCore.h>
-
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(UIView_DTFoundation);
-
NSString *shadowContext = @"Shadow";
@implementation UIView (DTFoundation)
@@ -8,9 +8,6 @@
#import "UIWebView+DTFoundation.h"
-// force this category to be loaded by linker
-MAKE_CATEGORIES_LOADABLE(UIWebView_DTFoundation);
-
@implementation UIWebView (DTFoundation)
- (NSString *)documentTitle
@@ -27,7 +27,6 @@
A70B4CD01486621B00873A4A /* DTFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CC51486621B00873A4A /* DTFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70B4CD11486621B00873A4A /* DTVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CC71486621B00873A4A /* DTVersion.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70B4CD21486621B00873A4A /* DTVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = A70B4CC81486621B00873A4A /* DTVersion.m */; };
- A70B4CD31486621B00873A4A /* LoadableCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CC91486621B00873A4A /* LoadableCategory.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70B4CD41486621B00873A4A /* NSString+DTFormatNumbers.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CCA1486621B00873A4A /* NSString+DTFormatNumbers.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70B4CD51486621B00873A4A /* NSString+DTFormatNumbers.m in Sources */ = {isa = PBXBuildFile; fileRef = A70B4CCB1486621B00873A4A /* NSString+DTFormatNumbers.m */; };
A70B4CD61486621B00873A4A /* NSURL+DTAppLinks.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CCC1486621B00873A4A /* NSURL+DTAppLinks.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -39,7 +38,6 @@
A70B4CF2148663A800873A4A /* DTVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CC71486621B00873A4A /* DTVersion.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70B4CF3148663A800873A4A /* NSString+DTFormatNumbers.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CCA1486621B00873A4A /* NSString+DTFormatNumbers.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70B4CF4148663A800873A4A /* NSURL+DTAppLinks.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CCC1486621B00873A4A /* NSURL+DTAppLinks.h */; settings = {ATTRIBUTES = (Public, ); }; };
- A70B4CF6148663A800873A4A /* LoadableCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CC91486621B00873A4A /* LoadableCategory.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70B4CF7148663AF00873A4A /* DTFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4CC51486621B00873A4A /* DTFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; };
A70D5695162FD30700120A98 /* DTScriptVariable.h in Headers */ = {isa = PBXBuildFile; fileRef = A70D5693162FD30700120A98 /* DTScriptVariable.h */; };
A70D5696162FD30700120A98 /* DTScriptVariable.h in Headers */ = {isa = PBXBuildFile; fileRef = A70D5693162FD30700120A98 /* DTScriptVariable.h */; };
@@ -335,7 +333,6 @@
A70B4CC51486621B00873A4A /* DTFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DTFoundation.h; sourceTree = "<group>"; };
A70B4CC71486621B00873A4A /* DTVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DTVersion.h; sourceTree = "<group>"; };
A70B4CC81486621B00873A4A /* DTVersion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DTVersion.m; sourceTree = "<group>"; };
- A70B4CC91486621B00873A4A /* LoadableCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadableCategory.h; sourceTree = "<group>"; };
A70B4CCA1486621B00873A4A /* NSString+DTFormatNumbers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+DTFormatNumbers.h"; sourceTree = "<group>"; };
A70B4CCB1486621B00873A4A /* NSString+DTFormatNumbers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+DTFormatNumbers.m"; sourceTree = "<group>"; };
A70B4CCC1486621B00873A4A /* NSURL+DTAppLinks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+DTAppLinks.h"; sourceTree = "<group>"; };
@@ -593,7 +590,6 @@
A7D0AA69153C39540020F18B /* Categories */,
A7D0AA68153C39490020F18B /* Utility Functions */,
A77DD3D014E81A0B00F34B03 /* Externals */,
- A70B4CC91486621B00873A4A /* LoadableCategory.h */,
FAB1726916301F0D00B44EDC /* DTFoundationConstants.h */,
FAB1726A16301F0D00B44EDC /* DTFoundationConstants.m */,
);
@@ -910,7 +906,6 @@
A70B4CF2148663A800873A4A /* DTVersion.h in Headers */,
A70B4CF3148663A800873A4A /* NSString+DTFormatNumbers.h in Headers */,
A70B4CF4148663A800873A4A /* NSURL+DTAppLinks.h in Headers */,
- A70B4CF6148663A800873A4A /* LoadableCategory.h in Headers */,
A70B4CF7148663AF00873A4A /* DTFoundation.h in Headers */,
A72C110614A4946800F4EF69 /* UIView+DTFoundation.h in Headers */,
A7949A3B14C963F500A8CCDE /* DTHTMLParser.h in Headers */,
@@ -985,7 +980,6 @@
files = (
A70B4CD01486621B00873A4A /* DTFoundation.h in Headers */,
A70B4CD11486621B00873A4A /* DTVersion.h in Headers */,
- A70B4CD31486621B00873A4A /* LoadableCategory.h in Headers */,
A70B4CD41486621B00873A4A /* NSString+DTFormatNumbers.h in Headers */,
A70B4CD61486621B00873A4A /* NSURL+DTAppLinks.h in Headers */,
A70B4CE2148662B000873A4A /* DTFoundation-Prefix.pch in Headers */,

0 comments on commit c2375f1

Please sign in to comment.