├── URLLoader ├── en.lproj │ └── InfoPlist.strings ├── Default.png ├── Default@2x.png ├── Default-568h@2x.png ├── AppDelegate.h ├── DownloadOperation.h ├── URLLoader-Prefix.pch ├── main.m ├── URLLoader-Info.plist ├── AppDelegate.m └── DownloadOperation.m ├── README.md └── URLLoader.xcodeproj └── project.pbxproj /URLLoader/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | -------------------------------------------------------------------------------- /URLLoader/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/issue-2-background-networking/HEAD/URLLoader/Default.png -------------------------------------------------------------------------------- /URLLoader/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/issue-2-background-networking/HEAD/URLLoader/Default@2x.png -------------------------------------------------------------------------------- /URLLoader/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/issue-2-background-networking/HEAD/URLLoader/Default-568h@2x.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | objc.io issue #2 2 | === 3 | 4 | This is an example project for the article [Common Background Practices](http://www.objc.io/issue-2/common-background-practices.html) published in [objc.io issue #2](http://www.objc.io/issue-2/index.html). 5 | -------------------------------------------------------------------------------- /URLLoader/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // URLLoader 4 | // 5 | // Created by Chris Eidhof on 06/17/13. 6 | // Copyright (c) 2013 Chris Eidhof. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end -------------------------------------------------------------------------------- /URLLoader/DownloadOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by chris on 6/17/13. 3 | // 4 | 5 | #import 6 | 7 | 8 | @interface DownloadOperation : NSOperation 9 | - (id)initWithURL:(NSURL*)url; 10 | @property (nonatomic, readonly) NSError* error; 11 | @property (nonatomic, strong) NSData* data; 12 | @property (nonatomic, copy) void (^progressCallback) (float); 13 | @end -------------------------------------------------------------------------------- /URLLoader/URLLoader-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'URLLoader' target in the 'URLLoader' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iOS SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | 14 | #import 15 | 16 | #endif -------------------------------------------------------------------------------- /URLLoader/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // URLLoader 4 | // 5 | // Created by Chris Eidhof on 06/17/13. 6 | // Copyright (c) 2013 Chris Eidhof. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /URLLoader/URLLoader-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CFBundleIdentifier 7 | nl.eidhof.${PRODUCT_NAME:rfc1034identifier} 8 | 9 | CFBundleDevelopmentRegion 10 | en 11 | CFBundleExecutable 12 | ${EXECUTABLE_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | 22 | CFBundleDisplayName 23 | ${PRODUCT_NAME} 24 | CFBundleVersion 25 | 1.0 26 | CFBundleShortVersionString 27 | 1.0 28 | LSRequiresIPhoneOS 29 | 30 | UIRequiredDeviceCapabilities 31 | 32 | armv7 33 | 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | -------------------------------------------------------------------------------- /URLLoader/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // URLLoader 4 | // 5 | // Created by Chris Eidhof on 06/17/13. 6 | // Copyright (c) 2013 Chris Eidhof. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "DownloadOperation.h" 11 | 12 | @interface AppDelegate () 13 | @property (nonatomic, strong) NSOperationQueue* operationQueue; 14 | @end 15 | 16 | @implementation AppDelegate 17 | { 18 | DownloadOperation* downloadOperation; 19 | } 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 22 | { 23 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 24 | // Override point for customization after application launch. 25 | self.window.backgroundColor = [UIColor whiteColor]; 26 | [self.window makeKeyAndVisible]; 27 | self.operationQueue = [[NSOperationQueue alloc] init]; 28 | self.operationQueue.maxConcurrentOperationCount = 1; 29 | 30 | downloadOperation = [[DownloadOperation alloc] initWithURL:[NSURL URLWithString:@"http://ipv4.download.thinkbroadband.com/5MB.zip"]]; 31 | 32 | [self.operationQueue addOperation:downloadOperation]; 33 | [self.operationQueue addOperationWithBlock:^ 34 | { 35 | NSLog(@"next operation"); 36 | }]; 37 | 38 | UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 39 | button.frame = CGRectMake(10, 10, 300, 80); 40 | [self.window addSubview:button]; 41 | [button setTitle:@"Cancel" forState:UIControlStateNormal]; 42 | [button addTarget:self action:@selector(cancel:) forControlEvents:UIControlEventTouchUpInside]; 43 | 44 | downloadOperation.completionBlock = ^{ 45 | button.enabled = NO; 46 | }; 47 | 48 | 49 | UIProgressView* progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault]; 50 | progressView.progress = 0; 51 | progressView.frame = CGRectMake(0, 120, 320, 20); 52 | [self.window addSubview:progressView]; 53 | 54 | downloadOperation.progressCallback = ^(float progress) { 55 | progressView.progress = progress; 56 | }; 57 | 58 | return YES; 59 | } 60 | 61 | - (void)cancel:(id)sender { 62 | [downloadOperation cancel]; 63 | } 64 | 65 | @end -------------------------------------------------------------------------------- /URLLoader/DownloadOperation.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by chris on 6/17/13. 3 | // 4 | 5 | #import "DownloadOperation.h" 6 | 7 | 8 | @interface DownloadOperation () 9 | @property (nonatomic, strong) NSURL* url; 10 | @property (nonatomic, strong) NSURLConnection* connection; 11 | @property (nonatomic, strong) NSMutableData* buffer; 12 | @property (nonatomic) long long int expectedContentLength; 13 | @property (nonatomic, readwrite) NSError* error; 14 | @property (nonatomic) BOOL isExecuting; 15 | @property (nonatomic) BOOL isConcurrent; 16 | @property (nonatomic) BOOL isFinished; 17 | @end 18 | 19 | @implementation DownloadOperation 20 | { 21 | 22 | } 23 | - (id)initWithURL:(NSURL*)url 24 | { 25 | self = [super init]; 26 | if(self) { 27 | self.url = url; 28 | } 29 | return self; 30 | } 31 | 32 | - (void)start 33 | { 34 | NSURLRequest* request = [NSURLRequest requestWithURL:self.url]; 35 | self.isExecuting = YES; 36 | self.isConcurrent = YES; 37 | self.isFinished = NO; 38 | [[NSOperationQueue mainQueue] addOperationWithBlock:^ 39 | { 40 | self.connection = [NSURLConnection connectionWithRequest:request delegate:self]; 41 | }]; 42 | } 43 | 44 | #pragma mark NSURLConnectionDelegate 45 | 46 | 47 | 48 | 49 | - (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response { 50 | return request; 51 | } 52 | 53 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { 54 | self.expectedContentLength = response.expectedContentLength; 55 | self.buffer = [NSMutableData data]; 56 | } 57 | 58 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { 59 | [self.buffer appendData:data]; 60 | self.progressCallback(self.buffer.length / (float)self.expectedContentLength); 61 | } 62 | 63 | 64 | - (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse { 65 | return cachedResponse; 66 | } 67 | 68 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection { 69 | self.data = self.buffer; 70 | self.buffer = nil; 71 | self.isExecuting = NO; 72 | self.isFinished = YES; 73 | } 74 | 75 | - (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error 76 | { 77 | self.error = error; 78 | self.isExecuting = NO; 79 | self.isFinished = YES; 80 | } 81 | 82 | - (void)setIsExecuting:(BOOL)isExecuting 83 | { 84 | [self willChangeValueForKey:@"isExecuting"]; 85 | _isExecuting = isExecuting; 86 | [self didChangeValueForKey:@"isExecuting"]; 87 | } 88 | 89 | 90 | - (void)setIsFinished:(BOOL)isFinished 91 | { 92 | [self willChangeValueForKey:@"isFinished"]; 93 | _isFinished = isFinished; 94 | [self didChangeValueForKey:@"isFinished"]; 95 | } 96 | 97 | - (void)cancel 98 | { 99 | [super cancel]; 100 | [self.connection cancel]; 101 | self.isFinished = YES; 102 | self.isExecuting = NO; 103 | } 104 | 105 | @end -------------------------------------------------------------------------------- /URLLoader.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5A4160335CAB59FA8F6B8D1D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5A4167EBB14B80F57D90A5CF /* Default-568h@2x.png */; }; 11 | 5A41604DBE83F2A1357B6D9C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A416D10232F4FA03AF15F41 /* UIKit.framework */; }; 12 | 5A41639113F03BA98E69975B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 5A41628A4DA7A17606CB4CEB /* Default.png */; }; 13 | 5A4163A92CBB6BCB4F3344A8 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5A4168E810CD646B3B32B3E7 /* Default@2x.png */; }; 14 | 5A4164FAC67FDB00197EAEB2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A41616321FEEDE292F06854 /* CoreGraphics.framework */; }; 15 | 5A4166B408B5B850D64C48A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A41608C762061797093C533 /* main.m */; }; 16 | 5A41673513CE8CECFBF0B1D6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A4163454B47342B5D5252D2 /* AppDelegate.m */; }; 17 | 5A416787330C1748F18F62B6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A41600B05FEBF49CD148256 /* Foundation.framework */; }; 18 | 5A41683A48A7BA28DE803103 /* DownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A416B4CDAEC079D160DE319 /* DownloadOperation.m */; }; 19 | 5A416D528758D65B838C48C9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5A41604138A5C4CCD13E61F5 /* InfoPlist.strings */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 5A41600B05FEBF49CD148256 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 24 | 5A41605D8254A73E0CD65A31 /* URLLoader-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = "URLLoader-Info.plist"; sourceTree = ""; }; 25 | 5A41608C762061797093C533 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 26 | 5A41616321FEEDE292F06854 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 27 | 5A41628A4DA7A17606CB4CEB /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 28 | 5A4163454B47342B5D5252D2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 29 | 5A416356CCAED96E5B4B963F /* DownloadOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadOperation.h; sourceTree = ""; }; 30 | 5A41639B14DBD8CCA2FB293A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 31 | 5A416624A0A3EFA3B7897C2A /* URLLoader-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "URLLoader-Prefix.pch"; sourceTree = ""; }; 32 | 5A4167033E9A8379637670FD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 33 | 5A4167EBB14B80F57D90A5CF /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 34 | 5A4168E810CD646B3B32B3E7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 35 | 5A416B4CDAEC079D160DE319 /* DownloadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DownloadOperation.m; sourceTree = ""; }; 36 | 5A416D10232F4FA03AF15F41 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 37 | 5A416DF1F1374B8DB1BC5E1F /* URLLoader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = URLLoader.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | /* End PBXFileReference section */ 39 | 40 | /* Begin PBXFrameworksBuildPhase section */ 41 | 5A41694959EE62C9B24BEF24 /* Frameworks */ = { 42 | isa = PBXFrameworksBuildPhase; 43 | buildActionMask = 2147483647; 44 | files = ( 45 | 5A41604DBE83F2A1357B6D9C /* UIKit.framework in Frameworks */, 46 | 5A416787330C1748F18F62B6 /* Foundation.framework in Frameworks */, 47 | 5A4164FAC67FDB00197EAEB2 /* CoreGraphics.framework in Frameworks */, 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | 5A41600DE1888762267FEB4D = { 55 | isa = PBXGroup; 56 | children = ( 57 | 5A416B54DBF4A4FB59928817 /* Products */, 58 | 5A416EBC673D052DDBB527C4 /* Frameworks */, 59 | 5A416B5DD59F6A6D85F28226 /* URLLoader */, 60 | ); 61 | sourceTree = ""; 62 | }; 63 | 5A416B54DBF4A4FB59928817 /* Products */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | 5A416DF1F1374B8DB1BC5E1F /* URLLoader.app */, 67 | ); 68 | name = Products; 69 | sourceTree = ""; 70 | }; 71 | 5A416B5DD59F6A6D85F28226 /* URLLoader */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 5A416C022305BF1FE4B4A9DB /* Supporting Files */, 75 | 5A41639B14DBD8CCA2FB293A /* AppDelegate.h */, 76 | 5A4163454B47342B5D5252D2 /* AppDelegate.m */, 77 | 5A416B4CDAEC079D160DE319 /* DownloadOperation.m */, 78 | 5A416356CCAED96E5B4B963F /* DownloadOperation.h */, 79 | ); 80 | path = URLLoader; 81 | sourceTree = ""; 82 | }; 83 | 5A416C022305BF1FE4B4A9DB /* Supporting Files */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 5A41605D8254A73E0CD65A31 /* URLLoader-Info.plist */, 87 | 5A41604138A5C4CCD13E61F5 /* InfoPlist.strings */, 88 | 5A41608C762061797093C533 /* main.m */, 89 | 5A416624A0A3EFA3B7897C2A /* URLLoader-Prefix.pch */, 90 | 5A41628A4DA7A17606CB4CEB /* Default.png */, 91 | 5A4168E810CD646B3B32B3E7 /* Default@2x.png */, 92 | 5A4167EBB14B80F57D90A5CF /* Default-568h@2x.png */, 93 | ); 94 | name = "Supporting Files"; 95 | sourceTree = ""; 96 | }; 97 | 5A416EBC673D052DDBB527C4 /* Frameworks */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 5A416D10232F4FA03AF15F41 /* UIKit.framework */, 101 | 5A41600B05FEBF49CD148256 /* Foundation.framework */, 102 | 5A41616321FEEDE292F06854 /* CoreGraphics.framework */, 103 | ); 104 | name = Frameworks; 105 | sourceTree = ""; 106 | }; 107 | /* End PBXGroup section */ 108 | 109 | /* Begin PBXNativeTarget section */ 110 | 5A416C38128BF5A90C1E345E /* URLLoader */ = { 111 | isa = PBXNativeTarget; 112 | buildConfigurationList = 5A416FB480900B4A50DD9E12 /* Build configuration list for PBXNativeTarget "URLLoader" */; 113 | buildPhases = ( 114 | 5A4164263A1EB893A22199A4 /* Sources */, 115 | 5A41694959EE62C9B24BEF24 /* Frameworks */, 116 | 5A416DE7511B17978300A38E /* Resources */, 117 | ); 118 | buildRules = ( 119 | ); 120 | dependencies = ( 121 | ); 122 | name = URLLoader; 123 | productName = URLLoader; 124 | productReference = 5A416DF1F1374B8DB1BC5E1F /* URLLoader.app */; 125 | productType = "com.apple.product-type.application"; 126 | }; 127 | /* End PBXNativeTarget section */ 128 | 129 | /* Begin PBXProject section */ 130 | 5A416EFEDAD39B3685379ABD /* Project object */ = { 131 | isa = PBXProject; 132 | attributes = { 133 | ORGANIZATIONNAME = "___FULLUSERNAME___"; 134 | }; 135 | buildConfigurationList = 5A416F8D598D24FED196387E /* Build configuration list for PBXProject "URLLoader" */; 136 | compatibilityVersion = "Xcode 3.2"; 137 | developmentRegion = English; 138 | hasScannedForEncodings = 0; 139 | knownRegions = ( 140 | en, 141 | ); 142 | mainGroup = 5A41600DE1888762267FEB4D; 143 | productRefGroup = 5A416B54DBF4A4FB59928817 /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | 5A416C38128BF5A90C1E345E /* URLLoader */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | 5A416DE7511B17978300A38E /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | 5A416D528758D65B838C48C9 /* InfoPlist.strings in Resources */, 158 | 5A41639113F03BA98E69975B /* Default.png in Resources */, 159 | 5A4163A92CBB6BCB4F3344A8 /* Default@2x.png in Resources */, 160 | 5A4160335CAB59FA8F6B8D1D /* Default-568h@2x.png in Resources */, 161 | ); 162 | runOnlyForDeploymentPostprocessing = 0; 163 | }; 164 | /* End PBXResourcesBuildPhase section */ 165 | 166 | /* Begin PBXSourcesBuildPhase section */ 167 | 5A4164263A1EB893A22199A4 /* Sources */ = { 168 | isa = PBXSourcesBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 5A4166B408B5B850D64C48A4 /* main.m in Sources */, 172 | 5A41673513CE8CECFBF0B1D6 /* AppDelegate.m in Sources */, 173 | 5A41683A48A7BA28DE803103 /* DownloadOperation.m in Sources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXSourcesBuildPhase section */ 178 | 179 | /* Begin PBXVariantGroup section */ 180 | 5A41604138A5C4CCD13E61F5 /* InfoPlist.strings */ = { 181 | isa = PBXVariantGroup; 182 | children = ( 183 | 5A4167033E9A8379637670FD /* en */, 184 | ); 185 | name = InfoPlist.strings; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXVariantGroup section */ 189 | 190 | /* Begin XCBuildConfiguration section */ 191 | 5A416547139CA7CFA124ACFC /* Release */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 195 | GCC_PREFIX_HEADER = "URLLoader/URLLoader-Prefix.pch"; 196 | INFOPLIST_FILE = "URLLoader/URLLoader-Info.plist"; 197 | PRODUCT_NAME = "$(TARGET_NAME)"; 198 | WRAPPER_EXTENSION = app; 199 | }; 200 | name = Release; 201 | }; 202 | 5A4167F6D4973ABF83AB558E /* Debug */ = { 203 | isa = XCBuildConfiguration; 204 | buildSettings = { 205 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 206 | GCC_PREFIX_HEADER = "URLLoader/URLLoader-Prefix.pch"; 207 | INFOPLIST_FILE = "URLLoader/URLLoader-Info.plist"; 208 | PRODUCT_NAME = "$(TARGET_NAME)"; 209 | WRAPPER_EXTENSION = app; 210 | }; 211 | name = Debug; 212 | }; 213 | 5A416B5C9900D024771132EA /* Release */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 218 | CLANG_CXX_LIBRARY = "libc++"; 219 | CLANG_ENABLE_OBJC_ARC = YES; 220 | CLANG_WARN_CONSTANT_CONVERSION = YES; 221 | CLANG_WARN_EMPTY_BODY = YES; 222 | CLANG_WARN_ENUM_CONVERSION = YES; 223 | CLANG_WARN_INT_CONVERSION = YES; 224 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 225 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 226 | COPY_PHASE_STRIP = YES; 227 | GCC_C_LANGUAGE_STANDARD = gnu99; 228 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 229 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 230 | GCC_WARN_UNUSED_VARIABLE = YES; 231 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 232 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 233 | SDKROOT = iphoneos; 234 | VALIDATE_PRODUCT = YES; 235 | }; 236 | name = Release; 237 | }; 238 | 5A416BDE3659895E57B338EF /* Debug */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | ALWAYS_SEARCH_USER_PATHS = NO; 242 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 243 | CLANG_CXX_LIBRARY = "libc++"; 244 | CLANG_ENABLE_OBJC_ARC = YES; 245 | CLANG_WARN_CONSTANT_CONVERSION = YES; 246 | CLANG_WARN_EMPTY_BODY = YES; 247 | CLANG_WARN_ENUM_CONVERSION = YES; 248 | CLANG_WARN_INT_CONVERSION = YES; 249 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 250 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 251 | COPY_PHASE_STRIP = NO; 252 | GCC_C_LANGUAGE_STANDARD = gnu99; 253 | GCC_DYNAMIC_NO_PIC = NO; 254 | GCC_OPTIMIZATION_LEVEL = 0; 255 | GCC_PREPROCESSOR_DEFINITIONS = ( 256 | "DEBUG=1", 257 | "$(inherited)", 258 | ); 259 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 260 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 261 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 262 | GCC_WARN_UNUSED_VARIABLE = YES; 263 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 264 | ONLY_ACTIVE_ARCH = YES; 265 | SDKROOT = iphoneos; 266 | }; 267 | name = Debug; 268 | }; 269 | /* End XCBuildConfiguration section */ 270 | 271 | /* Begin XCConfigurationList section */ 272 | 5A416F8D598D24FED196387E /* Build configuration list for PBXProject "URLLoader" */ = { 273 | isa = XCConfigurationList; 274 | buildConfigurations = ( 275 | 5A416B5C9900D024771132EA /* Release */, 276 | 5A416BDE3659895E57B338EF /* Debug */, 277 | ); 278 | defaultConfigurationIsVisible = 0; 279 | defaultConfigurationName = Release; 280 | }; 281 | 5A416FB480900B4A50DD9E12 /* Build configuration list for PBXNativeTarget "URLLoader" */ = { 282 | isa = XCConfigurationList; 283 | buildConfigurations = ( 284 | 5A416547139CA7CFA124ACFC /* Release */, 285 | 5A4167F6D4973ABF83AB558E /* Debug */, 286 | ); 287 | defaultConfigurationIsVisible = 0; 288 | }; 289 | /* End XCConfigurationList section */ 290 | }; 291 | rootObject = 5A416EFEDAD39B3685379ABD /* Project object */; 292 | } 293 | --------------------------------------------------------------------------------