diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fcfb6e --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# OS X +.DS_Store + +# Xcode +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +profile +*.moved-aside +DerivedData +*.hmap +*.ipa +**/*.xcworkspace + +# CocoaPods +Pods diff --git a/YATC.xcodeproj/project.pbxproj b/YATC.xcodeproj/project.pbxproj new file mode 100644 index 0000000..50f558c --- /dev/null +++ b/YATC.xcodeproj/project.pbxproj @@ -0,0 +1,482 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 16736E6718A81FE600404622 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16736E6618A81FE600404622 /* Foundation.framework */; }; + 16736E6918A81FE600404622 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16736E6818A81FE600404622 /* CoreGraphics.framework */; }; + 16736E6B18A81FE600404622 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16736E6A18A81FE600404622 /* UIKit.framework */; }; + 16736E7118A81FE600404622 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 16736E6F18A81FE600404622 /* InfoPlist.strings */; }; + 16736E7318A81FE600404622 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 16736E7218A81FE600404622 /* main.m */; }; + 16736E7718A81FE600404622 /* TWCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 16736E7618A81FE600404622 /* TWCAppDelegate.m */; }; + 16736E7A18A81FE600404622 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 16736E7818A81FE600404622 /* Main.storyboard */; }; + 16736E7D18A81FE600404622 /* TWCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16736E7C18A81FE600404622 /* TWCViewController.m */; }; + 16736E7F18A81FE600404622 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 16736E7E18A81FE600404622 /* Images.xcassets */; }; + 16736E8618A81FE600404622 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16736E8518A81FE600404622 /* XCTest.framework */; }; + 16736E8718A81FE600404622 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16736E6618A81FE600404622 /* Foundation.framework */; }; + 16736E8818A81FE600404622 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16736E6A18A81FE600404622 /* UIKit.framework */; }; + 16736E9018A81FE600404622 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 16736E8E18A81FE600404622 /* InfoPlist.strings */; }; + 16736E9218A81FE600404622 /* YATCTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 16736E9118A81FE600404622 /* YATCTests.m */; }; + 16736E9C18A82D0A00404622 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16736E9B18A82D0A00404622 /* Social.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 16736E8918A81FE600404622 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 16736E5B18A81FE600404622 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 16736E6218A81FE600404622; + remoteInfo = YATC; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 16736E6318A81FE600404622 /* YATC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YATC.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 16736E6618A81FE600404622 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 16736E6818A81FE600404622 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 16736E6A18A81FE600404622 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 16736E6E18A81FE600404622 /* YATC-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "YATC-Info.plist"; sourceTree = ""; }; + 16736E7018A81FE600404622 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 16736E7218A81FE600404622 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 16736E7418A81FE600404622 /* YATC-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YATC-Prefix.pch"; sourceTree = ""; }; + 16736E7518A81FE600404622 /* TWCAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TWCAppDelegate.h; sourceTree = ""; }; + 16736E7618A81FE600404622 /* TWCAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TWCAppDelegate.m; sourceTree = ""; }; + 16736E7918A81FE600404622 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 16736E7B18A81FE600404622 /* TWCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TWCViewController.h; sourceTree = ""; }; + 16736E7C18A81FE600404622 /* TWCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TWCViewController.m; sourceTree = ""; }; + 16736E7E18A81FE600404622 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 16736E8418A81FE600404622 /* YATCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YATCTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 16736E8518A81FE600404622 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 16736E8D18A81FE600404622 /* YATCTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "YATCTests-Info.plist"; sourceTree = ""; }; + 16736E8F18A81FE600404622 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 16736E9118A81FE600404622 /* YATCTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YATCTests.m; sourceTree = ""; }; + 16736E9B18A82D0A00404622 /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 16736E6018A81FE600404622 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 16736E9C18A82D0A00404622 /* Social.framework in Frameworks */, + 16736E6918A81FE600404622 /* CoreGraphics.framework in Frameworks */, + 16736E6B18A81FE600404622 /* UIKit.framework in Frameworks */, + 16736E6718A81FE600404622 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 16736E8118A81FE600404622 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 16736E8618A81FE600404622 /* XCTest.framework in Frameworks */, + 16736E8818A81FE600404622 /* UIKit.framework in Frameworks */, + 16736E8718A81FE600404622 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 16736E5A18A81FE600404622 = { + isa = PBXGroup; + children = ( + 16736E6C18A81FE600404622 /* YATC */, + 16736E8B18A81FE600404622 /* YATCTests */, + 16736E6518A81FE600404622 /* Frameworks */, + 16736E6418A81FE600404622 /* Products */, + ); + sourceTree = ""; + }; + 16736E6418A81FE600404622 /* Products */ = { + isa = PBXGroup; + children = ( + 16736E6318A81FE600404622 /* YATC.app */, + 16736E8418A81FE600404622 /* YATCTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 16736E6518A81FE600404622 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 16736E9B18A82D0A00404622 /* Social.framework */, + 16736E6618A81FE600404622 /* Foundation.framework */, + 16736E6818A81FE600404622 /* CoreGraphics.framework */, + 16736E6A18A81FE600404622 /* UIKit.framework */, + 16736E8518A81FE600404622 /* XCTest.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 16736E6C18A81FE600404622 /* YATC */ = { + isa = PBXGroup; + children = ( + 16736E7518A81FE600404622 /* TWCAppDelegate.h */, + 16736E7618A81FE600404622 /* TWCAppDelegate.m */, + 16736E7818A81FE600404622 /* Main.storyboard */, + 16736E7B18A81FE600404622 /* TWCViewController.h */, + 16736E7C18A81FE600404622 /* TWCViewController.m */, + 16736E7E18A81FE600404622 /* Images.xcassets */, + 16736E6D18A81FE600404622 /* Supporting Files */, + ); + path = YATC; + sourceTree = ""; + }; + 16736E6D18A81FE600404622 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 16736E6E18A81FE600404622 /* YATC-Info.plist */, + 16736E6F18A81FE600404622 /* InfoPlist.strings */, + 16736E7218A81FE600404622 /* main.m */, + 16736E7418A81FE600404622 /* YATC-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 16736E8B18A81FE600404622 /* YATCTests */ = { + isa = PBXGroup; + children = ( + 16736E9118A81FE600404622 /* YATCTests.m */, + 16736E8C18A81FE600404622 /* Supporting Files */, + ); + path = YATCTests; + sourceTree = ""; + }; + 16736E8C18A81FE600404622 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 16736E8D18A81FE600404622 /* YATCTests-Info.plist */, + 16736E8E18A81FE600404622 /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 16736E6218A81FE600404622 /* YATC */ = { + isa = PBXNativeTarget; + buildConfigurationList = 16736E9518A81FE600404622 /* Build configuration list for PBXNativeTarget "YATC" */; + buildPhases = ( + 16736E5F18A81FE600404622 /* Sources */, + 16736E6018A81FE600404622 /* Frameworks */, + 16736E6118A81FE600404622 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = YATC; + productName = YATC; + productReference = 16736E6318A81FE600404622 /* YATC.app */; + productType = "com.apple.product-type.application"; + }; + 16736E8318A81FE600404622 /* YATCTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 16736E9818A81FE600404622 /* Build configuration list for PBXNativeTarget "YATCTests" */; + buildPhases = ( + 16736E8018A81FE600404622 /* Sources */, + 16736E8118A81FE600404622 /* Frameworks */, + 16736E8218A81FE600404622 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 16736E8A18A81FE600404622 /* PBXTargetDependency */, + ); + name = YATCTests; + productName = YATCTests; + productReference = 16736E8418A81FE600404622 /* YATCTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 16736E5B18A81FE600404622 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = TWC; + LastUpgradeCheck = 0500; + ORGANIZATIONNAME = "Jacob Krall"; + TargetAttributes = { + 16736E8318A81FE600404622 = { + TestTargetID = 16736E6218A81FE600404622; + }; + }; + }; + buildConfigurationList = 16736E5E18A81FE600404622 /* Build configuration list for PBXProject "YATC" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 16736E5A18A81FE600404622; + productRefGroup = 16736E6418A81FE600404622 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 16736E6218A81FE600404622 /* YATC */, + 16736E8318A81FE600404622 /* YATCTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 16736E6118A81FE600404622 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 16736E7F18A81FE600404622 /* Images.xcassets in Resources */, + 16736E7118A81FE600404622 /* InfoPlist.strings in Resources */, + 16736E7A18A81FE600404622 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 16736E8218A81FE600404622 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 16736E9018A81FE600404622 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 16736E5F18A81FE600404622 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 16736E7D18A81FE600404622 /* TWCViewController.m in Sources */, + 16736E7318A81FE600404622 /* main.m in Sources */, + 16736E7718A81FE600404622 /* TWCAppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 16736E8018A81FE600404622 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 16736E9218A81FE600404622 /* YATCTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 16736E8A18A81FE600404622 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 16736E6218A81FE600404622 /* YATC */; + targetProxy = 16736E8918A81FE600404622 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 16736E6F18A81FE600404622 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 16736E7018A81FE600404622 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 16736E7818A81FE600404622 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 16736E7918A81FE600404622 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 16736E8E18A81FE600404622 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 16736E8F18A81FE600404622 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 16736E9318A81FE600404622 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 16736E9418A81FE600404622 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 16736E9618A81FE600404622 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "YATC/YATC-Prefix.pch"; + INFOPLIST_FILE = "YATC/YATC-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 16736E9718A81FE600404622 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "YATC/YATC-Prefix.pch"; + INFOPLIST_FILE = "YATC/YATC-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 16736E9918A81FE600404622 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/YATC.app/YATC"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "YATC/YATC-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "YATCTests/YATCTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 16736E9A18A81FE600404622 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/YATC.app/YATC"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "YATC/YATC-Prefix.pch"; + INFOPLIST_FILE = "YATCTests/YATCTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 16736E5E18A81FE600404622 /* Build configuration list for PBXProject "YATC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 16736E9318A81FE600404622 /* Debug */, + 16736E9418A81FE600404622 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 16736E9518A81FE600404622 /* Build configuration list for PBXNativeTarget "YATC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 16736E9618A81FE600404622 /* Debug */, + 16736E9718A81FE600404622 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 16736E9818A81FE600404622 /* Build configuration list for PBXNativeTarget "YATCTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 16736E9918A81FE600404622 /* Debug */, + 16736E9A18A81FE600404622 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 16736E5B18A81FE600404622 /* Project object */; +} diff --git a/YATC/Base.lproj/Main.storyboard b/YATC/Base.lproj/Main.storyboard new file mode 100644 index 0000000..038169d --- /dev/null +++ b/YATC/Base.lproj/Main.storyboard @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/YATC/Images.xcassets/AppIcon.appiconset/Contents.json b/YATC/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a396706 --- /dev/null +++ b/YATC/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/YATC/Images.xcassets/LaunchImage.launchimage/Contents.json b/YATC/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..c79ebd3 --- /dev/null +++ b/YATC/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/YATC/TWCAppDelegate.h b/YATC/TWCAppDelegate.h new file mode 100644 index 0000000..27fc3c5 --- /dev/null +++ b/YATC/TWCAppDelegate.h @@ -0,0 +1,15 @@ +// +// TWCAppDelegate.h +// YATC +// +// Created by Jacob Krall on 2/9/14. +// Copyright (c) 2014 Jacob Krall. All rights reserved. +// + +@import UIKit; + +@interface TWCAppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/YATC/TWCAppDelegate.m b/YATC/TWCAppDelegate.m new file mode 100644 index 0000000..4f10fb5 --- /dev/null +++ b/YATC/TWCAppDelegate.m @@ -0,0 +1,46 @@ +// +// TWCAppDelegate.m +// YATC +// +// Created by Jacob Krall on 2/9/14. +// Copyright (c) 2014 Jacob Krall. All rights reserved. +// + +#import "TWCAppDelegate.h" + +@implementation TWCAppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Override point for customization after application launch. + 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 +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/YATC/TWCViewController.h b/YATC/TWCViewController.h new file mode 100644 index 0000000..ee3d036 --- /dev/null +++ b/YATC/TWCViewController.h @@ -0,0 +1,13 @@ +// +// TWCViewController.h +// YATC +// +// Created by Jacob Krall on 2/9/14. +// Copyright (c) 2014 Jacob Krall. All rights reserved. +// + +@import UIKit; + +@interface TWCViewController : UITableViewController + +@end diff --git a/YATC/TWCViewController.m b/YATC/TWCViewController.m new file mode 100644 index 0000000..282f45c --- /dev/null +++ b/YATC/TWCViewController.m @@ -0,0 +1,156 @@ +// +// TWCViewController.m +// YATC +// +// Created by Jacob Krall on 2/9/14. +// Copyright (c) 2014 Jacob Krall. All rights reserved. +// + +@import Accounts; +@import Social; +#import "TWCViewController.h" + +@interface TWCViewController () + +@property NSArray *entries; + +// Twitter connection code shamelessly stolen from +// https://dev.twitter.com/docs/ios/making-api-requests-slrequest +@property (nonatomic) ACAccountStore *accountStore; + +@end + +@implementation TWCViewController + +- (BOOL)userHasAccessToTwitter +{ + return [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + [self fetchTimelineForUser]; + [self setupRefreshControl]; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + if(self = [super initWithCoder:aDecoder]) + { + self.entries = @[]; + self.accountStore = [ACAccountStore new]; + } + + return self; +} + +- (void) setupRefreshControl +{ + // HACK: If I just use `self.refreshControl` here, a wacky blank cell + // remains at the top of the TableView after refresh. + // Using a brand-new UIRefreshControl eliminates this bug. + UIRefreshControl *refreshControl = [UIRefreshControl new]; + [refreshControl addTarget:self action:@selector(fetchTimelineForUser) + forControlEvents:UIControlEventValueChanged]; + refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:@"Updating data…"]; + + self.refreshControl = refreshControl; +} + +- (void)fetchTimelineForUser +{ + // Step 0: Check that the user has local Twitter accounts + if ([self userHasAccessToTwitter]) { + // Step 1: Obtain access to the user's Twitter accounts + ACAccountType *twitterAccountType = + [self.accountStore accountTypeWithAccountTypeIdentifier: + ACAccountTypeIdentifierTwitter]; + + [self.accountStore + requestAccessToAccountsWithType:twitterAccountType + options:nil + completion:^(BOOL granted, NSError *error) { + if (granted) { + // Step 2: Create a request + NSArray *twitterAccounts = + [self.accountStore accountsWithAccountType:twitterAccountType]; + NSURL *url = [NSURL URLWithString:@"https://api.twitter.com" + @"/1.1/statuses/home_timeline.json"]; + NSDictionary *params = @{@"count" : @"100", @"include_entities": @"false"}; + SLRequest *request = + [SLRequest requestForServiceType:SLServiceTypeTwitter + requestMethod:SLRequestMethodGET + URL:url + parameters:params]; + // Attach an account to the request + [request setAccount:[twitterAccounts lastObject]]; + + // Step 3: Execute the request + [request performRequestWithHandler: + ^(NSData *responseData, + NSHTTPURLResponse *urlResponse, + NSError *error) { + if (responseData) { + if (urlResponse.statusCode >= 200 && + urlResponse.statusCode < 300) { + NSError *jsonError; + NSArray *timelineData = + [NSJSONSerialization + JSONObjectWithData:responseData + options:NSJSONReadingAllowFragments error:&jsonError]; + if (timelineData) { + self.entries = timelineData; + NSLog(@"got %ld", (long)(timelineData.count)); + dispatch_async(dispatch_get_main_queue(), ^{ + [self.tableView reloadData]; + [self.refreshControl endRefreshing]; + }); + } + else { + // Our JSON deserialization went awry + NSLog(@"JSON Error: %@", [jsonError localizedDescription]); + } + } + else { + // The server did not respond ... were we rate-limited? + NSLog(@"The response status code is %ld", + (long)(urlResponse.statusCode)); + } + } + }]; + } + else { + // Access was not granted, or an error occurred + NSLog(@"%@", [error localizedDescription]); + } + }]; + } else { + NSLog(@"!userHasAccessToTwitter"); + } +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.entries.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView + dequeueReusableCellWithIdentifier:@"cell" + forIndexPath:indexPath]; + NSDictionary* tweet = self.entries[indexPath.row]; + + cell.textLabel.text = tweet[@"user"][@"screen_name"]; + cell.detailTextLabel.text = tweet[@"text"]; + return cell; +} + +@end diff --git a/YATC/YATC-Info.plist b/YATC/YATC-Info.plist new file mode 100644 index 0000000..e59cb7f --- /dev/null +++ b/YATC/YATC-Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + net.jkrall.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/YATC/YATC-Prefix.pch b/YATC/YATC-Prefix.pch new file mode 100644 index 0000000..7825372 --- /dev/null +++ b/YATC/YATC-Prefix.pch @@ -0,0 +1,16 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#import + +#ifndef __IPHONE_5_0 +#warning "This project uses features only available in iOS SDK 5.0 and later." +#endif + +#ifdef __OBJC__ + @import UIKit; + @import Foundation; +#endif diff --git a/YATC/en.lproj/InfoPlist.strings b/YATC/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/YATC/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/YATC/main.m b/YATC/main.m new file mode 100644 index 0000000..af02fa4 --- /dev/null +++ b/YATC/main.m @@ -0,0 +1,18 @@ +// +// main.m +// YATC +// +// Created by Jacob Krall on 2/9/14. +// Copyright (c) 2014 Jacob Krall. All rights reserved. +// + +@import UIKit; + +#import "TWCAppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([TWCAppDelegate class])); + } +} diff --git a/YATCTests/YATCTests-Info.plist b/YATCTests/YATCTests-Info.plist new file mode 100644 index 0000000..8de2a9c --- /dev/null +++ b/YATCTests/YATCTests-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + net.jkrall.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/YATCTests/YATCTests.m b/YATCTests/YATCTests.m new file mode 100644 index 0000000..f179b7c --- /dev/null +++ b/YATCTests/YATCTests.m @@ -0,0 +1,34 @@ +// +// YATCTests.m +// YATCTests +// +// Created by Jacob Krall on 2/9/14. +// Copyright (c) 2014 Jacob Krall. All rights reserved. +// + +@import XCTest; + +@interface YATCTests : XCTestCase + +@end + +@implementation YATCTests + +- (void)setUp +{ + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown +{ + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample +{ + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); +} + +@end diff --git a/YATCTests/en.lproj/InfoPlist.strings b/YATCTests/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/YATCTests/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ +