Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit (non persistent)

  • Loading branch information...
commit ff11655d88247c8736198cc6c0f911fa3d07b306 0 parents
@thisandagain authored
12 .gitignore
@@ -0,0 +1,12 @@
+.DS_Store
+*.swp
+*~.nib
+
+build/
+
+.xcodeproj/
+!*.xcodeproj/project.pbxproj
+*.mode1v3
+*.mode2v3
+
+xcuserdata
56 EDQueue.h
@@ -0,0 +1,56 @@
+//
+// EDQueue.h
+// queue
+//
+// Created by Andrew Sliwinski on 6/29/12.
+// Copyright (c) 2012 DIY, Co. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+//
+
+#define DEFINE_SHARED_INSTANCE_USING_BLOCK(block) \
+static dispatch_once_t pred = 0; \
+__strong static id _sharedObject = nil; \
+dispatch_once(&pred, ^{ \
+_sharedObject = block(); \
+}); \
+return _sharedObject; \
+
+typedef enum {
+ kEDQueueResultSuccess,
+ kEDQueueResultFail,
+ kEDQueueResultCritical
+} EDQueueResult;
+
+//
+
+@class EDQueue;
+
+@protocol EDQueueDelegate <NSObject>
+@required
+- (EDQueueResult)queue:(EDQueue *)queue processJob:(NSDictionary *)job;
+@end
+
+//
+
+@interface EDQueue : NSObject
+{
+ @private NSMutableArray *queue;
+ @private NSTimer *timer;
+ @private NSUInteger active;
+}
+
+@property (nonatomic, assign) id<EDQueueDelegate> delegate;
+@property (nonatomic, assign) NSUInteger concurrencyLimit;
+@property (nonatomic, assign) CGFloat statusInterval;
+@property (nonatomic, assign) BOOL retryFailureImmediately;
+@property (nonatomic, assign) NSUInteger retryLimit;
+
++ (EDQueue *)sharedInstance;
+- (void)enqueueWithData:(id)data forTask:(NSString *)task;
+- (void)start;
+- (void)stop;
+
+@end
161 EDQueue.m
@@ -0,0 +1,161 @@
+//
+// EDQueue.m
+// queue
+//
+// Created by Andrew Sliwinski on 6/29/12.
+// Copyright (c) 2012 DIY, Co. All rights reserved.
+//
+
+#import "EDQueue.h"
+
+//
+
+@interface EDQueue ()
+@property (nonatomic, retain) NSMutableArray *queue;
+@property (nonatomic, retain) NSTimer *timer;
+@property (nonatomic, assign) NSUInteger active;
+@end
+
+//
+
+@implementation EDQueue
+
+@synthesize delegate = _delegate;
+@synthesize concurrencyLimit = _concurrencyLimit;
+@synthesize statusInterval = _statusInterval;
+@synthesize retryFailureImmediately = _retryFailureImmediately;
+@synthesize retryLimit = _retryLimit;
+@synthesize queue = _queue;
+@synthesize timer = _timer;
+@synthesize active = _active;
+
+#pragma mark - Init
+
++ (EDQueue *)sharedInstance
+{
+ DEFINE_SHARED_INSTANCE_USING_BLOCK(^{
+ return [[self alloc] init];
+ });
+}
+
+- (id)init
+{
+ self = [super init];
+ if (self)
+ {
+ _concurrencyLimit = 2;
+ _statusInterval = 0.03f;
+ _retryFailureImmediately = true;
+ _retryLimit = 4;
+
+ _queue = [[NSMutableArray alloc] init];
+ _timer = [[NSTimer alloc] init];
+ _active = 0;
+ }
+ return self;
+}
+
+#pragma mark - Public methods
+
+/**
+ * Adds a new job to the queue.
+ *
+ * @param {id} Data
+ * @param {NSString} Task label
+ *
+ * @return {void}
+ */
+- (void)enqueueWithData:(id)data forTask:(NSString *)task
+{
+ [self.queue addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:0], @"attempt",
+ task, @"task",
+ data, @"data",
+ nil]];
+}
+
+/**
+ * Starts the queue.
+ *
+ * @return {void}
+ */
+- (void)start
+{
+ self.timer = [NSTimer scheduledTimerWithTimeInterval:self.statusInterval target:self selector:@selector(tick) userInfo:nil repeats:true];
+}
+
+/**
+ * Stops the queue.
+ *
+ * @return {void}
+ */
+- (void)stop
+{
+ [self.timer invalidate];
+ self.timer = nil;
+}
+
+#pragma mark - Status loop
+
+- (void)tick
+{
+ dispatch_queue_t gcd = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0);
+ dispatch_async(gcd, ^{
+
+ if ([self.queue count] != 0 && active < self.concurrencyLimit) {
+ // Fetch job
+ id job = [self.queue objectAtIndex:0];
+ if (job != nil) {
+ [[job retain] autorelease];
+ [self.queue removeObjectAtIndex:0];
+ active++;
+ }
+
+ // Pass job to delegate
+ EDQueueResult result = [self.delegate queue:self processJob:job];
+ active--;
+
+ // Check result
+ switch (result) {
+ case kEDQueueResultSuccess:
+ NSLog(@"Win!!!!");
+ break;
+ case kEDQueueResultFail:
+ NSLog(@"FAIL!!!");
+ NSUInteger currentAttempt = [[job objectForKey:@"attempt"] intValue] + 1;
+ if (currentAttempt < self.retryLimit)
+ {
+ [job setValue:[NSNumber numberWithInt:currentAttempt] forKey:@"attempt"];
+ (self.retryFailureImmediately) ? [self.queue insertObject:job atIndex:0] : [self.queue addObject:job];
+ }
+ break;
+ case kEDQueueResultCritical:
+ [self errorWithMessage:@"Critical error. Stopping queue..."];
+ [self stop];
+ break;
+ }
+ }
+
+ });
+}
+
+#pragma mark - Private methods
+
+- (void)errorWithMessage:(NSString *)message
+{
+ NSLog(@"EDQueue Error: %@", message);
+}
+
+#pragma mark - Dealloc
+
+- (void)dealloc
+{
+ self.delegate = nil;
+
+ [_queue release]; _queue = nil;
+ [_timer release]; _timer = nil;
+
+ [super dealloc];
+}
+
+@end
19 LICENSE.md
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Andrew Sliwinski
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
296 example/queue.xcodeproj/project.pbxproj
@@ -0,0 +1,296 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ C395D50D159E56760041510C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C395D50C159E56760041510C /* UIKit.framework */; };
+ C395D50F159E56760041510C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C395D50E159E56760041510C /* Foundation.framework */; };
+ C395D511159E56760041510C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C395D510159E56760041510C /* CoreGraphics.framework */; };
+ C395D517159E56760041510C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C395D515159E56760041510C /* InfoPlist.strings */; };
+ C395D519159E56760041510C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C395D518159E56760041510C /* main.m */; };
+ C395D51D159E56760041510C /* EDAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C395D51C159E56760041510C /* EDAppDelegate.m */; };
+ C395D520159E56760041510C /* EDViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C395D51F159E56760041510C /* EDViewController.m */; };
+ C395D523159E56760041510C /* EDViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C395D521159E56760041510C /* EDViewController.xib */; };
+ C395D52F159E57520041510C /* LICENSE.md in Resources */ = {isa = PBXBuildFile; fileRef = C395D52D159E57520041510C /* LICENSE.md */; };
+ C395D530159E57520041510C /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = C395D52E159E57520041510C /* README.md */; };
+ C395D534159E57880041510C /* EDQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = C395D533159E57880041510C /* EDQueue.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ C395D508159E56760041510C /* queue.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = queue.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ C395D50C159E56760041510C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ C395D50E159E56760041510C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ C395D510159E56760041510C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ C395D514159E56760041510C /* queue-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "queue-Info.plist"; sourceTree = "<group>"; };
+ C395D516159E56760041510C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ C395D518159E56760041510C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ C395D51A159E56760041510C /* queue-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "queue-Prefix.pch"; sourceTree = "<group>"; };
+ C395D51B159E56760041510C /* EDAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EDAppDelegate.h; sourceTree = "<group>"; };
+ C395D51C159E56760041510C /* EDAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EDAppDelegate.m; sourceTree = "<group>"; };
+ C395D51E159E56760041510C /* EDViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EDViewController.h; sourceTree = "<group>"; };
+ C395D51F159E56760041510C /* EDViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EDViewController.m; sourceTree = "<group>"; };
+ C395D522159E56760041510C /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/EDViewController.xib; sourceTree = "<group>"; };
+ C395D52D159E57520041510C /* LICENSE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.md; path = ../LICENSE.md; sourceTree = "<group>"; };
+ C395D52E159E57520041510C /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
+ C395D532159E57880041510C /* EDQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EDQueue.h; path = ../EDQueue.h; sourceTree = "<group>"; };
+ C395D533159E57880041510C /* EDQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EDQueue.m; path = ../EDQueue.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ C395D505159E56760041510C /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C395D50D159E56760041510C /* UIKit.framework in Frameworks */,
+ C395D50F159E56760041510C /* Foundation.framework in Frameworks */,
+ C395D511159E56760041510C /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ C395D4FD159E56760041510C = {
+ isa = PBXGroup;
+ children = (
+ C395D532159E57880041510C /* EDQueue.h */,
+ C395D533159E57880041510C /* EDQueue.m */,
+ C395D52D159E57520041510C /* LICENSE.md */,
+ C395D52E159E57520041510C /* README.md */,
+ C395D512159E56760041510C /* queue */,
+ C395D50B159E56760041510C /* Frameworks */,
+ C395D509159E56760041510C /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ C395D509159E56760041510C /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ C395D508159E56760041510C /* queue.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ C395D50B159E56760041510C /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ C395D50C159E56760041510C /* UIKit.framework */,
+ C395D50E159E56760041510C /* Foundation.framework */,
+ C395D510159E56760041510C /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ C395D512159E56760041510C /* queue */ = {
+ isa = PBXGroup;
+ children = (
+ C395D51B159E56760041510C /* EDAppDelegate.h */,
+ C395D51C159E56760041510C /* EDAppDelegate.m */,
+ C395D51E159E56760041510C /* EDViewController.h */,
+ C395D51F159E56760041510C /* EDViewController.m */,
+ C395D521159E56760041510C /* EDViewController.xib */,
+ C395D513159E56760041510C /* Supporting Files */,
+ );
+ path = queue;
+ sourceTree = "<group>";
+ };
+ C395D513159E56760041510C /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ C395D514159E56760041510C /* queue-Info.plist */,
+ C395D515159E56760041510C /* InfoPlist.strings */,
+ C395D518159E56760041510C /* main.m */,
+ C395D51A159E56760041510C /* queue-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ C395D507159E56760041510C /* queue */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C395D526159E56760041510C /* Build configuration list for PBXNativeTarget "queue" */;
+ buildPhases = (
+ C395D504159E56760041510C /* Sources */,
+ C395D505159E56760041510C /* Frameworks */,
+ C395D506159E56760041510C /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = queue;
+ productName = queue;
+ productReference = C395D508159E56760041510C /* queue.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ C395D4FF159E56760041510C /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ CLASSPREFIX = ED;
+ LastUpgradeCheck = 0430;
+ ORGANIZATIONNAME = "DIY, Co.";
+ };
+ buildConfigurationList = C395D502159E56760041510C /* Build configuration list for PBXProject "queue" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = C395D4FD159E56760041510C;
+ productRefGroup = C395D509159E56760041510C /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ C395D507159E56760041510C /* queue */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ C395D506159E56760041510C /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C395D517159E56760041510C /* InfoPlist.strings in Resources */,
+ C395D523159E56760041510C /* EDViewController.xib in Resources */,
+ C395D52F159E57520041510C /* LICENSE.md in Resources */,
+ C395D530159E57520041510C /* README.md in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ C395D504159E56760041510C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C395D519159E56760041510C /* main.m in Sources */,
+ C395D51D159E56760041510C /* EDAppDelegate.m in Sources */,
+ C395D520159E56760041510C /* EDViewController.m in Sources */,
+ C395D534159E57880041510C /* EDQueue.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ C395D515159E56760041510C /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ C395D516159E56760041510C /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ C395D521159E56760041510C /* EDViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ C395D522159E56760041510C /* en */,
+ );
+ name = EDViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C395D524159E56760041510C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ C395D525159E56760041510C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ C395D527159E56760041510C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "queue/queue-Prefix.pch";
+ INFOPLIST_FILE = "queue/queue-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ C395D528159E56760041510C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "queue/queue-Prefix.pch";
+ INFOPLIST_FILE = "queue/queue-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C395D502159E56760041510C /* Build configuration list for PBXProject "queue" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C395D524159E56760041510C /* Debug */,
+ C395D525159E56760041510C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C395D526159E56760041510C /* Build configuration list for PBXNativeTarget "queue" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C395D527159E56760041510C /* Debug */,
+ C395D528159E56760041510C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = C395D4FF159E56760041510C /* Project object */;
+}
7 example/queue.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:queue.xcodeproj">
+ </FileRef>
+</Workspace>
19 example/queue/EDAppDelegate.h
@@ -0,0 +1,19 @@
+//
+// EDAppDelegate.h
+// queue
+//
+// Created by Andrew Sliwinski on 6/29/12.
+// Copyright (c) 2012 DIY, Co. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "EDQueue.h"
+
+@class EDViewController;
+
+@interface EDAppDelegate : UIResponder <UIApplicationDelegate, EDQueueDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+@property (strong, nonatomic) EDViewController *viewController;
+
+@end
80 example/queue/EDAppDelegate.m
@@ -0,0 +1,80 @@
+//
+// EDAppDelegate.m
+// queue
+//
+// Created by Andrew Sliwinski on 6/29/12.
+// Copyright (c) 2012 DIY, Co. All rights reserved.
+//
+
+#import "EDAppDelegate.h"
+#import "EDViewController.h"
+
+@implementation EDAppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (void)dealloc
+{
+ [_window release];
+ [_viewController release];
+ [super dealloc];
+}
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
+
+ //
+
+ [[EDQueue sharedInstance] setDelegate:self];
+ [[EDQueue sharedInstance] start];
+
+ //
+
+ self.viewController = [[[EDViewController alloc] initWithNibName:@"EDViewController" bundle:nil] autorelease];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (EDQueueResult)queue:(EDQueue *)queue processJob:(NSDictionary *)job
+{
+ sleep(1);
+
+ if ([[job objectForKey:@"task"] isEqualToString:@"success"]) {
+ return kEDQueueResultSuccess;
+ } else if ([[job objectForKey:@"task"] isEqualToString:@"fail"]) {
+ return kEDQueueResultFail;
+ }
+
+ return kEDQueueResultCritical;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ [[EDQueue sharedInstance] stop];
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
20 example/queue/EDViewController.h
@@ -0,0 +1,20 @@
+//
+// EDViewController.h
+// queue
+//
+// Created by Andrew Sliwinski on 6/29/12.
+// Copyright (c) 2012 DIY, Co. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "EDQueue.h"
+
+@interface EDViewController : UIViewController
+
+@property (nonatomic, retain) IBOutlet UITextView *activity;
+
+- (IBAction)addSuccess:(id)sender;
+- (IBAction)addFail:(id)sender;
+- (IBAction)addCritical:(id)sender;
+
+@end
63 example/queue/EDViewController.m
@@ -0,0 +1,63 @@
+//
+// EDViewController.m
+// queue
+//
+// Created by Andrew Sliwinski on 6/29/12.
+// Copyright (c) 2012 DIY, Co. All rights reserved.
+//
+
+#import "EDViewController.h"
+
+#pragma mark - View lifecycle
+
+@implementation EDViewController
+
+@synthesize activity = _activity;
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+#pragma mark - UI events
+
+- (IBAction)addSuccess:(id)sender
+{
+ [[EDQueue sharedInstance] enqueueWithData:nil forTask:@"success"];
+}
+
+- (IBAction)addFail:(id)sender
+{
+ [[EDQueue sharedInstance] enqueueWithData:nil forTask:@"fail"];
+}
+
+- (IBAction)addCritical:(id)sender
+{
+ [[EDQueue sharedInstance] enqueueWithData:nil forTask:@"critical"];
+}
+
+#pragma mark - Dealloc
+
+- (void)releaseObjects
+{
+ [_activity release]; _activity = nil;
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ [self releaseObjects];
+}
+
+- (void)dealloc
+{
+ [self releaseObjects];
+ [super dealloc];
+}
+
+@end
374 example/queue/en.lproj/EDViewController.xib
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1296</int>
+ <string key="IBDocument.SystemVersion">11E53</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2182</string>
+ <string key="IBDocument.AppKitVersion">1138.47</string>
+ <string key="IBDocument.HIToolboxVersion">569.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">1181</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBUITextView</string>
+ <string>IBUIButton</string>
+ <string>IBUIView</string>
+ <string>IBUILabel</string>
+ <string>IBProxyObject</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUIButton" id="837823674">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 403}, {280, 37}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Add A Critically Bad Job</string>
+ <object class="NSColor" key="IBUIHighlightedTitleColor" id="91199612">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor" id="31346749">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="201781484">
+ <int key="type">2</int>
+ <double key="pointSize">15</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="917399616">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">15</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ <object class="IBUIButton" id="441872781">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 358}, {280, 37}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="837823674"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Add A Bad Job</string>
+ <reference key="IBUIHighlightedTitleColor" ref="91199612"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="31346749"/>
+ <reference key="IBUIFontDescription" ref="201781484"/>
+ <reference key="IBUIFont" ref="917399616"/>
+ </object>
+ <object class="IBUIButton" id="306207189">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 313}, {280, 37}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="441872781"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Add A Good Job</string>
+ <reference key="IBUIHighlightedTitleColor" ref="91199612"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="31346749"/>
+ <reference key="IBUIFontDescription" ref="201781484"/>
+ <reference key="IBUIFont" ref="917399616"/>
+ </object>
+ <object class="IBUILabel" id="393011309">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 20}, {61, 21}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="616045410"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Activity:</string>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">0</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">1</int>
+ <double key="pointSize">17</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">17</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ <object class="IBUITextView" id="616045410">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 49}, {280, 240}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="306207189"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText"/>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocapitalizationType">2</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">1</int>
+ <double key="pointSize">14</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">14</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="393011309"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">activity</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="616045410"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">addCritical:</string>
+ <reference key="source" ref="837823674"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">20</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">addFail:</string>
+ <reference key="source" ref="441872781"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">19</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">addSuccess:</string>
+ <reference key="source" ref="306207189"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">18</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="393011309"/>
+ <reference ref="837823674"/>
+ <reference ref="616045410"/>
+ <reference ref="441872781"/>
+ <reference ref="306207189"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="837823674"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">9</int>
+ <reference key="object" ref="393011309"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="616045410"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">14</int>
+ <reference key="object" ref="441872781"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">16</int>
+ <reference key="object" ref="306207189"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">EDViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">20</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">EDViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <dictionary class="NSMutableDictionary" key="actions">
+ <string key="addCritical:">id</string>
+ <string key="addFail:">id</string>
+ <string key="addSuccess:">id</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="actionInfosByName">
+ <object class="IBActionInfo" key="addCritical:">
+ <string key="name">addCritical:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="addFail:">
+ <string key="name">addFail:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="addSuccess:">
+ <string key="name">addSuccess:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </dictionary>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">activity</string>
+ <string key="NS.object.0">UITextView</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">activity</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">activity</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/EDViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <real value="1296" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">1181</string>
+ </data>
+</archive>
2  example/queue/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
18 example/queue/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// queue
+//
+// Created by Andrew Sliwinski on 6/29/12.
+// Copyright (c) 2012 DIY, Co. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "EDAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([EDAppDelegate class]));
+ }
+}
36 example/queue/queue-Info.plist
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.diy.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ </array>
+</dict>
+</plist>
14 example/queue/queue-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'queue' target in the 'queue' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_4_0
+#warning "This project uses features only available in iOS SDK 4.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
Please sign in to comment.
Something went wrong with that request. Please try again.