From 7b2b3bc71263e40b773ab32b2af8901c1d8ac786 Mon Sep 17 00:00:00 2001 From: Eddie Ehlin Date: Mon, 31 Dec 2012 02:31:27 +0100 Subject: Added new xcode project for iBean (with core data). InstaBean functionality is now completed. --- iBean/iBean.xcodeproj/project.pbxproj | 342 +++++++++++++++++++++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 20667 bytes .../eddiex.xcuserdatad/xcschemes/iBean.xcscheme | 86 ++++++ .../xcschemes/xcschememanagement.plist | 22 ++ iBean/iBean/.DS_Store | Bin 0 -> 6148 bytes iBean/iBean/AppDelegate+Storage.h | 32 ++ iBean/iBean/AppDelegate+Storage.m | 56 ++++ iBean/iBean/AppDelegate.h | 22 ++ iBean/iBean/AppDelegate.m | 152 +++++++++ iBean/iBean/Default-568h@2x.png | Bin 0 -> 18594 bytes iBean/iBean/Default.png | Bin 0 -> 6540 bytes iBean/iBean/Default@2x.png | Bin 0 -> 16107 bytes iBean/iBean/InstaBeanConfiguration.h | 17 + iBean/iBean/InstaBeanConfiguration.m | 16 + iBean/iBean/InstaBeanViewController.h | 34 ++ iBean/iBean/InstaBeanViewController.m | 141 +++++++++ iBean/iBean/en.lproj/InfoPlist.strings | 2 + iBean/iBean/iBean-Info.plist | 47 +++ iBean/iBean/iBean-Prefix.pch | 15 + iBean/iBean/iBean.xcdatamodeld/.xccurrentversion | 8 + .../iBean.xcdatamodeld/iBean.xcdatamodel/contents | 9 + iBean/iBean/iPhoneStoryboard.storyboard | 169 ++++++++++ iBean/iBean/main.m | 18 ++ 24 files changed, 1195 insertions(+) create mode 100644 iBean/iBean.xcodeproj/project.pbxproj create mode 100644 iBean/iBean.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/iBean.xcscheme create mode 100644 iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 iBean/iBean/.DS_Store create mode 100644 iBean/iBean/AppDelegate+Storage.h create mode 100644 iBean/iBean/AppDelegate+Storage.m create mode 100644 iBean/iBean/AppDelegate.h create mode 100644 iBean/iBean/AppDelegate.m create mode 100644 iBean/iBean/Default-568h@2x.png create mode 100644 iBean/iBean/Default.png create mode 100644 iBean/iBean/Default@2x.png create mode 100644 iBean/iBean/InstaBeanConfiguration.h create mode 100644 iBean/iBean/InstaBeanConfiguration.m create mode 100644 iBean/iBean/InstaBeanViewController.h create mode 100644 iBean/iBean/InstaBeanViewController.m create mode 100644 iBean/iBean/en.lproj/InfoPlist.strings create mode 100644 iBean/iBean/iBean-Info.plist create mode 100644 iBean/iBean/iBean-Prefix.pch create mode 100644 iBean/iBean/iBean.xcdatamodeld/.xccurrentversion create mode 100644 iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents create mode 100644 iBean/iBean/iPhoneStoryboard.storyboard create mode 100644 iBean/iBean/main.m (limited to 'iBean') diff --git a/iBean/iBean.xcodeproj/project.pbxproj b/iBean/iBean.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b66ea7d --- /dev/null +++ b/iBean/iBean.xcodeproj/project.pbxproj @@ -0,0 +1,342 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 020C55981691014E00D8224C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 020C55971691014E00D8224C /* UIKit.framework */; }; + 020C559A1691014E00D8224C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 020C55991691014E00D8224C /* Foundation.framework */; }; + 020C559C1691014E00D8224C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 020C559B1691014E00D8224C /* CoreGraphics.framework */; }; + 020C559E1691014E00D8224C /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 020C559D1691014E00D8224C /* CoreData.framework */; }; + 020C55A41691014E00D8224C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 020C55A21691014E00D8224C /* InfoPlist.strings */; }; + 020C55A61691014E00D8224C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55A51691014E00D8224C /* main.m */; }; + 020C55AA1691014E00D8224C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55A91691014E00D8224C /* AppDelegate.m */; }; + 020C55AC1691014E00D8224C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 020C55AB1691014E00D8224C /* Default.png */; }; + 020C55AE1691014E00D8224C /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 020C55AD1691014E00D8224C /* Default@2x.png */; }; + 020C55B01691014E00D8224C /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 020C55AF1691014E00D8224C /* Default-568h@2x.png */; }; + 020C55B31691014E00D8224C /* iBean.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 020C55B11691014E00D8224C /* iBean.xcdatamodeld */; }; + 020C55BD169101FB00D8224C /* iPhoneStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 020C55BC169101FB00D8224C /* iPhoneStoryboard.storyboard */; }; + 020C55C41691059800D8224C /* InstaBeanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55C31691059800D8224C /* InstaBeanViewController.m */; }; + 020C55C716910EAD00D8224C /* InstaBeanConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55C616910EAD00D8224C /* InstaBeanConfiguration.m */; }; + 020C55CA1691100000D8224C /* AppDelegate+Storage.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55C91691100000D8224C /* AppDelegate+Storage.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 020C55931691014E00D8224C /* iBean.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iBean.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 020C55971691014E00D8224C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 020C55991691014E00D8224C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 020C559B1691014E00D8224C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 020C559D1691014E00D8224C /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 020C55A11691014E00D8224C /* iBean-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iBean-Info.plist"; sourceTree = ""; }; + 020C55A31691014E00D8224C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 020C55A51691014E00D8224C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 020C55A71691014E00D8224C /* iBean-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iBean-Prefix.pch"; sourceTree = ""; }; + 020C55A81691014E00D8224C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 020C55A91691014E00D8224C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 020C55AB1691014E00D8224C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 020C55AD1691014E00D8224C /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 020C55AF1691014E00D8224C /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 020C55B21691014E00D8224C /* iBean.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = iBean.xcdatamodel; sourceTree = ""; }; + 020C55BC169101FB00D8224C /* iPhoneStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = iPhoneStoryboard.storyboard; sourceTree = ""; }; + 020C55C21691059800D8224C /* InstaBeanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstaBeanViewController.h; sourceTree = ""; }; + 020C55C31691059800D8224C /* InstaBeanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaBeanViewController.m; sourceTree = ""; }; + 020C55C516910EAD00D8224C /* InstaBeanConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstaBeanConfiguration.h; sourceTree = ""; }; + 020C55C616910EAD00D8224C /* InstaBeanConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaBeanConfiguration.m; sourceTree = ""; }; + 020C55C81691100000D8224C /* AppDelegate+Storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+Storage.h"; sourceTree = ""; }; + 020C55C91691100000D8224C /* AppDelegate+Storage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+Storage.m"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 020C55901691014E00D8224C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 020C55981691014E00D8224C /* UIKit.framework in Frameworks */, + 020C559A1691014E00D8224C /* Foundation.framework in Frameworks */, + 020C559C1691014E00D8224C /* CoreGraphics.framework in Frameworks */, + 020C559E1691014E00D8224C /* CoreData.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 020C55881691014E00D8224C = { + isa = PBXGroup; + children = ( + 020C559F1691014E00D8224C /* iBean */, + 020C55961691014E00D8224C /* Frameworks */, + 020C55941691014E00D8224C /* Products */, + ); + sourceTree = ""; + }; + 020C55941691014E00D8224C /* Products */ = { + isa = PBXGroup; + children = ( + 020C55931691014E00D8224C /* iBean.app */, + ); + name = Products; + sourceTree = ""; + }; + 020C55961691014E00D8224C /* Frameworks */ = { + isa = PBXGroup; + children = ( + 020C55971691014E00D8224C /* UIKit.framework */, + 020C55991691014E00D8224C /* Foundation.framework */, + 020C559B1691014E00D8224C /* CoreGraphics.framework */, + 020C559D1691014E00D8224C /* CoreData.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 020C559F1691014E00D8224C /* iBean */ = { + isa = PBXGroup; + children = ( + 020C55BB169101CE00D8224C /* Storyboards */, + 020C55B9169101A300D8224C /* InstaBean */, + 020C55A81691014E00D8224C /* AppDelegate.h */, + 020C55A91691014E00D8224C /* AppDelegate.m */, + 020C55B11691014E00D8224C /* iBean.xcdatamodeld */, + 020C55A01691014E00D8224C /* Supporting Files */, + 020C55C81691100000D8224C /* AppDelegate+Storage.h */, + 020C55C91691100000D8224C /* AppDelegate+Storage.m */, + ); + path = iBean; + sourceTree = ""; + }; + 020C55A01691014E00D8224C /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 020C55A11691014E00D8224C /* iBean-Info.plist */, + 020C55A21691014E00D8224C /* InfoPlist.strings */, + 020C55A51691014E00D8224C /* main.m */, + 020C55A71691014E00D8224C /* iBean-Prefix.pch */, + 020C55AB1691014E00D8224C /* Default.png */, + 020C55AD1691014E00D8224C /* Default@2x.png */, + 020C55AF1691014E00D8224C /* Default-568h@2x.png */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 020C55B9169101A300D8224C /* InstaBean */ = { + isa = PBXGroup; + children = ( + 020C55C516910EAD00D8224C /* InstaBeanConfiguration.h */, + 020C55C616910EAD00D8224C /* InstaBeanConfiguration.m */, + 020C55C21691059800D8224C /* InstaBeanViewController.h */, + 020C55C31691059800D8224C /* InstaBeanViewController.m */, + ); + name = InstaBean; + sourceTree = ""; + }; + 020C55BB169101CE00D8224C /* Storyboards */ = { + isa = PBXGroup; + children = ( + 020C55BC169101FB00D8224C /* iPhoneStoryboard.storyboard */, + ); + name = Storyboards; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 020C55921691014E00D8224C /* iBean */ = { + isa = PBXNativeTarget; + buildConfigurationList = 020C55B61691014E00D8224C /* Build configuration list for PBXNativeTarget "iBean" */; + buildPhases = ( + 020C558F1691014E00D8224C /* Sources */, + 020C55901691014E00D8224C /* Frameworks */, + 020C55911691014E00D8224C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iBean; + productName = iBean; + productReference = 020C55931691014E00D8224C /* iBean.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 020C558A1691014E00D8224C /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0450; + ORGANIZATIONNAME = "Eddie Ehlin"; + }; + buildConfigurationList = 020C558D1691014E00D8224C /* Build configuration list for PBXProject "iBean" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 020C55881691014E00D8224C; + productRefGroup = 020C55941691014E00D8224C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 020C55921691014E00D8224C /* iBean */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 020C55911691014E00D8224C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 020C55A41691014E00D8224C /* InfoPlist.strings in Resources */, + 020C55AC1691014E00D8224C /* Default.png in Resources */, + 020C55AE1691014E00D8224C /* Default@2x.png in Resources */, + 020C55B01691014E00D8224C /* Default-568h@2x.png in Resources */, + 020C55BD169101FB00D8224C /* iPhoneStoryboard.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 020C558F1691014E00D8224C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 020C55A61691014E00D8224C /* main.m in Sources */, + 020C55AA1691014E00D8224C /* AppDelegate.m in Sources */, + 020C55B31691014E00D8224C /* iBean.xcdatamodeld in Sources */, + 020C55C41691059800D8224C /* InstaBeanViewController.m in Sources */, + 020C55C716910EAD00D8224C /* InstaBeanConfiguration.m in Sources */, + 020C55CA1691100000D8224C /* AppDelegate+Storage.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 020C55A21691014E00D8224C /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 020C55A31691014E00D8224C /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 020C55B41691014E00D8224C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "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_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 020C55B51691014E00D8224C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 020C55B71691014E00D8224C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "iBean/iBean-Prefix.pch"; + INFOPLIST_FILE = "iBean/iBean-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 020C55B81691014E00D8224C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "iBean/iBean-Prefix.pch"; + INFOPLIST_FILE = "iBean/iBean-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 020C558D1691014E00D8224C /* Build configuration list for PBXProject "iBean" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 020C55B41691014E00D8224C /* Debug */, + 020C55B51691014E00D8224C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 020C55B61691014E00D8224C /* Build configuration list for PBXNativeTarget "iBean" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 020C55B71691014E00D8224C /* Debug */, + 020C55B81691014E00D8224C /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 020C55B11691014E00D8224C /* iBean.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 020C55B21691014E00D8224C /* iBean.xcdatamodel */, + ); + currentVersion = 020C55B21691014E00D8224C /* iBean.xcdatamodel */; + path = iBean.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 020C558A1691014E00D8224C /* Project object */; +} diff --git a/iBean/iBean.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/iBean/iBean.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..d40ad90 --- /dev/null +++ b/iBean/iBean.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..557fc2b Binary files /dev/null and b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/iBean.xcscheme b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/iBean.xcscheme new file mode 100644 index 0000000..af7d4c1 --- /dev/null +++ b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/iBean.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/xcschememanagement.plist b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..3bbacda --- /dev/null +++ b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + iBean.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 020C55921691014E00D8224C + + primary + + + + + diff --git a/iBean/iBean/.DS_Store b/iBean/iBean/.DS_Store new file mode 100644 index 0000000..3be0f60 Binary files /dev/null and b/iBean/iBean/.DS_Store differ diff --git a/iBean/iBean/AppDelegate+Storage.h b/iBean/iBean/AppDelegate+Storage.h new file mode 100644 index 0000000..3fa5acd --- /dev/null +++ b/iBean/iBean/AppDelegate+Storage.h @@ -0,0 +1,32 @@ +// +// AppDelegate+Storage.h +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import "AppDelegate.h" +@class InstaBeanConfiguration; + +/* + Main purpose of this category is to have all storage (core data) related + methods etc. in one area. Just to keep it clean. + */ + +@interface AppDelegate (Storage) + +#pragma mark - Common storage related methods +- (NSError*) save; + +#pragma mark - InstaBean related storage methods +- (InstaBeanConfiguration*) getInstaBeanConfiguration; + + +#pragma mark - iBean related storage methods + + + + +//warning TODO: Create methods for fetching managedContext (if needed?) as well methods for saving/deleting/fetching core data objects. +@end diff --git a/iBean/iBean/AppDelegate+Storage.m b/iBean/iBean/AppDelegate+Storage.m new file mode 100644 index 0000000..0fb5fac --- /dev/null +++ b/iBean/iBean/AppDelegate+Storage.m @@ -0,0 +1,56 @@ +// +// AppDelegate+Storage.m +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import "AppDelegate+Storage.h" +#import "InstaBeanConfiguration.h" + +@implementation AppDelegate (Storage) + +#pragma mark - Common storage related methods + +- (NSError*) save +{ + NSError *error = nil; + [self.managedObjectContext save:&error]; + return error; +} + +#pragma mark - InstaBean related storage methods +- (InstaBeanConfiguration*) getInstaBeanConfiguration +{ + InstaBeanConfiguration* config = nil; + if (self.managedObjectContext) + { + //Note: There should only be ONE entity of this type. + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"InstaBeanConfiguration"]; + [fetchRequest setFetchLimit:1]; + + NSError *fetchRequestError = nil; + NSArray *fetchRequestResult = [self.managedObjectContext executeFetchRequest:fetchRequest error:&fetchRequestError]; + + if (fetchRequestResult == nil || fetchRequestError) + { + NSLog(@"getInstaBeanConfiguration - Fetch request resulted in an error!"); +#warning TODO: Implement proper error handling (perhaps a message box?) + } + else if (fetchRequestResult.count == 0) + { + config = [NSEntityDescription insertNewObjectForEntityForName:@"InstaBeanConfiguration" inManagedObjectContext:self.managedObjectContext]; + config.extractionTime = [NSNumber numberWithDouble:25.0f]; + } + else + { + config = [fetchRequestResult objectAtIndex:0]; + } + } + return config; +} + + + +@end diff --git a/iBean/iBean/AppDelegate.h b/iBean/iBean/AppDelegate.h new file mode 100644 index 0000000..40084d5 --- /dev/null +++ b/iBean/iBean/AppDelegate.h @@ -0,0 +1,22 @@ +// +// AppDelegate.h +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; +@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; +@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; + +- (void)saveContext; +- (NSURL *)applicationDocumentsDirectory; + +@end diff --git a/iBean/iBean/AppDelegate.m b/iBean/iBean/AppDelegate.m new file mode 100644 index 0000000..6d465ae --- /dev/null +++ b/iBean/iBean/AppDelegate.m @@ -0,0 +1,152 @@ +// +// AppDelegate.m +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +@synthesize managedObjectContext = _managedObjectContext; +@synthesize managedObjectModel = _managedObjectModel; +@synthesize persistentStoreCoordinator = _persistentStoreCoordinator; + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + /* + IGNORING THIS SINCE WE ARE USING STORYBOARD BASED UI + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. + self.window.backgroundColor = [UIColor whiteColor]; + [self.window makeKeyAndVisible]; + */ + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (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 +{ + // Saves changes in the application's managed object context before the application terminates. + [self saveContext]; +} + +- (void)saveContext +{ + NSError *error = nil; + NSManagedObjectContext *managedObjectContext = self.managedObjectContext; + if (managedObjectContext != nil) { + if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog(@"Unresolved error %@, %@", error, [error userInfo]); + abort(); + } + } +} + +#pragma mark - Core Data stack + +// Returns the managed object context for the application. +// If the context doesn't already exist, it is created and bound to the persistent store coordinator for the application. +- (NSManagedObjectContext *)managedObjectContext +{ + if (_managedObjectContext != nil) { + return _managedObjectContext; + } + + NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; + if (coordinator != nil) { + _managedObjectContext = [[NSManagedObjectContext alloc] init]; + [_managedObjectContext setPersistentStoreCoordinator:coordinator]; + } + return _managedObjectContext; +} + +// Returns the managed object model for the application. +// If the model doesn't already exist, it is created from the application's model. +- (NSManagedObjectModel *)managedObjectModel +{ + if (_managedObjectModel != nil) { + return _managedObjectModel; + } + NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"iBean" withExtension:@"momd"]; + _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; + return _managedObjectModel; +} + +// Returns the persistent store coordinator for the application. +// If the coordinator doesn't already exist, it is created and the application's store added to it. +- (NSPersistentStoreCoordinator *)persistentStoreCoordinator +{ + if (_persistentStoreCoordinator != nil) { + return _persistentStoreCoordinator; + } + + NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"iBean.sqlite"]; + + NSError *error = nil; + _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; + if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { + /* + Replace this implementation with code to handle the error appropriately. + + abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + + Typical reasons for an error here include: + * The persistent store is not accessible; + * The schema for the persistent store is incompatible with current managed object model. + Check the error message to determine what the actual problem was. + + + If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory. + + If you encounter schema incompatibility errors during development, you can reduce their frequency by: + * Simply deleting the existing store: + [[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil] + + * Performing automatic lightweight migration by passing the following dictionary as the options parameter: + @{NSMigratePersistentStoresAutomaticallyOption:@YES, NSInferMappingModelAutomaticallyOption:@YES} + + Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details. + + */ + NSLog(@"Unresolved error %@, %@", error, [error userInfo]); + abort(); + } + + return _persistentStoreCoordinator; +} + +#pragma mark - Application's Documents directory + +// Returns the URL to the application's Documents directory. +- (NSURL *)applicationDocumentsDirectory +{ + return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; +} + +@end diff --git a/iBean/iBean/Default-568h@2x.png b/iBean/iBean/Default-568h@2x.png new file mode 100644 index 0000000..0891b7a Binary files /dev/null and b/iBean/iBean/Default-568h@2x.png differ diff --git a/iBean/iBean/Default.png b/iBean/iBean/Default.png new file mode 100644 index 0000000..4c8ca6f Binary files /dev/null and b/iBean/iBean/Default.png differ diff --git a/iBean/iBean/Default@2x.png b/iBean/iBean/Default@2x.png new file mode 100644 index 0000000..35b84cf Binary files /dev/null and b/iBean/iBean/Default@2x.png differ diff --git a/iBean/iBean/InstaBeanConfiguration.h b/iBean/iBean/InstaBeanConfiguration.h new file mode 100644 index 0000000..ca985a7 --- /dev/null +++ b/iBean/iBean/InstaBeanConfiguration.h @@ -0,0 +1,17 @@ +// +// InstaBeanConfiguration.h +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import +#import + + +@interface InstaBeanConfiguration : NSManagedObject + +@property (nonatomic, retain) NSNumber * extractionTime; + +@end diff --git a/iBean/iBean/InstaBeanConfiguration.m b/iBean/iBean/InstaBeanConfiguration.m new file mode 100644 index 0000000..c80cc72 --- /dev/null +++ b/iBean/iBean/InstaBeanConfiguration.m @@ -0,0 +1,16 @@ +// +// InstaBeanConfiguration.m +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import "InstaBeanConfiguration.h" + + +@implementation InstaBeanConfiguration + +@dynamic extractionTime; + +@end diff --git a/iBean/iBean/InstaBeanViewController.h b/iBean/iBean/InstaBeanViewController.h new file mode 100644 index 0000000..f21c3bf --- /dev/null +++ b/iBean/iBean/InstaBeanViewController.h @@ -0,0 +1,34 @@ +// +// InstaBeanViewController.h +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import +#import "InstaBeanConfiguration.h" + +@interface InstaBeanViewController : UIViewController + +@property (nonatomic, assign) double extractionProgress; +@property (nonatomic, strong) NSTimer* timer; +@property (nonatomic, strong) InstaBeanConfiguration *configuration; + +/* Utility methods */ +- (void) initInstaBean; +- (void) updateExtractionSettingLabel; +- (void) updateExtractionProgressLabel; +- (void) haltExtractionTimer; + +/* UI Outlets */ +@property (weak, nonatomic) IBOutlet UILabel *extractionSettingLabel; +@property (weak, nonatomic) IBOutlet UIButton *extractionButton; +@property (weak, nonatomic) IBOutlet UIStepper *extractionSettingStepper; +@property (weak, nonatomic) IBOutlet UILabel *extractionProgressLabel; + +/* UI Actions */ +- (IBAction)startExtraction:(id)sender; +- (IBAction)setExtractionTimer:(id)sender; + +@end diff --git a/iBean/iBean/InstaBeanViewController.m b/iBean/iBean/InstaBeanViewController.m new file mode 100644 index 0000000..15b8330 --- /dev/null +++ b/iBean/iBean/InstaBeanViewController.m @@ -0,0 +1,141 @@ +// +// InstaBeanViewController.m +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import "InstaBeanViewController.h" +#import "AppDelegate+Storage.h" + +@interface InstaBeanViewController () + +@end + +@implementation InstaBeanViewController + +/* +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} +*/ + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (void) viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + [self initInstaBean]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +/***************************************************** + Utility methods + *****************************************************/ +#pragma mark - Utility methods +- (void) initInstaBean +{ + if (self.configuration == nil) + { + NSLog(@"Loading & setting stepper!"); + self.configuration = [(AppDelegate*) [[UIApplication sharedApplication] delegate] getInstaBeanConfiguration]; + + if (self.configuration == nil) + { + //TODO: Display error! + NSLog(@"initInstaBean received nil for configuration!"); +#warning TODO: Display error!? + return; + } + } + + [self.extractionSettingStepper setValue:[self.configuration.extractionTime doubleValue]]; + [self updateExtractionSettingLabel]; +} + +- (void) updateExtractionProgressLabel +{ + self.extractionProgress += 0.1f; + self.extractionProgressLabel.text = [NSString stringWithFormat:@"%1.1f", self.extractionProgress]; + + if (self.extractionProgress >= self.extractionSettingStepper.value) + { + NSLog(@"Timer reached its limit!"); + [self haltExtractionTimer]; + } +} + +- (void) updateExtractionSettingLabel +{ + self.extractionSettingLabel.text = [NSString stringWithFormat:@"%1.0f", self.extractionSettingStepper.value]; +} + +- (void) haltExtractionTimer +{ + if (self.timer != nil) + { + [self.timer invalidate]; + self.timer = nil; + + //Return UI to "Start extraction" state. + [self.extractionButton setTitle:@"Start extraction" forState:UIControlStateNormal]; + [self.extractionSettingStepper setEnabled:YES]; + } +} + +/***************************************************** + UI Actions +*****************************************************/ +#pragma mark - IBActions +- (IBAction)startExtraction:(id)sender { + + //Extraction in progress? + if (self.timer == nil) + { + self.extractionProgress = 0.0f; + [self.extractionButton setTitle:@"Stop extraction" forState:UIControlStateNormal]; + [self.extractionSettingStepper setEnabled:NO]; + + self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1f target:self selector:@selector(updateExtractionProgressLabel) userInfo:nil repeats:YES]; + + } + else + { + [self haltExtractionTimer]; + } +} + +- (IBAction)setExtractionTimer:(id)sender { + + if (self.configuration != nil) + { + self.configuration.extractionTime = [NSNumber numberWithDouble:self.extractionSettingStepper.value]; + + //Let's save our config. + NSError* error = [(AppDelegate*) [[UIApplication sharedApplication] delegate] save]; + if (error != nil) + { + NSLog(@"InstaBean unable to save configuration!"); +#warning TODO: Handle this error? + } + } + + [self updateExtractionSettingLabel]; +} +@end diff --git a/iBean/iBean/en.lproj/InfoPlist.strings b/iBean/iBean/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/iBean/iBean/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/iBean/iBean/iBean-Info.plist b/iBean/iBean/iBean-Info.plist new file mode 100644 index 0000000..a6924cf --- /dev/null +++ b/iBean/iBean/iBean-Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + Eddie-Ehlin.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIMainStoryboardFile + iPhoneStoryboard + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/iBean/iBean/iBean-Prefix.pch b/iBean/iBean/iBean-Prefix.pch new file mode 100644 index 0000000..3f237fd --- /dev/null +++ b/iBean/iBean/iBean-Prefix.pch @@ -0,0 +1,15 @@ +// +// Prefix header for all source files of the 'iBean' target in the 'iBean' project +// + +#import + +#ifndef __IPHONE_3_0 +#warning "This project uses features only available in iOS SDK 3.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import + #import +#endif diff --git a/iBean/iBean/iBean.xcdatamodeld/.xccurrentversion b/iBean/iBean/iBean.xcdatamodeld/.xccurrentversion new file mode 100644 index 0000000..6671caa --- /dev/null +++ b/iBean/iBean/iBean.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + iBean.xcdatamodel + + diff --git a/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents b/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents new file mode 100644 index 0000000..3098915 --- /dev/null +++ b/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/iBean/iBean/iPhoneStoryboard.storyboard b/iBean/iBean/iPhoneStoryboard.storyboard new file mode 100644 index 0000000..47264e7 --- /dev/null +++ b/iBean/iBean/iPhoneStoryboard.storyboard @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/iBean/iBean/main.m b/iBean/iBean/main.m new file mode 100644 index 0000000..0105c97 --- /dev/null +++ b/iBean/iBean/main.m @@ -0,0 +1,18 @@ +// +// main.m +// iBean +// +// Created by Eddie Ehlin on 2012-12-31. +// Copyright (c) 2012 Eddie Ehlin. All rights reserved. +// + +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} -- cgit v1.2.3