Permalink
Browse files

Initial code commit

  • Loading branch information...
1 parent 0f82e7c commit 55ac84ba93fceea9e3639edb475ca18c85508ccb Soroush Khanlou committed Aug 24, 2012
View
BIN .DS_Store
Binary file not shown.
View
478 FTWCache.xcodeproj/project.pbxproj
@@ -0,0 +1,478 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 34D2538815D8A771008547E8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D2538715D8A771008547E8 /* UIKit.framework */; };
+ 34D2538A15D8A771008547E8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D2538915D8A771008547E8 /* Foundation.framework */; };
+ 34D2538C15D8A771008547E8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D2538B15D8A771008547E8 /* CoreGraphics.framework */; };
+ 34D2539215D8A771008547E8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34D2539015D8A771008547E8 /* InfoPlist.strings */; };
+ 34D2539415D8A771008547E8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D2539315D8A771008547E8 /* main.m */; };
+ 34D2539815D8A771008547E8 /* FTWAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D2539715D8A771008547E8 /* FTWAppDelegate.m */; };
+ 34D2539B15D8A771008547E8 /* FTWViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D2539A15D8A771008547E8 /* FTWViewController.m */; };
+ 34D2539E15D8A771008547E8 /* FTWViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D2539C15D8A771008547E8 /* FTWViewController.xib */; };
+ 34D253A615D8A772008547E8 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D253A515D8A772008547E8 /* SenTestingKit.framework */; };
+ 34D253A715D8A772008547E8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D2538715D8A771008547E8 /* UIKit.framework */; };
+ 34D253A815D8A772008547E8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D2538915D8A771008547E8 /* Foundation.framework */; };
+ 34D253B015D8A772008547E8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34D253AE15D8A772008547E8 /* InfoPlist.strings */; };
+ 34D253B315D8A772008547E8 /* FTWCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D253B215D8A772008547E8 /* FTWCacheTests.m */; };
+ 34D253BE15D8A7C9008547E8 /* FTWCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D253BD15D8A7C9008547E8 /* FTWCache.m */; };
+ 34D253BF15D8A7C9008547E8 /* FTWCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D253BD15D8A7C9008547E8 /* FTWCache.m */; };
+ 34D253C215D8ADCB008547E8 /* img_def.png in Resources */ = {isa = PBXBuildFile; fileRef = 34D253C015D8ADCB008547E8 /* img_def.png */; };
+ 34D253C315D8ADCB008547E8 /* img_def.png in Resources */ = {isa = PBXBuildFile; fileRef = 34D253C015D8ADCB008547E8 /* img_def.png */; };
+ 34D253C415D8ADCB008547E8 /* img_def@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 34D253C115D8ADCB008547E8 /* img_def@2x.png */; };
+ 34D253C515D8ADCB008547E8 /* img_def@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 34D253C115D8ADCB008547E8 /* img_def@2x.png */; };
+ 34D253C815D8BE71008547E8 /* NSString+MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D253C715D8BE71008547E8 /* NSString+MD5.m */; };
+ 34D253C915D8BE71008547E8 /* NSString+MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D253C715D8BE71008547E8 /* NSString+MD5.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 34D253A915D8A772008547E8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 34D2537A15D8A771008547E8 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 34D2538215D8A771008547E8;
+ remoteInfo = FTWCache;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 34D2538315D8A771008547E8 /* FTWCache.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FTWCache.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 34D2538715D8A771008547E8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 34D2538915D8A771008547E8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 34D2538B15D8A771008547E8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 34D2538F15D8A771008547E8 /* FTWCache-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FTWCache-Info.plist"; sourceTree = "<group>"; };
+ 34D2539115D8A771008547E8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 34D2539315D8A771008547E8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 34D2539515D8A771008547E8 /* FTWCache-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FTWCache-Prefix.pch"; sourceTree = "<group>"; };
+ 34D2539615D8A771008547E8 /* FTWAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTWAppDelegate.h; sourceTree = "<group>"; };
+ 34D2539715D8A771008547E8 /* FTWAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FTWAppDelegate.m; sourceTree = "<group>"; };
+ 34D2539915D8A771008547E8 /* FTWViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTWViewController.h; sourceTree = "<group>"; };
+ 34D2539A15D8A771008547E8 /* FTWViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FTWViewController.m; sourceTree = "<group>"; };
+ 34D2539D15D8A771008547E8 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/FTWViewController.xib; sourceTree = "<group>"; };
+ 34D253A415D8A772008547E8 /* FTWCacheTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FTWCacheTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 34D253A515D8A772008547E8 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+ 34D253AD15D8A772008547E8 /* FTWCacheTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FTWCacheTests-Info.plist"; sourceTree = "<group>"; };
+ 34D253AF15D8A772008547E8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 34D253B115D8A772008547E8 /* FTWCacheTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FTWCacheTests.h; sourceTree = "<group>"; };
+ 34D253B215D8A772008547E8 /* FTWCacheTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FTWCacheTests.m; sourceTree = "<group>"; };
+ 34D253BC15D8A7C9008547E8 /* FTWCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTWCache.h; sourceTree = "<group>"; };
+ 34D253BD15D8A7C9008547E8 /* FTWCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTWCache.m; sourceTree = "<group>"; };
+ 34D253C015D8ADCB008547E8 /* img_def.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_def.png; sourceTree = "<group>"; };
+ 34D253C115D8ADCB008547E8 /* img_def@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_def@2x.png"; sourceTree = "<group>"; };
+ 34D253C615D8BE70008547E8 /* NSString+MD5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MD5.h"; sourceTree = "<group>"; };
+ 34D253C715D8BE71008547E8 /* NSString+MD5.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MD5.m"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 34D2538015D8A771008547E8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34D2538815D8A771008547E8 /* UIKit.framework in Frameworks */,
+ 34D2538A15D8A771008547E8 /* Foundation.framework in Frameworks */,
+ 34D2538C15D8A771008547E8 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 34D253A015D8A772008547E8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34D253A615D8A772008547E8 /* SenTestingKit.framework in Frameworks */,
+ 34D253A715D8A772008547E8 /* UIKit.framework in Frameworks */,
+ 34D253A815D8A772008547E8 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 34D2537815D8A771008547E8 = {
+ isa = PBXGroup;
+ children = (
+ 34D2538D15D8A771008547E8 /* FTWCache */,
+ 34D253AB15D8A772008547E8 /* FTWCacheTests */,
+ 34D2538615D8A771008547E8 /* Frameworks */,
+ 34D2538415D8A771008547E8 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 34D2538415D8A771008547E8 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 34D2538315D8A771008547E8 /* FTWCache.app */,
+ 34D253A415D8A772008547E8 /* FTWCacheTests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 34D2538615D8A771008547E8 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 34D2538715D8A771008547E8 /* UIKit.framework */,
+ 34D2538915D8A771008547E8 /* Foundation.framework */,
+ 34D2538B15D8A771008547E8 /* CoreGraphics.framework */,
+ 34D253A515D8A772008547E8 /* SenTestingKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 34D2538D15D8A771008547E8 /* FTWCache */ = {
+ isa = PBXGroup;
+ children = (
+ 34D2539615D8A771008547E8 /* FTWAppDelegate.h */,
+ 34D2539715D8A771008547E8 /* FTWAppDelegate.m */,
+ 34D2539915D8A771008547E8 /* FTWViewController.h */,
+ 34D2539A15D8A771008547E8 /* FTWViewController.m */,
+ 34D2539C15D8A771008547E8 /* FTWViewController.xib */,
+ 34D253BC15D8A7C9008547E8 /* FTWCache.h */,
+ 34D253BD15D8A7C9008547E8 /* FTWCache.m */,
+ 34D253C015D8ADCB008547E8 /* img_def.png */,
+ 34D253C115D8ADCB008547E8 /* img_def@2x.png */,
+ 34D253C615D8BE70008547E8 /* NSString+MD5.h */,
+ 34D253C715D8BE71008547E8 /* NSString+MD5.m */,
+ 34D2538E15D8A771008547E8 /* Supporting Files */,
+ );
+ path = FTWCache;
+ sourceTree = "<group>";
+ };
+ 34D2538E15D8A771008547E8 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 34D2538F15D8A771008547E8 /* FTWCache-Info.plist */,
+ 34D2539015D8A771008547E8 /* InfoPlist.strings */,
+ 34D2539315D8A771008547E8 /* main.m */,
+ 34D2539515D8A771008547E8 /* FTWCache-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 34D253AB15D8A772008547E8 /* FTWCacheTests */ = {
+ isa = PBXGroup;
+ children = (
+ 34D253B115D8A772008547E8 /* FTWCacheTests.h */,
+ 34D253B215D8A772008547E8 /* FTWCacheTests.m */,
+ 34D253AC15D8A772008547E8 /* Supporting Files */,
+ );
+ path = FTWCacheTests;
+ sourceTree = "<group>";
+ };
+ 34D253AC15D8A772008547E8 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 34D253AD15D8A772008547E8 /* FTWCacheTests-Info.plist */,
+ 34D253AE15D8A772008547E8 /* InfoPlist.strings */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 34D2538215D8A771008547E8 /* FTWCache */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 34D253B615D8A772008547E8 /* Build configuration list for PBXNativeTarget "FTWCache" */;
+ buildPhases = (
+ 34D2537F15D8A771008547E8 /* Sources */,
+ 34D2538015D8A771008547E8 /* Frameworks */,
+ 34D2538115D8A771008547E8 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = FTWCache;
+ productName = FTWCache;
+ productReference = 34D2538315D8A771008547E8 /* FTWCache.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 34D253A315D8A772008547E8 /* FTWCacheTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 34D253B915D8A772008547E8 /* Build configuration list for PBXNativeTarget "FTWCacheTests" */;
+ buildPhases = (
+ 34D2539F15D8A772008547E8 /* Sources */,
+ 34D253A015D8A772008547E8 /* Frameworks */,
+ 34D253A115D8A772008547E8 /* Resources */,
+ 34D253A215D8A772008547E8 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 34D253AA15D8A772008547E8 /* PBXTargetDependency */,
+ );
+ name = FTWCacheTests;
+ productName = FTWCacheTests;
+ productReference = 34D253A415D8A772008547E8 /* FTWCacheTests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 34D2537A15D8A771008547E8 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ CLASSPREFIX = FTW;
+ LastUpgradeCheck = 0440;
+ ORGANIZATIONNAME = FTW;
+ };
+ buildConfigurationList = 34D2537D15D8A771008547E8 /* Build configuration list for PBXProject "FTWCache" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 34D2537815D8A771008547E8;
+ productRefGroup = 34D2538415D8A771008547E8 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 34D2538215D8A771008547E8 /* FTWCache */,
+ 34D253A315D8A772008547E8 /* FTWCacheTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 34D2538115D8A771008547E8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34D2539215D8A771008547E8 /* InfoPlist.strings in Resources */,
+ 34D2539E15D8A771008547E8 /* FTWViewController.xib in Resources */,
+ 34D253C215D8ADCB008547E8 /* img_def.png in Resources */,
+ 34D253C415D8ADCB008547E8 /* img_def@2x.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 34D253A115D8A772008547E8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34D253B015D8A772008547E8 /* InfoPlist.strings in Resources */,
+ 34D253C315D8ADCB008547E8 /* img_def.png in Resources */,
+ 34D253C515D8ADCB008547E8 /* img_def@2x.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 34D253A215D8A772008547E8 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 34D2537F15D8A771008547E8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34D2539415D8A771008547E8 /* main.m in Sources */,
+ 34D2539815D8A771008547E8 /* FTWAppDelegate.m in Sources */,
+ 34D2539B15D8A771008547E8 /* FTWViewController.m in Sources */,
+ 34D253BE15D8A7C9008547E8 /* FTWCache.m in Sources */,
+ 34D253C815D8BE71008547E8 /* NSString+MD5.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 34D2539F15D8A772008547E8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34D253B315D8A772008547E8 /* FTWCacheTests.m in Sources */,
+ 34D253BF15D8A7C9008547E8 /* FTWCache.m in Sources */,
+ 34D253C915D8BE71008547E8 /* NSString+MD5.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 34D253AA15D8A772008547E8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 34D2538215D8A771008547E8 /* FTWCache */;
+ targetProxy = 34D253A915D8A772008547E8 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 34D2539015D8A771008547E8 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 34D2539115D8A771008547E8 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 34D2539C15D8A771008547E8 /* FTWViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 34D2539D15D8A771008547E8 /* en */,
+ );
+ name = FTWViewController.xib;
+ sourceTree = "<group>";
+ };
+ 34D253AE15D8A772008547E8 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 34D253AF15D8A772008547E8 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 34D253B415D8A772008547E8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_ENABLE_OBJC_ARC = 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_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;
+ };
+ 34D253B515D8A772008547E8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "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;
+ };
+ 34D253B715D8A772008547E8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FTWCache/FTWCache-Prefix.pch";
+ INFOPLIST_FILE = "FTWCache/FTWCache-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 34D253B815D8A772008547E8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FTWCache/FTWCache-Prefix.pch";
+ INFOPLIST_FILE = "FTWCache/FTWCache-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ 34D253BA15D8A772008547E8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FTWCache.app/FTWCache";
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FTWCache/FTWCache-Prefix.pch";
+ INFOPLIST_FILE = "FTWCacheTests/FTWCacheTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 34D253BB15D8A772008547E8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FTWCache.app/FTWCache";
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FTWCache/FTWCache-Prefix.pch";
+ INFOPLIST_FILE = "FTWCacheTests/FTWCacheTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 34D2537D15D8A771008547E8 /* Build configuration list for PBXProject "FTWCache" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 34D253B415D8A772008547E8 /* Debug */,
+ 34D253B515D8A772008547E8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 34D253B615D8A772008547E8 /* Build configuration list for PBXNativeTarget "FTWCache" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 34D253B715D8A772008547E8 /* Debug */,
+ 34D253B815D8A772008547E8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ 34D253B915D8A772008547E8 /* Build configuration list for PBXNativeTarget "FTWCacheTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 34D253BA15D8A772008547E8 /* Debug */,
+ 34D253BB15D8A772008547E8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 34D2537A15D8A771008547E8 /* Project object */;
+}
View
19 FTWCache/FTWAppDelegate.h
@@ -0,0 +1,19 @@
+//
+// FTWAppDelegate.h
+// FTWCache
+//
+// Created by Soroush Khanlou on 8/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class FTWViewController;
+
+@interface FTWAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) FTWViewController *viewController;
+
+@end
View
52 FTWCache/FTWAppDelegate.m
@@ -0,0 +1,52 @@
+//
+// FTWAppDelegate.m
+// FTWCache
+//
+// Created by Soroush Khanlou on 8/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import "FTWAppDelegate.h"
+
+#import "FTWViewController.h"
+
+@implementation FTWAppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ // Override point for customization after application launch.
+ self.viewController = [[FTWViewController alloc] initWithNibName:@"FTWViewController" bundle:nil];
+ self.window.rootViewController = self.viewController;
+ [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
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
View
38 FTWCache/FTWCache-Info.plist
@@ -0,0 +1,38 @@
+<?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>co.FTW.${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>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 FTWCache/FTWCache-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'FTWCache' target in the 'FTWCache' 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
View
18 FTWCache/FTWCache.h
@@ -0,0 +1,18 @@
+//
+// FTWCache.h
+// FTW
+//
+// Created by Soroush Khanlou on 6/28/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface FTWCache : NSObject
+
++ (void) resetCache;
+
++ (void) setObject:(NSData*)data forKey:(NSString*)key;
++ (id) objectForKey:(NSString*)key;
+
+@end
View
62 FTWCache/FTWCache.m
@@ -0,0 +1,62 @@
+//
+// FTWCache.m
+// FTW
+//
+// Created by Soroush Khanlou on 6/28/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import "FTWCache.h"
+
+static NSTimeInterval cacheTime = (double)604800;
+
+@implementation FTWCache
+
++ (void) resetCache {
+ [[NSFileManager defaultManager] removeItemAtPath:[FTWCache cacheDirectory] error:nil];
+}
+
++ (NSString*) cacheDirectory {
+ NSArray* paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+ NSString *cacheDirectory = [paths objectAtIndex:0];
+ cacheDirectory = [cacheDirectory stringByAppendingPathComponent:@"FTWCaches"];
+ return cacheDirectory;
+}
+
++ (NSData*) objectForKey:(NSString*)key {
+ NSFileManager *fileManager = [NSFileManager defaultManager];
+ NSString *filename = [self.cacheDirectory stringByAppendingPathComponent:key];
+
+ if ([fileManager fileExistsAtPath:filename])
+ {
+ NSDate *modificationDate = [[fileManager attributesOfItemAtPath:filename error:nil] objectForKey:NSFileModificationDate];
+ if ([modificationDate timeIntervalSinceNow] > cacheTime) {
+ [fileManager removeItemAtPath:filename error:nil];
+ } else {
+ NSData *data = [NSData dataWithContentsOfFile:filename];
+ return data;
+ }
+ }
+ return nil;
+}
+
++ (void) setObject:(NSData*)data forKey:(NSString*)key {
+ NSFileManager *fileManager = [NSFileManager defaultManager];
+ NSString *filename = [self.cacheDirectory stringByAppendingPathComponent:key];
+
+ BOOL isDir = YES;
+ if (![fileManager fileExistsAtPath:self.cacheDirectory isDirectory:&isDir]) {
+ [fileManager createDirectoryAtPath:self.cacheDirectory withIntermediateDirectories:NO attributes:nil error:nil];
+ }
+
+ NSError *error;
+ @try {
+ [data writeToFile:filename options:NSDataWritingAtomic error:&error];
+ }
+ @catch (NSException * e) {
+ //TODO: error handling maybe
+ }
+}
+
+
+@end
View
21 FTWCache/FTWViewController.h
@@ -0,0 +1,21 @@
+//
+// FTWViewController.h
+// FTWCache
+//
+// Created by Soroush Khanlou on 8/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "FTWCache.h"
+#import "NSString+MD5.h"
+
+@interface FTWViewController : UIViewController <UITextFieldDelegate>
+
+@property (nonatomic, strong) IBOutlet UIImageView *imageView;
+@property (nonatomic, strong) IBOutlet UITextField *textField;
+@property (nonatomic, strong) IBOutlet UIScrollView *scrollView;
+
+- (void) loadImageFromURL:(NSString*)URL;
+
+@end
View
57 FTWCache/FTWViewController.m
@@ -0,0 +1,57 @@
+//
+// FTWViewController.m
+// FTWCache
+//
+// Created by Soroush Khanlou on 8/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import "FTWViewController.h"
+
+@implementation FTWViewController
+
+@synthesize imageView, textField, scrollView;
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ textField.delegate = self;
+ scrollView.alwaysBounceVertical = YES;
+ [self loadImageFromURL:textField.text];
+}
+
+- (void) textFieldDidEndEditing:(UITextField *)aTextField {
+ [self loadImageFromURL:textField.text];
+}
+
+- (BOOL) textFieldShouldReturn:(UITextField *)aTextField {
+ [textField resignFirstResponder];
+ return YES;
+}
+
+- (void) loadImageFromURL:(NSString*)URL {
+ NSURL *imageURL = [NSURL URLWithString:URL];
+ NSString *key = [URL MD5Hash];
+ NSData *data = [FTWCache objectForKey:key];
+ if (data) {
+ UIImage *image = [UIImage imageWithData:data];
+ imageView.image = image;
+ } else {
+ imageView.image = [UIImage imageNamed:@"img_def"];
+ dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
+ dispatch_async(queue, ^{
+ NSData *data = [NSData dataWithContentsOfURL:imageURL];
+ [FTWCache setObject:data forKey:key];
+ UIImage *image = [UIImage imageWithData:data];
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ imageView.image = image;
+ });
+ });
+ }
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+}
+
+@end
View
18 FTWCache/NSString+MD5.h
@@ -0,0 +1,18 @@
+//
+// NSString+MD5.h
+// Originally created for MyFile
+//
+// Created by Árpád Goretity, 2011. Some infos were grabbed from StackOverflow.
+// Released into the public domain. You can do whatever you want with this within the limits of applicable law (so nothing nasty!).
+// I'm not responsible for any damage related to the use of this software. There's NO WARRANTY AT ALL.
+//
+
+#import <Foundation/Foundation.h>
+#import <CommonCrypto/CommonDigest.h>
+
+@interface NSString (MD5)
+
+- (NSString *) MD5Hash;
+
+@end
+
View
38 FTWCache/NSString+MD5.m
@@ -0,0 +1,38 @@
+//
+// NSString+MD5.m
+// Originally created for MyFile
+//
+// Created by Árpád Goretity, 2011. Some infos were grabbed from StackOverflow.
+// Released into the public domain. You can do whatever you want with this within the limits of applicable law (so nothing nasty!).
+// I'm not responsible for any damage related to the use of this software. There's NO WARRANTY AT ALL.
+//
+
+#import "NSString+MD5.h"
+
+@implementation NSString (MD5)
+
+
+- (NSString *) MD5Hash {
+
+ CC_MD5_CTX md5;
+ CC_MD5_Init (&md5);
+ CC_MD5_Update (&md5, [self UTF8String], [self length]);
+
+ unsigned char digest[CC_MD5_DIGEST_LENGTH];
+ CC_MD5_Final (digest, &md5);
+ NSString *s = [NSString stringWithFormat: @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ digest[0], digest[1],
+ digest[2], digest[3],
+ digest[4], digest[5],
+ digest[6], digest[7],
+ digest[8], digest[9],
+ digest[10], digest[11],
+ digest[12], digest[13],
+ digest[14], digest[15]];
+
+ return s;
+
+}
+
+@end
+
View
261 FTWCache/en.lproj/FTWViewController.xib
@@ -0,0 +1,261 @@
+<?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">12A269</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2549</string>
+ <string key="IBDocument.AppKitVersion">1187</string>
+ <string key="IBDocument.HIToolboxVersion">624.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">1498</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIImageView</string>
+ <string>IBUILabel</string>
+ <string>IBUIScrollView</string>
+ <string>IBUITextField</string>
+ <string>IBUIView</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="IBUIScrollView" id="279089202">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUIImageView" id="949347240">
+ <reference key="NSNextResponder" ref="279089202"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{60, 106}, {200, 126}}</string>
+ <reference key="NSSuperview" ref="279089202"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUITextField" id="841949192">
+ <reference key="NSNextResponder" ref="279089202"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{18, 60}, {285, 31}}</string>
+ <reference key="NSSuperview" ref="279089202"/>
+ <reference key="NSNextKeyView" ref="949347240"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <string key="IBUIText">https://fbcdn-profile-a.akamaihd.net/static-ak/rsrc.php/v2/yL/r/HsTZSDw4avx.gif</string>
+ <int key="IBUIBorderStyle">3</int>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace" id="656789442">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+ <float key="IBUIMinimumFontSize">17</float>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <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>
+ <object class="IBUILabel" id="352458706">
+ <reference key="NSNextResponder" ref="279089202"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 31}, {42, 21}}</string>
+ <reference key="NSSuperview" ref="279089202"/>
+ <reference key="NSNextKeyView" ref="841949192"/>
+ <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">URL:</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>
+ </array>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSNextKeyView" ref="352458706"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIAlwaysBounceVertical">YES</bool>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSNextKeyView" ref="279089202"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <reference key="NSCustomColorSpace" ref="656789442"/>
+ </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">imageView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="949347240"/>
+ </object>
+ <int key="connectionID">12</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">textField</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="841949192"/>
+ </object>
+ <int key="connectionID">13</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">scrollView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="279089202"/>
+ </object>
+ <int key="connectionID">14</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="279089202"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="279089202"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="949347240"/>
+ <reference ref="841949192"/>
+ <reference ref="352458706"/>
+ </array>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">9</int>
+ <reference key="object" ref="949347240"/>
+ <reference key="parent" ref="279089202"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="841949192"/>
+ <reference key="parent" ref="279089202"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="352458706"/>
+ <reference key="parent" ref="279089202"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">FTWViewController</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="11.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">14</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
+ <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">1498</string>
+ </data>
+</archive>
View
2 FTWCache/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
BIN FTWCache/img_def.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN FTWCache/img_def@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
18 FTWCache/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// FTWCache
+//
+// Created by Soroush Khanlou on 8/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "FTWAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([FTWAppDelegate class]));
+ }
+}
View
22 FTWCacheTests/FTWCacheTests-Info.plist
@@ -0,0 +1,22 @@
+<?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>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>co.FTW.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
View
13 FTWCacheTests/FTWCacheTests.h
@@ -0,0 +1,13 @@
+//
+// FTWCacheTests.h
+// FTWCacheTests
+//
+// Created by Soroush Khanlou on 8/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface FTWCacheTests : SenTestCase
+
+@end
View
32 FTWCacheTests/FTWCacheTests.m
@@ -0,0 +1,32 @@
+//
+// FTWCacheTests.m
+// FTWCacheTests
+//
+// Created by Soroush Khanlou on 8/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import "FTWCacheTests.h"
+
+@implementation FTWCacheTests
+
+- (void)setUp
+{
+ [super setUp];
+
+ // Set-up code here.
+}
+
+- (void)tearDown
+{
+ // Tear-down code here.
+
+ [super tearDown];
+}
+
+- (void)testExample
+{
+ STFail(@"Unit tests are not implemented yet in FTWCacheTests");
+}
+
+@end
View
2 FTWCacheTests/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
7 LICENSE.md
@@ -0,0 +1,7 @@
+Copyright (c) 2012 FTW (http://ftw.co/)
+
+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.
View
19 README.md
@@ -1,4 +1,17 @@
-FTWCache
-========
+# FTWCache
-Dead simple caching for Mac and iOS
+FTWCache is a dead simple caching class I wrote for the FTW iOS App. It has two class methods for setting and retrieving data,
+
+ + (void) setObject:(NSData*)data forKey:(NSString*)key;
+
+and
+
+ + (id) objectForKey:(NSString*)key;
+
+and you can reset the cache with
+
+ + (void) resetCache;
+
+It stores the files in your Caches folder in its own folder. The default expiration time is 7 days, but you can modify that if you need. I wrote a good blog post that I'll be posting about on Monday about how to use this in conjunction with Grand Central Dispatch to download and show asynchronous images in a UITableView.
+
+It takes NSData objects, so anything you can format in that way (audio files, images, simple text) can be store in the cache. Note also that the system will also periodically flush the Caches folders of apps if it finds it needs more space.

0 comments on commit 55ac84b

Please sign in to comment.