diff --git a/Bean.podspec b/Bean.podspec new file mode 100644 index 0000000..e0e3118 --- /dev/null +++ b/Bean.podspec @@ -0,0 +1,18 @@ +Pod::Spec.new do |s| +s.name = "Bean" +s.version = "1.0.0" +s.summary = "Image downloading and caching made easy" +s.description = <<-DESC +Features +1. Download file +DESC + +s.homepage = "https://github.com/ipraba/Bean" +s.license = 'MIT' +s.author = { "Prabaharan" => "mailprabaharan.e@gmail.com" } +s.source = { :git => "https://github.com/ipraba/Bean.git", :tag => '1.0.0' } +s.platform = :ios, '8.0' +s.requires_arc = true +s.source_files = 'Pod/Classes' +s.frameworks = 'UIKit', 'Foundation' +end \ No newline at end of file diff --git a/Example/Bean.xcodeproj/project.pbxproj b/Example/Bean.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0c95d45 --- /dev/null +++ b/Example/Bean.xcodeproj/project.pbxproj @@ -0,0 +1,632 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 116B0F344ADFE8DF78426663 /* Pods_Bean_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0A9FE6C4CB5F6620A83964C /* Pods_Bean_Example.framework */; }; + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; + 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; + 9148202AB0B0868C1A8D6A5A /* Pods_Bean_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 339E3E24423608D970F85386 /* Pods_Bean_Tests.framework */; }; + F4154F241C22C8AB00377574 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4154F231C22C8AB00377574 /* Extensions.swift */; }; + F4154F261C22C93F00377574 /* ImagesCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4154F251C22C93F00377574 /* ImagesCell.swift */; }; + F4FA04AF1C26714700F2E51A /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FA04AE1C26714700F2E51A /* Constants.swift */; }; + F4FA04B51C2673BF00F2E51A /* FlickrObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FA04B41C2673BF00F2E51A /* FlickrObject.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 607FACC81AFB9204008FA782 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 607FACCF1AFB9204008FA782; + remoteInfo = Bean; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0B022BBA869E26D2F6D7AF0C /* Pods-Bean_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bean_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.debug.xcconfig"; sourceTree = ""; }; + 2548DB360A9C3697B8997F2E /* Bean.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Bean.podspec; path = ../Bean.podspec; sourceTree = ""; }; + 2E38A473431322420529E8E3 /* Pods-Bean_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bean_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.debug.xcconfig"; sourceTree = ""; }; + 339E3E24423608D970F85386 /* Pods_Bean_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bean_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3F7E0F5E7795F841FEFAA962 /* Pods-Bean_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bean_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.release.xcconfig"; sourceTree = ""; }; + 497559EAB57DD516E3D46435 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 51A2C58AE6DB9A85DD870F42 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 607FACD01AFB9204008FA782 /* Bean_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Bean_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 607FACE51AFB9204008FA782 /* Bean_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Bean_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; + 6D42743A3631641421B6C968 /* Pods-Bean_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bean_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.release.xcconfig"; sourceTree = ""; }; + F0A9FE6C4CB5F6620A83964C /* Pods_Bean_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bean_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F4154F231C22C8AB00377574 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + F4154F251C22C93F00377574 /* ImagesCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImagesCell.swift; sourceTree = ""; }; + F4FA04AE1C26714700F2E51A /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; + F4FA04B41C2673BF00F2E51A /* FlickrObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlickrObject.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 607FACCD1AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 116B0F344ADFE8DF78426663 /* Pods_Bean_Example.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE21AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9148202AB0B0868C1A8D6A5A /* Pods_Bean_Tests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 607FACC71AFB9204008FA782 = { + isa = PBXGroup; + children = ( + 607FACF51AFB993E008FA782 /* Podspec Metadata */, + 607FACD21AFB9204008FA782 /* Example for Bean */, + 607FACE81AFB9204008FA782 /* Tests */, + 607FACD11AFB9204008FA782 /* Products */, + E25BF900C45D9A14237F69CA /* Pods */, + F136833A7B1D6258E24E1ADD /* Frameworks */, + ); + sourceTree = ""; + }; + 607FACD11AFB9204008FA782 /* Products */ = { + isa = PBXGroup; + children = ( + 607FACD01AFB9204008FA782 /* Bean_Example.app */, + 607FACE51AFB9204008FA782 /* Bean_Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 607FACD21AFB9204008FA782 /* Example for Bean */ = { + isa = PBXGroup; + children = ( + F4FA04B61C26748E00F2E51A /* Utilities */, + F4FA04B31C26725B00F2E51A /* ViewController */, + F4FA04B21C26718F00F2E51A /* Model */, + 607FACD51AFB9204008FA782 /* AppDelegate.swift */, + 607FACD91AFB9204008FA782 /* Main.storyboard */, + 607FACDC1AFB9204008FA782 /* Images.xcassets */, + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, + 607FACD31AFB9204008FA782 /* Supporting Files */, + ); + name = "Example for Bean"; + path = Bean; + sourceTree = ""; + }; + 607FACD31AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACD41AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACE81AFB9204008FA782 /* Tests */ = { + isa = PBXGroup; + children = ( + 607FACEB1AFB9204008FA782 /* Tests.swift */, + 607FACE91AFB9204008FA782 /* Supporting Files */, + ); + path = Tests; + sourceTree = ""; + }; + 607FACE91AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACEA1AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { + isa = PBXGroup; + children = ( + 2548DB360A9C3697B8997F2E /* Bean.podspec */, + 51A2C58AE6DB9A85DD870F42 /* README.md */, + 497559EAB57DD516E3D46435 /* LICENSE */, + ); + name = "Podspec Metadata"; + sourceTree = ""; + }; + E25BF900C45D9A14237F69CA /* Pods */ = { + isa = PBXGroup; + children = ( + 2E38A473431322420529E8E3 /* Pods-Bean_Example.debug.xcconfig */, + 3F7E0F5E7795F841FEFAA962 /* Pods-Bean_Example.release.xcconfig */, + 0B022BBA869E26D2F6D7AF0C /* Pods-Bean_Tests.debug.xcconfig */, + 6D42743A3631641421B6C968 /* Pods-Bean_Tests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + F136833A7B1D6258E24E1ADD /* Frameworks */ = { + isa = PBXGroup; + children = ( + F0A9FE6C4CB5F6620A83964C /* Pods_Bean_Example.framework */, + 339E3E24423608D970F85386 /* Pods_Bean_Tests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + F4154F371C239B3F00377574 /* Views */ = { + isa = PBXGroup; + children = ( + F4154F251C22C93F00377574 /* ImagesCell.swift */, + ); + name = Views; + sourceTree = ""; + }; + F4FA04B21C26718F00F2E51A /* Model */ = { + isa = PBXGroup; + children = ( + F4FA04AE1C26714700F2E51A /* Constants.swift */, + F4FA04B41C2673BF00F2E51A /* FlickrObject.swift */, + ); + name = Model; + sourceTree = ""; + }; + F4FA04B31C26725B00F2E51A /* ViewController */ = { + isa = PBXGroup; + children = ( + F4154F371C239B3F00377574 /* Views */, + 607FACD71AFB9204008FA782 /* ViewController.swift */, + ); + name = ViewController; + sourceTree = ""; + }; + F4FA04B61C26748E00F2E51A /* Utilities */ = { + isa = PBXGroup; + children = ( + F4154F231C22C8AB00377574 /* Extensions.swift */, + ); + name = Utilities; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 607FACCF1AFB9204008FA782 /* Bean_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Bean_Example" */; + buildPhases = ( + 207BFDABF5F9CFA0C3ADC2C9 /* Check Pods Manifest.lock */, + 607FACCC1AFB9204008FA782 /* Sources */, + 607FACCD1AFB9204008FA782 /* Frameworks */, + 607FACCE1AFB9204008FA782 /* Resources */, + AA8767F128E69D4ECAAF26B3 /* Embed Pods Frameworks */, + 0AFA0D7FB23434A1829BE2C6 /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Bean_Example; + productName = Bean; + productReference = 607FACD01AFB9204008FA782 /* Bean_Example.app */; + productType = "com.apple.product-type.application"; + }; + 607FACE41AFB9204008FA782 /* Bean_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Bean_Tests" */; + buildPhases = ( + 78D2DBA158D6499402BCF856 /* Check Pods Manifest.lock */, + 607FACE11AFB9204008FA782 /* Sources */, + 607FACE21AFB9204008FA782 /* Frameworks */, + 607FACE31AFB9204008FA782 /* Resources */, + A2D503FAF683AF442A0D1B32 /* Embed Pods Frameworks */, + 73BB624C944823D781DB6088 /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 607FACE71AFB9204008FA782 /* PBXTargetDependency */, + ); + name = Bean_Tests; + productName = Tests; + productReference = 607FACE51AFB9204008FA782 /* Bean_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 607FACC81AFB9204008FA782 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0710; + LastUpgradeCheck = 0710; + ORGANIZATIONNAME = CocoaPods; + TargetAttributes = { + 607FACCF1AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + }; + 607FACE41AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + TestTargetID = 607FACCF1AFB9204008FA782; + }; + }; + }; + buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Bean" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 607FACC71AFB9204008FA782; + productRefGroup = 607FACD11AFB9204008FA782 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 607FACCF1AFB9204008FA782 /* Bean_Example */, + 607FACE41AFB9204008FA782 /* Bean_Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 607FACCE1AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE31AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 0AFA0D7FB23434A1829BE2C6 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 207BFDABF5F9CFA0C3ADC2C9 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 73BB624C944823D781DB6088 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 78D2DBA158D6499402BCF856 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + A2D503FAF683AF442A0D1B32 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + AA8767F128E69D4ECAAF26B3 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 607FACCC1AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, + F4154F261C22C93F00377574 /* ImagesCell.swift in Sources */, + F4154F241C22C8AB00377574 /* Extensions.swift in Sources */, + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, + F4FA04AF1C26714700F2E51A /* Constants.swift in Sources */, + F4FA04B51C2673BF00F2E51A /* FlickrObject.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE11AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 607FACCF1AFB9204008FA782 /* Bean_Example */; + targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 607FACD91AFB9204008FA782 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 607FACDA1AFB9204008FA782 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 607FACDF1AFB9204008FA782 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 607FACED1AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + 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_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 607FACEE1AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + 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_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 607FACF01AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2E38A473431322420529E8E3 /* Pods-Bean_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Bean/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 607FACF11AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3F7E0F5E7795F841FEFAA962 /* Pods-Bean_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Bean/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 607FACF31AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0B022BBA869E26D2F6D7AF0C /* Pods-Bean_Tests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bean_Example.app/Bean_Example"; + }; + name = Debug; + }; + 607FACF41AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6D42743A3631641421B6C968 /* Pods-Bean_Tests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bean_Example.app/Bean_Example"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Bean" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACED1AFB9204008FA782 /* Debug */, + 607FACEE1AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Bean_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF01AFB9204008FA782 /* Debug */, + 607FACF11AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Bean_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF31AFB9204008FA782 /* Debug */, + 607FACF41AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 607FACC81AFB9204008FA782 /* Project object */; +} diff --git a/Example/Bean.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Bean.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..b4e68c4 --- /dev/null +++ b/Example/Bean.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/Bean.xcodeproj/xcshareddata/xcschemes/Bean-Example.xcscheme b/Example/Bean.xcodeproj/xcshareddata/xcschemes/Bean-Example.xcscheme new file mode 100644 index 0000000..092f234 --- /dev/null +++ b/Example/Bean.xcodeproj/xcshareddata/xcschemes/Bean-Example.xcscheme @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Bean.xcworkspace/contents.xcworkspacedata b/Example/Bean.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a345289 --- /dev/null +++ b/Example/Bean.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/Bean/AppDelegate.swift b/Example/Bean/AppDelegate.swift new file mode 100644 index 0000000..0414c1a --- /dev/null +++ b/Example/Bean/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Bean +// +// Created by Prabaharan on 12/17/2015. +// Copyright (c) 2015 Prabaharan. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(application: UIApplication) { + // 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. + } + + func applicationDidEnterBackground(application: UIApplication) { + // 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. + } + + func applicationWillEnterForeground(application: UIApplication) { + // 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. + } + + func applicationDidBecomeActive(application: UIApplication) { + // 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. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Example/Bean/Base.lproj/LaunchScreen.xib b/Example/Bean/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..6e88a0c --- /dev/null +++ b/Example/Bean/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Bean/Base.lproj/Main.storyboard b/Example/Bean/Base.lproj/Main.storyboard new file mode 100644 index 0000000..a5eca39 --- /dev/null +++ b/Example/Bean/Base.lproj/Main.storyboard @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Bean/Constants.swift b/Example/Bean/Constants.swift new file mode 100644 index 0000000..0e3e3ef --- /dev/null +++ b/Example/Bean/Constants.swift @@ -0,0 +1,23 @@ +// +// Constants.swift +// Bean +// +// Created by Prabaharan Elangovan on 20/12/15. +// Copyright © 2015 CocoaPods. All rights reserved. +// + +import Foundation +import UIKit + +struct FlickrConstants { + static let apiKey = "9492ad2565e147c97138efcedf5d4d6a" + static let apiSecret = "ef85ad4b9712e87f" +} + +struct Colors { + static let EmeraldColor = UIColor(red: (46/255), green: (204/255), blue: (113/255), alpha: 1.0) + static let SunflowerColor = UIColor(red: (241/255), green: (196/255), blue: (15/255), alpha: 1.0) + static let PumpkinColor = UIColor(red: (211/255), green: (84/255), blue: (0/255), alpha: 1.0) + static let PomegranateColor = UIColor(red: (192/255), green: (57/255), blue: (43/255), alpha: 1.0) + +} \ No newline at end of file diff --git a/Example/Bean/Extensions.swift b/Example/Bean/Extensions.swift new file mode 100644 index 0000000..95668c8 --- /dev/null +++ b/Example/Bean/Extensions.swift @@ -0,0 +1,40 @@ +// +// Extensions.swift +// Bean +// +// Created by Prabaharan Elangovan on 17/12/15. +// Copyright © 2015 CocoaPods. All rights reserved. +// + +import UIKit + +extension UIViewController { + + func showAlert(message: String) { + showAlert(message, andTitle: "") + } + + func showAlert(message: String, andTitle title: String) { + let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert) + + // add an action (button) + alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)) + + // show the alert + self.presentViewController(alert, animated: true, completion: nil) + } +} + +//MARK: UICollectionView Extension +extension UICollectionView { + + func scrollToIndexpathByShowingHeader(indexPath: NSIndexPath) { + let sections = self.numberOfSections() + + if indexPath.section <= sections{ + let attributes = self.layoutAttributesForSupplementaryElementOfKind(UICollectionElementKindSectionHeader, atIndexPath: indexPath) + let topOfHeader = CGPointMake(0, attributes!.frame.origin.y - self.contentInset.top) + self.setContentOffset(topOfHeader, animated:false) + } + } +} \ No newline at end of file diff --git a/Example/Bean/FlickrObject.swift b/Example/Bean/FlickrObject.swift new file mode 100644 index 0000000..564e528 --- /dev/null +++ b/Example/Bean/FlickrObject.swift @@ -0,0 +1,31 @@ +// +// FlickrObject.swift +// Bean +// +// Created by Prabaharan Elangovan on 20/12/15. +// Copyright © 2015 CocoaPods. All rights reserved. +// + +import UIKit + +class FlickrObject : NSObject { + + let photoID : String + let server : String + let farm : Int + let secret : String + + init (dict: [String: AnyObject]) { + self.photoID = dict["id"] as! String + self.server = dict["server"] as! String + self.farm = dict["farm"] as! Int + self.secret = dict["secret"] as! String + super.init() + } + + func flickrImageURL(size:String = "m") -> NSURL { + let flickrUrl = "https://farm\(farm).staticflickr.com/\(server)/\(photoID)_\(secret)_\(size).jpg" + print(flickrUrl) + return NSURL(string: flickrUrl)! + } +} diff --git a/Example/Bean/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/Bean/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d3942e9 --- /dev/null +++ b/Example/Bean/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/Example/Bean/ImagesCell.swift b/Example/Bean/ImagesCell.swift new file mode 100644 index 0000000..a7db8bf --- /dev/null +++ b/Example/Bean/ImagesCell.swift @@ -0,0 +1,22 @@ +// +// ImagesCell.swift +// Bean +// +// Created by Prabaharan Elangovan on 17/12/15. +// Copyright © 2015 CocoaPods. All rights reserved. +// + +import UIKit + +class ImagesCell: UICollectionViewCell { + + @IBOutlet weak var imgFlicker: UIImageView! + + override func awakeFromNib() { + super.awakeFromNib() + imgFlicker.layer.cornerRadius = imgFlicker.frame.size.width/2 + imgFlicker.layer.borderWidth = 2.0 + imgFlicker.layer.borderColor = Colors.PumpkinColor.CGColor + imgFlicker.layer.masksToBounds = true + } +} diff --git a/Example/Bean/Info.plist b/Example/Bean/Info.plist new file mode 100644 index 0000000..f1d3e67 --- /dev/null +++ b/Example/Bean/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + + diff --git a/Example/Bean/ViewController.swift b/Example/Bean/ViewController.swift new file mode 100644 index 0000000..f0aaa0d --- /dev/null +++ b/Example/Bean/ViewController.swift @@ -0,0 +1,121 @@ +// +// ViewController.swift +// Bean +// +// Created by Prabaharan on 12/17/2015. +// Copyright (c) 2015 Prabaharan. All rights reserved. +// + +import UIKit +import Bean + +class ViewController: UICollectionViewController { + + let queue = NSOperationQueue() + var photos = [FlickrObject]() + var currentPage = 1 + + override func viewDidLoad() { + super.viewDidLoad() + self.title = "#Mindvalley" + self.navigationController?.navigationBar.barTintColor = Colors.PumpkinColor + fetchImages() + + // Do any additional setup after loading the view, typically from a nib. + } + + func fetchImages(){ + fetchImagesForText("Mindvalley", page: currentPage) { (results, error) -> Void in + print(results) + if error == nil && results != nil { + self.photos.appendContentsOf(results!) + dispatch_async(dispatch_get_main_queue(), { () -> Void in + self.collectionView?.reloadData() + }) + } + else{ + self.showAlert("Error in Fetching data from Flickr") + } + } + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + //Collection view delegates + override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { + return 1 + } + + override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return photos.count + } + + override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! ImagesCell + + let photo = photos[indexPath.row] + let flickrURl = photo.flickrImageURL() + + cell.imgFlicker.image = nil + + //The reason for not using the Bean ImageView extension is + //When scrolling very fast in a collectionView or Tableview the image requests sent will start updating the imageview for all reusable cell. This will lead to a flickering effect in cells. + //Solution extracted from this post http://stackoverflow.com/questions/16663618/async-image-loading-from-url-inside-a-uitableview-cell-image-changes-to-wrong + Bean.download(flickrURl).getImage { (url, image, error) -> Void in + if let currentCell = collectionView.cellForItemAtIndexPath(indexPath) as? ImagesCell{ + currentCell.imgFlicker.image = image + } + } + + if indexPath.row == photos.count-1 { //Last Cell + //Fetch next set of images + currentPage++ + fetchImages() + } + return cell + } + + override func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView { + + if kind == UICollectionElementKindSectionFooter { + let header = collectionView.dequeueReusableSupplementaryViewOfKind(UICollectionElementKindSectionFooter, withReuseIdentifier: "Footer", forIndexPath: indexPath) + return header; + } + + return UICollectionReusableView() + + } + + + func fetchImagesForText(text: String, page: Int, completion : (results: [FlickrObject]?, error : NSError?) -> Void) { + + let escapedTerm = text.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())! + //Flickr API search string should be escaped + let URLString = "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=\(FlickrConstants.apiKey)&text=\(escapedTerm)&per_page=20&page=\(page)&format=json&nojsoncallback=1" + + let request = NSURLRequest(URL: NSURL(string: URLString)!) + NSURLConnection.sendAsynchronousRequest(request, queue: queue) {response, data, error in + if error == nil { + do { + let json = try NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.AllowFragments) as! NSDictionary + var photos = [FlickrObject]() //Converting into models + for photo in json["photos"]!["photo"] as! [[String: AnyObject]] { + photos.append(FlickrObject(dict: photo)) + } + completion(results: photos, error: nil) + } + catch let jsonError as NSError { + completion(results: nil,error: jsonError) + } + return + } + completion(results: nil,error: error) + } + + } +} + + diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..7ffdb72 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,12 @@ +source 'https://github.com/CocoaPods/Specs.git' +use_frameworks! + +target 'Bean_Example', :exclusive => true do + pod "Bean", :path => "../" +end + +target 'Bean_Tests', :exclusive => true do + pod "Bean", :path => "../" + + +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..345e1b9 --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,14 @@ +PODS: + - Bean (0.1.0) + +DEPENDENCIES: + - Bean (from `../`) + +EXTERNAL SOURCES: + Bean: + :path: ../ + +SPEC CHECKSUMS: + Bean: 3f2646ea70db65a3666c78652ee4b697b2054009 + +COCOAPODS: 0.39.0 diff --git a/Example/Pods/BeanTests/BeanTests.swift b/Example/Pods/BeanTests/BeanTests.swift new file mode 100644 index 0000000..074c4b9 --- /dev/null +++ b/Example/Pods/BeanTests/BeanTests.swift @@ -0,0 +1,239 @@ +// +// BeanTests.swift +// BeanTests +// +// Created by Prabaharan Elangovan on 19/12/15. +// +// + +import XCTest +import Bean + +class BeanTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + Cache.sharedCache.clearCache() + } + + func waitOutTime(time: NSTimeInterval) { + waitForExpectationsWithTimeout(time) { error in + // ... + if let error = error { + print("Error: \(error.localizedDescription)") + } + } + } + + + func testDownloadDataCancel() { + + let urlData = NSURL(string: "https://github.com/ipraba/EPContactsPicker/archive/master.zip") + let expectation = expectationWithDescription("DownloadData Cancel: \(urlData)") + + let downloader = Bean.download(urlData!) + downloader.getData { (url, data, error) -> Void in + print(error) + XCTAssertNotNil(error) + XCTAssertEqual(error?.code,-999) //Error code -999 indicates the user cancelled the url request + XCTAssertNil(data) + XCTAssertEqual(urlData, url) + let cachedData = Cache.sharedCache.getData((urlData?.absoluteString)!) + XCTAssertNil(cachedData) + expectation.fulfill() + } + downloader.cancel(urlData!) + waitOutTime(10) + + } + + func testDownloadData() { + + let urlData = NSURL(string: "https://raw.githubusercontent.com/ipraba/EPContactsPicker/master/EPContactsPickerLogo.jpg") + let expectation = expectationWithDescription("DownloadData: \(urlData)") + + let downloader = Bean.download(urlData!) + downloader.getData { (url, data, error) -> Void in + XCTAssertNotNil(data) + XCTAssertNil(error) + XCTAssertEqual(urlData, url) + + let cachedData = Cache.sharedCache.getData((urlData?.absoluteString)!) + XCTAssertNotNil(cachedData) + + let cachedDataImage = Cache.sharedCache.getImage((urlData?.absoluteString)!) + XCTAssertNotNil(cachedDataImage) + expectation.fulfill() + + } + waitOutTime(10) + + } + + + func testDownloadImage() { + let imageUrl = NSURL(string: "https://raw.githubusercontent.com/ipraba/EPContactsPicker/master/EPContactsPickerLogo.jpg") + let expectation = expectationWithDescription("DownloadImage: \(imageUrl)") + + + Bean.download(imageUrl!).getImage { (url, image, error) -> Void in + XCTAssertNil(error) + XCTAssertNotNil(image) + + let cachedImage = Cache.sharedCache.getImage((imageUrl?.absoluteString)!) + XCTAssertNotNil(cachedImage) + XCTAssertEqual(cachedImage, image) + expectation.fulfill() + } + waitOutTime(10) + } + + + func testDownloadImageFailure() { + let imageUrl = NSURL(string: "https://raw.githubusercontent.com/ipraba/EPContactsPicker/master/") + let expectation = expectationWithDescription("DownloadImage Failure: \(imageUrl)") + + let downloader = Bean.download(imageUrl!) + downloader.getImage { (url, image, error) -> Void in + XCTAssertNil(image) + XCTAssertNotNil(error) + expectation.fulfill() + } + waitOutTime(10) + } + + + + func testDownloadJson() { + let jsonUrl = NSURL(string: "http://sample-file.bazadanni.com/download/txt/json/sample.json") + let expectation = expectationWithDescription("Download Json: \(jsonUrl)") + + let downloader = Bean.download(jsonUrl!, shouldCache: true) + downloader.getJSON { (url, json, error) -> Void in + print(json) + + XCTAssertNil(error) + XCTAssertNotNil(json) + XCTAssertEqual(json!["1"] as? String, "Samlpe") + + let cachedJson = Cache.sharedCache.getJson((jsonUrl?.absoluteString)!) + XCTAssertNotNil(cachedJson) + XCTAssertEqual(json!["1"] as? String, cachedJson!["1"] as? String) + + let cachedImage = Cache.sharedCache.getImage((jsonUrl?.absoluteString)!) + XCTAssertNil(cachedImage) + + expectation.fulfill() + } + + waitOutTime(10) + } + + func testDownloadJsonFailure() { + let imageUrl = NSURL(string: "http://stackoverflow.com/users/404848/iprabu") + let expectation = expectationWithDescription("DownloadJson Failure: \(imageUrl)") + + Bean.download(imageUrl!).getJSON { (url, json, error) -> Void in + XCTAssertNil(json) + XCTAssertNotNil(error) + expectation.fulfill() + } + waitOutTime(10) + } + + func testDownloadImageCached() { + let imageUrl = NSURL(string: "https://raw.githubusercontent.com/ipraba/EPContactsPicker/master/EPContactsPickerLogo.jpg") + let expectation = expectationWithDescription("DownloadImage Cached: \(imageUrl)") + + let downloader = Bean.download(imageUrl!, shouldCache: true) + downloader.getImage { (url, image, error) -> Void in + downloader.getImage({ (url, image, error) -> Void in + //This should get the cached image not the remote image. Check in tests coverage for execution. + XCTAssertNil(error) + XCTAssertNotNil(image) + expectation.fulfill() + }) + + } + waitOutTime(10) + } + + func testDownloadJsonCached() { + let jsonUrl = NSURL(string: "http://sample-file.bazadanni.com/download/txt/json/sample.json") + let expectation = expectationWithDescription("Download Json 2cached: \(jsonUrl)") + + let downloader = Bean.download(jsonUrl!, shouldCache: true) + downloader.getJSON { (url, json, error) -> Void in + print("Something") + downloader.getJSON({ (url, json, error) -> Void in + print("Somethin2g") + //This should get the cached image not the remote image. Check in tests coverage for execution. + XCTAssertEqual(json!["1"] as? String, "Samlpe") + XCTAssertNil(error) + XCTAssertNotNil(json) + expectation.fulfill() + }) + } + + waitOutTime(10) + } + + func testImageView(){ + let imageUrl = NSURL(string: "https://raw.githubusercontent.com/ipraba/EPContactsPicker/master/EPContactsPickerLogo.jpg") + let expectation = expectationWithDescription("Imageview test: \(imageUrl)") + + let imageView = UIImageView() + imageView.setImageWithUrl(imageUrl!) { (error) -> Void in + XCTAssertNil(error) + XCTAssertNotNil(imageView.image) + expectation.fulfill() + } + waitOutTime(10) + } + + func testImageViewPlaceholder(){ + let imageUrl = NSURL(string: "https://raw.githubusercontent.com/ipraba/EPContactsPicker/master/EPContactsPickerLogo.jpg") + let expectation = expectationWithDescription("Imageview test1: \(imageUrl)") + + let imageView = UIImageView() + imageView.setImageWithUrl(imageUrl!) + print("Call") + let delayTime = dispatch_time(DISPATCH_TIME_NOW, Int64(5 * Double(NSEC_PER_SEC))) + dispatch_after(delayTime, dispatch_get_main_queue()) { + print("Call2") + XCTAssertNotNil(imageView.image) + expectation.fulfill() + } + waitOutTime(10) + } + + + func testImageViewFailure() { + let imageUrl = NSURL(string: "https://raw.githubusercontent.com/ipraba/EPContactsPicker/master/EPContactsPickerLogo.jpg") + let expectation = expectationWithDescription("Imageview test failure: \(imageUrl)") + + let imageView = UIImageView() + Bean.download(imageUrl!).getImage { (url, image, error) -> Void in + + let imageUrl = NSURL(string: "") + imageView.setImageWithUrl(imageUrl!, placeholderImage: image, completion: { (error) -> Void in + XCTAssertNotNil(error) + XCTAssertEqual(image, imageView.image) + expectation.fulfill() + }) + } + + waitOutTime(10) + + } + + + + +} diff --git a/Example/Pods/BeanTests/Info.plist b/Example/Pods/BeanTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/Example/Pods/BeanTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Example/Pods/Local Podspecs/Bean.podspec.json b/Example/Pods/Local Podspecs/Bean.podspec.json new file mode 100644 index 0000000..1473d05 --- /dev/null +++ b/Example/Pods/Local Podspecs/Bean.podspec.json @@ -0,0 +1,25 @@ +{ + "name": "Bean", + "version": "0.1.0", + "summary": "A short description of Bean.", + "description": "", + "homepage": "https://github.com//Bean", + "license": "MIT", + "authors": { + "Prabaharan": "prabaharan.e@payoda.com" + }, + "source": { + "git": "https://github.com//Bean.git", + "tag": "0.1.0" + }, + "platforms": { + "ios": "8.0" + }, + "requires_arc": true, + "source_files": "Pod/Classes/**/*", + "resource_bundles": { + "Bean": [ + "Pod/Assets/*.png" + ] + } +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..345e1b9 --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,14 @@ +PODS: + - Bean (0.1.0) + +DEPENDENCIES: + - Bean (from `../`) + +EXTERNAL SOURCES: + Bean: + :path: ../ + +SPEC CHECKSUMS: + Bean: 3f2646ea70db65a3666c78652ee4b697b2054009 + +COCOAPODS: 0.39.0 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ed776fd --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,923 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0D9D6B4CD66E14DA6038A7E7AE842342 /* Pods-Bean_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BCA75B43E0F4F4D066FD8C55896110 /* Pods-Bean_Tests-dummy.m */; }; + 1EA9AB71E0DA982B62B13BC3CECC2961 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; + 2A137BF732395AC4C46CB4F67D3B37D0 /* UIImageView+Bean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6540034C2FFC07C82E725EB761D6A46B /* UIImageView+Bean.swift */; }; + 2F3A12F2FC700E7B28AFE3154797FAEF /* Bean-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 55463E032CA5B467D807930A4BBC7308 /* Bean-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 40DA0CEE627283B11807FFFE385CE08C /* Pods-Bean_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0086BDDED52D695457E386E16D7F8606 /* Pods-Bean_Example-dummy.m */; }; + 6291A6AD44281C14A8F346C0E10BE826 /* Bean-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F9B2414F59DD0484F60355143C3C93EF /* Bean-dummy.m */; }; + 793CF8B68F2F5288A3CB6ADF8B963353 /* Bean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F52A2438A7F722EAD6308D47F40CAC9 /* Bean.swift */; }; + 7C45E7F10E5DCDAA6ECB05CA98D3F2B6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; + 8B05BBDE83945E05C0200D25A8804107 /* Downloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F08E66270CAED792CFDAC297CDE346F /* Downloader.swift */; }; + 99DB54D3744860B5991C017D49BF68E7 /* Pods-Bean_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 913D2EF785665DEE8B5A653DF1C8BC18 /* Pods-Bean_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9DB03CB4A2A0CE80A3C38802CFAC9DB4 /* Bean.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BB9399BC5C766ABCACD926BF6F14738A /* Bean.bundle */; }; + 9E813DB2D26135DE3631EF6371E079C7 /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85A2416C70519E31B77B7594DE790D64 /* Cache.swift */; }; + E6FBACE485229F3946DE02EFCF7EB9FF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; + EFEA084D1C3EC5715CAEA61DBA6D8562 /* Pods-Bean_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E75F12EAE449D08F000F85CA55C0BE45 /* Pods-Bean_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F4FA04A61C25901700F2E51A /* BeanTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FA04A51C25901700F2E51A /* BeanTests.swift */; }; + F4FA04A81C25901700F2E51A /* Bean.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD03D0819C5E94409E11F518816B4C80 /* Bean.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + BCB3AE611A005B5E8CCCE92DBECBC719 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 75205AB906EE46E8D2809AC7B960EFE1; + remoteInfo = Bean; + }; + C6FFD9D1D17053A27D646763EF03F35C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 75205AB906EE46E8D2809AC7B960EFE1; + remoteInfo = Bean; + }; + F4FA04A91C25901700F2E51A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 75205AB906EE46E8D2809AC7B960EFE1; + remoteInfo = Bean; + }; + F9347906425F992BB733B4DCF59A3A50 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = E4B796057B4743CA97F682DE852BAA09; + remoteInfo = "Bean-Bean"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0086BDDED52D695457E386E16D7F8606 /* Pods-Bean_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Bean_Example-dummy.m"; sourceTree = ""; }; + 0E3E309E019CF20FA01468A43349EB9A /* Pods-Bean_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Bean_Tests.debug.xcconfig"; sourceTree = ""; }; + 10083829D770B48E7568FFF88F75F171 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A0EAFB17A45AA12BBA1D2E87F08BECD /* Bean-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Bean-prefix.pch"; sourceTree = ""; }; + 1F08E66270CAED792CFDAC297CDE346F /* Downloader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Downloader.swift; sourceTree = ""; }; + 3CBC9BCDCE0E556FCDC6C80B66BFDCE3 /* Pods-Bean_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Bean_Tests-frameworks.sh"; sourceTree = ""; }; + 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 47F4E3553FC96D2BF233D1416245BF43 /* Pods-Bean_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Bean_Example.modulemap"; sourceTree = ""; }; + 536990617228025604EC2B55C10FEFAE /* Pods-Bean_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Bean_Example.release.xcconfig"; sourceTree = ""; }; + 55463E032CA5B467D807930A4BBC7308 /* Bean-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Bean-umbrella.h"; sourceTree = ""; }; + 612A25147C5F8ACE90B959644ECE46F4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6540034C2FFC07C82E725EB761D6A46B /* UIImageView+Bean.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImageView+Bean.swift"; sourceTree = ""; }; + 6AB3B0DB6DEDF238C12466D407112DAF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6F52A2438A7F722EAD6308D47F40CAC9 /* Bean.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Bean.swift; sourceTree = ""; }; + 73C423A058D46F64A6DB077004B3E27A /* Pods-Bean_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Bean_Tests-resources.sh"; sourceTree = ""; }; + 73D86E2AA9CA9B3CA7E79B6476E6FD65 /* Pods_Bean_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bean_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7ED34F5141C4F8E4865F14CEBC89860A /* Pods-Bean_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Bean_Example-frameworks.sh"; sourceTree = ""; }; + 82150A2477B2E487B479A73C3CA34B52 /* Pods-Bean_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Bean_Tests-acknowledgements.markdown"; sourceTree = ""; }; + 85A2416C70519E31B77B7594DE790D64 /* Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Cache.swift; sourceTree = ""; }; + 87CC761C92FE01BC08A044063A94BECC /* Pods-Bean_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Bean_Example.debug.xcconfig"; sourceTree = ""; }; + 90FDA84FBDA1CF48B5F5128C3963E8A5 /* Bean.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Bean.modulemap; sourceTree = ""; }; + 913D2EF785665DEE8B5A653DF1C8BC18 /* Pods-Bean_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Bean_Example-umbrella.h"; sourceTree = ""; }; + A489409217E15EBBF0D2D0050F6EE2C6 /* Pods-Bean_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Bean_Example-resources.sh"; sourceTree = ""; }; + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + BB9399BC5C766ABCACD926BF6F14738A /* Bean.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Bean.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + BD03D0819C5E94409E11F518816B4C80 /* Bean.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Bean.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BE87A33DB2BAC8D5EEB03708366DD13D /* Bean.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Bean.xcconfig; sourceTree = ""; }; + C14E57C52917E0BA4FF5EACD4E2535D1 /* Pods-Bean_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Bean_Example-acknowledgements.markdown"; sourceTree = ""; }; + C263BB451C5E1EBC998C9E94C4534433 /* Pods_Bean_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bean_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CBC643EC8ACB0DA0726376C6D3F69A48 /* Pods-Bean_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Bean_Tests.modulemap"; sourceTree = ""; }; + CEF686511408368BA813D15A83CA8187 /* Pods-Bean_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Bean_Example-acknowledgements.plist"; sourceTree = ""; }; + CF48DCA253407E86F626CC746737BAE9 /* Pods-Bean_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Bean_Tests.release.xcconfig"; sourceTree = ""; }; + D0BCA75B43E0F4F4D066FD8C55896110 /* Pods-Bean_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Bean_Tests-dummy.m"; sourceTree = ""; }; + DE62D0065BCE38623CE692F5827E543F /* Pods-Bean_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Bean_Tests-acknowledgements.plist"; sourceTree = ""; }; + E75F12EAE449D08F000F85CA55C0BE45 /* Pods-Bean_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Bean_Tests-umbrella.h"; sourceTree = ""; }; + F4FA04A31C25901700F2E51A /* BeanTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BeanTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + F4FA04A51C25901700F2E51A /* BeanTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeanTests.swift; sourceTree = ""; }; + F4FA04A71C25901700F2E51A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F9B2414F59DD0484F60355143C3C93EF /* Bean-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Bean-dummy.m"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 62478A43ADC938C9EB50BAD731F9330D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E6FBACE485229F3946DE02EFCF7EB9FF /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 88C915B0826FD34899E27B00A3461F4B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C45E7F10E5DCDAA6ECB05CA98D3F2B6 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6B3D0C91104C8F222ACF67B63C3CFF7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F4FA04A01C25901700F2E51A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F4FA04A81C25901700F2E51A /* Bean.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F5C0AC660996532D7159B1E43FF48F7B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1EA9AB71E0DA982B62B13BC3CECC2961 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3AEE48FD0FBB7EE2F28333ACF0289196 /* Pods-Bean_Example */ = { + isa = PBXGroup; + children = ( + 10083829D770B48E7568FFF88F75F171 /* Info.plist */, + 47F4E3553FC96D2BF233D1416245BF43 /* Pods-Bean_Example.modulemap */, + C14E57C52917E0BA4FF5EACD4E2535D1 /* Pods-Bean_Example-acknowledgements.markdown */, + CEF686511408368BA813D15A83CA8187 /* Pods-Bean_Example-acknowledgements.plist */, + 0086BDDED52D695457E386E16D7F8606 /* Pods-Bean_Example-dummy.m */, + 7ED34F5141C4F8E4865F14CEBC89860A /* Pods-Bean_Example-frameworks.sh */, + A489409217E15EBBF0D2D0050F6EE2C6 /* Pods-Bean_Example-resources.sh */, + 913D2EF785665DEE8B5A653DF1C8BC18 /* Pods-Bean_Example-umbrella.h */, + 87CC761C92FE01BC08A044063A94BECC /* Pods-Bean_Example.debug.xcconfig */, + 536990617228025604EC2B55C10FEFAE /* Pods-Bean_Example.release.xcconfig */, + ); + name = "Pods-Bean_Example"; + path = "Target Support Files/Pods-Bean_Example"; + sourceTree = ""; + }; + 4DD05F08FECFF4EEB701C490464C691C /* Bean */ = { + isa = PBXGroup; + children = ( + EBB747E4584E5CA927E7A401A920F72E /* Pod */, + AA90C1FE706579325DBB08E6B395996A /* Support Files */, + ); + name = Bean; + path = ../..; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + CB9BCDA4AD7550FE9E1FED6692153F11 /* Development Pods */, + F4FA04A41C25901700F2E51A /* BeanTests */, + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, + D7C88DFCB13012B7BE6B56066C5231DC /* Products */, + 8C5F3E0935A4867D2E7A97AF67797653 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 8C5F3E0935A4867D2E7A97AF67797653 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 3AEE48FD0FBB7EE2F28333ACF0289196 /* Pods-Bean_Example */, + D2B455BEA79E8D2F6072B288C19346B5 /* Pods-Bean_Tests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + AA90C1FE706579325DBB08E6B395996A /* Support Files */ = { + isa = PBXGroup; + children = ( + 90FDA84FBDA1CF48B5F5128C3963E8A5 /* Bean.modulemap */, + BE87A33DB2BAC8D5EEB03708366DD13D /* Bean.xcconfig */, + F9B2414F59DD0484F60355143C3C93EF /* Bean-dummy.m */, + 1A0EAFB17A45AA12BBA1D2E87F08BECD /* Bean-prefix.pch */, + 55463E032CA5B467D807930A4BBC7308 /* Bean-umbrella.h */, + 612A25147C5F8ACE90B959644ECE46F4 /* Info.plist */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/Bean"; + sourceTree = ""; + }; + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + isa = PBXGroup; + children = ( + BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */ = { + isa = PBXGroup; + children = ( + 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + CB9BCDA4AD7550FE9E1FED6692153F11 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 4DD05F08FECFF4EEB701C490464C691C /* Bean */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + D2B455BEA79E8D2F6072B288C19346B5 /* Pods-Bean_Tests */ = { + isa = PBXGroup; + children = ( + 6AB3B0DB6DEDF238C12466D407112DAF /* Info.plist */, + CBC643EC8ACB0DA0726376C6D3F69A48 /* Pods-Bean_Tests.modulemap */, + 82150A2477B2E487B479A73C3CA34B52 /* Pods-Bean_Tests-acknowledgements.markdown */, + DE62D0065BCE38623CE692F5827E543F /* Pods-Bean_Tests-acknowledgements.plist */, + D0BCA75B43E0F4F4D066FD8C55896110 /* Pods-Bean_Tests-dummy.m */, + 3CBC9BCDCE0E556FCDC6C80B66BFDCE3 /* Pods-Bean_Tests-frameworks.sh */, + 73C423A058D46F64A6DB077004B3E27A /* Pods-Bean_Tests-resources.sh */, + E75F12EAE449D08F000F85CA55C0BE45 /* Pods-Bean_Tests-umbrella.h */, + 0E3E309E019CF20FA01468A43349EB9A /* Pods-Bean_Tests.debug.xcconfig */, + CF48DCA253407E86F626CC746737BAE9 /* Pods-Bean_Tests.release.xcconfig */, + ); + name = "Pods-Bean_Tests"; + path = "Target Support Files/Pods-Bean_Tests"; + sourceTree = ""; + }; + D7C88DFCB13012B7BE6B56066C5231DC /* Products */ = { + isa = PBXGroup; + children = ( + BB9399BC5C766ABCACD926BF6F14738A /* Bean.bundle */, + BD03D0819C5E94409E11F518816B4C80 /* Bean.framework */, + 73D86E2AA9CA9B3CA7E79B6476E6FD65 /* Pods_Bean_Example.framework */, + C263BB451C5E1EBC998C9E94C4534433 /* Pods_Bean_Tests.framework */, + F4FA04A31C25901700F2E51A /* BeanTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + DC4894296605827563A0EC49A4776709 /* Classes */ = { + isa = PBXGroup; + children = ( + 6F52A2438A7F722EAD6308D47F40CAC9 /* Bean.swift */, + 85A2416C70519E31B77B7594DE790D64 /* Cache.swift */, + 1F08E66270CAED792CFDAC297CDE346F /* Downloader.swift */, + 6540034C2FFC07C82E725EB761D6A46B /* UIImageView+Bean.swift */, + ); + path = Classes; + sourceTree = ""; + }; + EBB747E4584E5CA927E7A401A920F72E /* Pod */ = { + isa = PBXGroup; + children = ( + DC4894296605827563A0EC49A4776709 /* Classes */, + ); + path = Pod; + sourceTree = ""; + }; + F4FA04A41C25901700F2E51A /* BeanTests */ = { + isa = PBXGroup; + children = ( + F4FA04A51C25901700F2E51A /* BeanTests.swift */, + F4FA04A71C25901700F2E51A /* Info.plist */, + ); + path = BeanTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 3787CC17D52EF97F23C47CCCB96F22D6 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2F3A12F2FC700E7B28AFE3154797FAEF /* Bean-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 74EE7E5891C18EBC6BAA61EB27B41EB8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 99DB54D3744860B5991C017D49BF68E7 /* Pods-Bean_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F14043F7ABAF66BE1FC28F9E73F785E5 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + EFEA084D1C3EC5715CAEA61DBA6D8562 /* Pods-Bean_Tests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 521372DA592D8D455FFD44AB768FB8F3 /* Pods-Bean_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E23ED42D797E6866225C855DAA296839 /* Build configuration list for PBXNativeTarget "Pods-Bean_Tests" */; + buildPhases = ( + E56FF255A88DBFCD1A58BD25D4970AB9 /* Sources */, + F5C0AC660996532D7159B1E43FF48F7B /* Frameworks */, + F14043F7ABAF66BE1FC28F9E73F785E5 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + EF1DB72D29263887D4CB3C9F09A9A6E8 /* PBXTargetDependency */, + ); + name = "Pods-Bean_Tests"; + productName = "Pods-Bean_Tests"; + productReference = C263BB451C5E1EBC998C9E94C4534433 /* Pods_Bean_Tests.framework */; + productType = "com.apple.product-type.framework"; + }; + 75205AB906EE46E8D2809AC7B960EFE1 /* Bean */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0B5022575F5897EBDC6EBD0B281386DE /* Build configuration list for PBXNativeTarget "Bean" */; + buildPhases = ( + 8DC8095165C196172F59A39EFA3D1398 /* Sources */, + 62478A43ADC938C9EB50BAD731F9330D /* Frameworks */, + 01AD9165D9370476E4981614078DA1D5 /* Resources */, + 3787CC17D52EF97F23C47CCCB96F22D6 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 34B1E4E3A9BD7ECA52EA8A1C0262569A /* PBXTargetDependency */, + ); + name = Bean; + productName = Bean; + productReference = BD03D0819C5E94409E11F518816B4C80 /* Bean.framework */; + productType = "com.apple.product-type.framework"; + }; + E4B796057B4743CA97F682DE852BAA09 /* Bean-Bean */ = { + isa = PBXNativeTarget; + buildConfigurationList = 372A35D5401FDC8E010FAA868F11E97C /* Build configuration list for PBXNativeTarget "Bean-Bean" */; + buildPhases = ( + 88D17B0F61582E2AC7F6DEAEDDC7BBD5 /* Sources */, + D6B3D0C91104C8F222ACF67B63C3CFF7 /* Frameworks */, + 4FB428196246C51463F030639F517DDC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Bean-Bean"; + productName = "Bean-Bean"; + productReference = BB9399BC5C766ABCACD926BF6F14738A /* Bean.bundle */; + productType = "com.apple.product-type.bundle"; + }; + F4FA04A21C25901700F2E51A /* BeanTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = F4FA04AB1C25901700F2E51A /* Build configuration list for PBXNativeTarget "BeanTests" */; + buildPhases = ( + F4FA049F1C25901700F2E51A /* Sources */, + F4FA04A01C25901700F2E51A /* Frameworks */, + F4FA04A11C25901700F2E51A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + F4FA04AA1C25901700F2E51A /* PBXTargetDependency */, + ); + name = BeanTests; + productName = BeanTests; + productReference = F4FA04A31C25901700F2E51A /* BeanTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + FE7635FF56BC35DC7C91635F6F903EBD /* Pods-Bean_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8A83FDD7757506E890D7F1B6B3235C27 /* Build configuration list for PBXNativeTarget "Pods-Bean_Example" */; + buildPhases = ( + FABF15D6A419C4C86E193AF359B6CDBD /* Sources */, + 88C915B0826FD34899E27B00A3461F4B /* Frameworks */, + 74EE7E5891C18EBC6BAA61EB27B41EB8 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + FEB897E23E6644FE23394CAE758EDD62 /* PBXTargetDependency */, + ); + name = "Pods-Bean_Example"; + productName = "Pods-Bean_Example"; + productReference = 73D86E2AA9CA9B3CA7E79B6476E6FD65 /* Pods_Bean_Example.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0710; + LastUpgradeCheck = 0700; + TargetAttributes = { + F4FA04A21C25901700F2E51A = { + CreatedOnToolsVersion = 7.1; + }; + }; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = D7C88DFCB13012B7BE6B56066C5231DC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 75205AB906EE46E8D2809AC7B960EFE1 /* Bean */, + E4B796057B4743CA97F682DE852BAA09 /* Bean-Bean */, + FE7635FF56BC35DC7C91635F6F903EBD /* Pods-Bean_Example */, + 521372DA592D8D455FFD44AB768FB8F3 /* Pods-Bean_Tests */, + F4FA04A21C25901700F2E51A /* BeanTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 01AD9165D9370476E4981614078DA1D5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9DB03CB4A2A0CE80A3C38802CFAC9DB4 /* Bean.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4FB428196246C51463F030639F517DDC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F4FA04A11C25901700F2E51A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 88D17B0F61582E2AC7F6DEAEDDC7BBD5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8DC8095165C196172F59A39EFA3D1398 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6291A6AD44281C14A8F346C0E10BE826 /* Bean-dummy.m in Sources */, + 793CF8B68F2F5288A3CB6ADF8B963353 /* Bean.swift in Sources */, + 9E813DB2D26135DE3631EF6371E079C7 /* Cache.swift in Sources */, + 8B05BBDE83945E05C0200D25A8804107 /* Downloader.swift in Sources */, + 2A137BF732395AC4C46CB4F67D3B37D0 /* UIImageView+Bean.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E56FF255A88DBFCD1A58BD25D4970AB9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0D9D6B4CD66E14DA6038A7E7AE842342 /* Pods-Bean_Tests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F4FA049F1C25901700F2E51A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F4FA04A61C25901700F2E51A /* BeanTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FABF15D6A419C4C86E193AF359B6CDBD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 40DA0CEE627283B11807FFFE385CE08C /* Pods-Bean_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 34B1E4E3A9BD7ECA52EA8A1C0262569A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Bean-Bean"; + target = E4B796057B4743CA97F682DE852BAA09 /* Bean-Bean */; + targetProxy = F9347906425F992BB733B4DCF59A3A50 /* PBXContainerItemProxy */; + }; + EF1DB72D29263887D4CB3C9F09A9A6E8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Bean; + target = 75205AB906EE46E8D2809AC7B960EFE1 /* Bean */; + targetProxy = C6FFD9D1D17053A27D646763EF03F35C /* PBXContainerItemProxy */; + }; + F4FA04AA1C25901700F2E51A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 75205AB906EE46E8D2809AC7B960EFE1 /* Bean */; + targetProxy = F4FA04A91C25901700F2E51A /* PBXContainerItemProxy */; + }; + FEB897E23E6644FE23394CAE758EDD62 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Bean; + target = 75205AB906EE46E8D2809AC7B960EFE1 /* Bean */; + targetProxy = BCB3AE611A005B5E8CCCE92DBECBC719 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 07C7A8E965A34AE799E4C535C5B77E90 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 87CC761C92FE01BC08A044063A94BECC /* Pods-Bean_Example.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-Bean_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Bean_Example/Pods-Bean_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_Bean_Example; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 235A9C90C5B909072AD685823248C89C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BE87A33DB2BAC8D5EEB03708366DD13D /* Bean.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Bean/Bean-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Bean/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Bean/Bean.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Bean; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 506100BBB77214932AC7128E612EBB33 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 536990617228025604EC2B55C10FEFAE /* Pods-Bean_Example.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-Bean_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Bean_Example/Pods-Bean_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_Bean_Example; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 5090DF89B70800D49641F63A38FC62A0 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BE87A33DB2BAC8D5EEB03708366DD13D /* Bean.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + PRODUCT_NAME = Bean; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 552D02D5BA751AC2E8790D2811D496CA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + 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; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + ONLY_ACTIVE_ARCH = YES; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 581A40404B5AEF5B6E0CC494617DA787 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BE87A33DB2BAC8D5EEB03708366DD13D /* Bean.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + PRODUCT_NAME = Bean; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 86DE7A328CFF06871E2C436E0E3FE10A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CF48DCA253407E86F626CC746737BAE9 /* Pods-Bean_Tests.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-Bean_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_Bean_Tests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + A2F4C7EF444BD064111DDC838CF4F2E6 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0E3E309E019CF20FA01468A43349EB9A /* Pods-Bean_Tests.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-Bean_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_Bean_Tests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + C156F8D4BE5D1E251C8FC6D569A66682 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BE87A33DB2BAC8D5EEB03708366DD13D /* Bean.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Bean/Bean-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Bean/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Bean/Bean.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Bean; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + F4FA04AC1C25901700F2E51A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = BeanTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.prabaharan.mindvalley.BeanTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + F4FA04AD1C25901700F2E51A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = BeanTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.prabaharan.mindvalley.BeanTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0B5022575F5897EBDC6EBD0B281386DE /* Build configuration list for PBXNativeTarget "Bean" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C156F8D4BE5D1E251C8FC6D569A66682 /* Debug */, + 235A9C90C5B909072AD685823248C89C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 552D02D5BA751AC2E8790D2811D496CA /* Debug */, + 10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 372A35D5401FDC8E010FAA868F11E97C /* Build configuration list for PBXNativeTarget "Bean-Bean" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5090DF89B70800D49641F63A38FC62A0 /* Debug */, + 581A40404B5AEF5B6E0CC494617DA787 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8A83FDD7757506E890D7F1B6B3235C27 /* Build configuration list for PBXNativeTarget "Pods-Bean_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 07C7A8E965A34AE799E4C535C5B77E90 /* Debug */, + 506100BBB77214932AC7128E612EBB33 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E23ED42D797E6866225C855DAA296839 /* Build configuration list for PBXNativeTarget "Pods-Bean_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A2F4C7EF444BD064111DDC838CF4F2E6 /* Debug */, + 86DE7A328CFF06871E2C436E0E3FE10A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F4FA04AB1C25901700F2E51A /* Build configuration list for PBXNativeTarget "BeanTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F4FA04AC1C25901700F2E51A /* Debug */, + F4FA04AD1C25901700F2E51A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Bean.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Bean.xcscheme new file mode 100644 index 0000000..128ef37 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Bean.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Pods/Target Support Files/Bean/Bean-dummy.m b/Example/Pods/Target Support Files/Bean/Bean-dummy.m new file mode 100644 index 0000000..6c6f6b5 --- /dev/null +++ b/Example/Pods/Target Support Files/Bean/Bean-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Bean : NSObject +@end +@implementation PodsDummy_Bean +@end diff --git a/Example/Pods/Target Support Files/Bean/Bean-prefix.pch b/Example/Pods/Target Support Files/Bean/Bean-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Example/Pods/Target Support Files/Bean/Bean-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Example/Pods/Target Support Files/Bean/Bean-umbrella.h b/Example/Pods/Target Support Files/Bean/Bean-umbrella.h new file mode 100644 index 0000000..59b3c5c --- /dev/null +++ b/Example/Pods/Target Support Files/Bean/Bean-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double BeanVersionNumber; +FOUNDATION_EXPORT const unsigned char BeanVersionString[]; + diff --git a/Example/Pods/Target Support Files/Bean/Bean.modulemap b/Example/Pods/Target Support Files/Bean/Bean.modulemap new file mode 100644 index 0000000..ca19d66 --- /dev/null +++ b/Example/Pods/Target Support Files/Bean/Bean.modulemap @@ -0,0 +1,6 @@ +framework module Bean { + umbrella header "Bean-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Bean/Bean.xcconfig b/Example/Pods/Target Support Files/Bean/Bean.xcconfig new file mode 100644 index 0000000..9cf487e --- /dev/null +++ b/Example/Pods/Target Support Files/Bean/Bean.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Bean" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Bean/Info.plist b/Example/Pods/Target Support Files/Bean/Info.plist new file mode 100644 index 0000000..4ba5fa2 --- /dev/null +++ b/Example/Pods/Target Support Files/Bean/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Info.plist b/Example/Pods/Target Support Files/Pods-Bean_Example/Info.plist new file mode 100644 index 0000000..6974542 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-acknowledgements.markdown new file mode 100644 index 0000000..66f750e --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## Bean + +Copyright (c) 2015 Prabaharan + +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. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-acknowledgements.plist new file mode 100644 index 0000000..9ff916b --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-acknowledgements.plist @@ -0,0 +1,56 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 Prabaharan <prabaharan.e@payoda.com> + +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. + + Title + Bean + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-dummy.m b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-dummy.m new file mode 100644 index 0000000..c56e1d3 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Bean_Example : NSObject +@end +@implementation PodsDummy_Pods_Bean_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-frameworks.sh new file mode 100755 index 0000000..4167595 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-frameworks.sh @@ -0,0 +1,91 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "Pods-Bean_Example/Bean.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "Pods-Bean_Example/Bean.framework" +fi diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-resources.sh b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-resources.sh new file mode 100755 index 0000000..16774fb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-resources.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-umbrella.h new file mode 100644 index 0000000..d8c5ae5 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double Pods_Bean_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_Bean_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.debug.xcconfig new file mode 100644 index 0000000..2437c10 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.debug.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Bean.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Bean" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Bean_Example +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.modulemap b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.modulemap new file mode 100644 index 0000000..52a2d9b --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_Bean_Example { + umbrella header "Pods-Bean_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.release.xcconfig new file mode 100644 index 0000000..2437c10 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Example/Pods-Bean_Example.release.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Bean.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Bean" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Bean_Example +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-Bean_Tests/Info.plist new file mode 100644 index 0000000..6974542 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-acknowledgements.markdown new file mode 100644 index 0000000..66f750e --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## Bean + +Copyright (c) 2015 Prabaharan + +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. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-acknowledgements.plist new file mode 100644 index 0000000..9ff916b --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-acknowledgements.plist @@ -0,0 +1,56 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 Prabaharan <prabaharan.e@payoda.com> + +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. + + Title + Bean + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-dummy.m new file mode 100644 index 0000000..c483c7b --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Bean_Tests : NSObject +@end +@implementation PodsDummy_Pods_Bean_Tests +@end diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-frameworks.sh new file mode 100755 index 0000000..0ad032d --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-frameworks.sh @@ -0,0 +1,91 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "Pods-Bean_Tests/Bean.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "Pods-Bean_Tests/Bean.framework" +fi diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-resources.sh new file mode 100755 index 0000000..16774fb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-resources.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-umbrella.h new file mode 100644 index 0000000..ab44de5 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double Pods_Bean_TestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_Bean_TestsVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.debug.xcconfig new file mode 100644 index 0000000..0fa6365 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.debug.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Bean.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Bean" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Bean_Tests +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.modulemap b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.modulemap new file mode 100644 index 0000000..92a5a73 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_Bean_Tests { + umbrella header "Pods-Bean_Tests-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.release.xcconfig new file mode 100644 index 0000000..0fa6365 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Bean_Tests/Pods-Bean_Tests.release.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Bean.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Bean" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Bean_Tests +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Tests/Info.plist b/Example/Tests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/Example/Tests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift new file mode 100644 index 0000000..4b18fcc --- /dev/null +++ b/Example/Tests/Tests.swift @@ -0,0 +1,23 @@ +import UIKit +import XCTest +import Bean + + +class Tests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + XCTAssert(true, "Pass") + } + +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1fc6e15 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Prabaharan + +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. diff --git a/Pod/Assets/.gitkeep b/Pod/Assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Pod/Classes/.gitkeep b/Pod/Classes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Pod/Classes/Bean.swift b/Pod/Classes/Bean.swift new file mode 100644 index 0000000..6d6f3cc --- /dev/null +++ b/Pod/Classes/Bean.swift @@ -0,0 +1,31 @@ +// +// Bean.swift +// Pods +// +// Created by Prabaharan Elangovan on 17/12/15. +// +// + +import Foundation + + +/** + Creates an downloader object using the url passed + - parameter url: The NSURL object containing the romte file location + - returns: The Downloader request. + */ + +public func download(url: NSURL) -> Downloader { + return Downloader(url: url) +} + + +/** + Creates an downloader object using the url passed. But with an option of caching teh data downloaded + - parameter url: The NSURL object containing the remote file location + - parameter shouldCache: The Boolean value indicating whether to catch yet to be downloaded files + - returns: The Downloader request. + */ +public func download(url: NSURL, shouldCache: Bool) -> Downloader { + return Downloader(url: url, shouldCache: shouldCache) +} diff --git a/Pod/Classes/Cache.swift b/Pod/Classes/Cache.swift new file mode 100644 index 0000000..622f653 --- /dev/null +++ b/Pod/Classes/Cache.swift @@ -0,0 +1,73 @@ +// +// BeanBag.swift +// Pods +// +// Created by Prabaharan Elangovan on 17/12/15. +// +// + +import Foundation + +/** + Cache is a lightweight wrapper around NSCache +*/ +public class Cache { + + static public let sharedCache = Cache() //Singleton + + let cache = NSCache() + +//MARK: Initializers + + init(cacheCountLimit: Int, cacheSizeLimit: Int) { + cache.countLimit = cacheCountLimit + cache.totalCostLimit = cacheSizeLimit + } + + convenience init(){ + self.init(cacheCountLimit: 0,cacheSizeLimit: 0) + } + +//MARK: Public Methods + + public func storeImage(image: UIImage, url: String) { + cache.setObject(image, forKey: url) + } + + public func storeAnyObject(any: AnyObject, url: String) { + cache.setObject(any, forKey: url) + } + + public func getJson(url: String) -> [String: AnyObject]? { + if let obj = cache.objectForKey(url) { + return obj as? [String: AnyObject] + } + return nil + } + + public func getData(url: String) -> NSData? { + if let obj = cache.objectForKey(url) { + return obj as? NSData + } + return nil + } + + public func clearCache() { + cache.removeAllObjects() + } + + public func getImage(url: String) -> UIImage? { + + if let obj = cache.objectForKey(url) { + switch (obj.self) { + case is UIImage: + return obj as? UIImage + case is NSData: + return UIImage(data: obj as! NSData) + default : + return nil + } + } + return nil + } +} diff --git a/Pod/Classes/Downloader.swift b/Pod/Classes/Downloader.swift new file mode 100644 index 0000000..b33c8c7 --- /dev/null +++ b/Pod/Classes/Downloader.swift @@ -0,0 +1,139 @@ +// +// Downloader.swift +// Pods +// +// Created by Prabaharan Elangovan on 17/12/15. +// +// + +import Foundation + +public class Downloader: NSObject { + +//MARK: Properties + var session: NSURLSession + let url: NSURL + var isCaching: Bool + +//MARK: Initializers + init(url: NSURL, shouldCache: Bool) { + session = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration()) + self.url = url + self.isCaching = shouldCache + super.init() + } + + convenience init(url: NSURL) { + self.init(url: url, shouldCache: true) + } + +//MARK: Internal methods + + func download(completion: (data: NSData?, error : NSError?) -> Void) { + print("Downloading: \(url.absoluteString)") + session.dataTaskWithURL(url, completionHandler: { (data, response, error) -> Void in + print("Downloading Finished: \(self.url.absoluteString)") + print("Downloading Finished: Error \(error)") + if (error != nil) { + completion(data: nil, error: error) + } + if let _ = data { + completion(data: data, error: nil) + } + self.session.finishTasksAndInvalidate() + }).resume() + + } + + func storeInCache(obj: AnyObject){ + if self.isCaching { + Cache.sharedCache.storeAnyObject(obj, url: url.absoluteString) + } + } + + + + +//MARK: Public Methods + public func getData(completion: (url: NSURL, data: NSData?, error : NSError?) -> Void) { + self.download{ (data, error) -> Void in + dispatch_async(dispatch_get_main_queue()) { + if error == nil , let _ = data{ + self.storeInCache(data!) + } + completion(url: self.url, data: data, error: error) + } + } + } + + + + public func getImage(completion: (url: NSURL, image: UIImage?, error : NSError?) -> Void) { + //The reason for dispatching it in mainqueue is + //When the completion block is execute user tend to apply the image to a UIControl so in that case they have to dispatch the main queue to update the UI. But we reduce the overhead for them to use the GCD. + if let cachedImage = Cache.sharedCache.getImage(self.url.absoluteString) { + dispatch_async(dispatch_get_main_queue()) { + completion(url: self.url, image: cachedImage, error: nil) + } + return + } + else{ + download{ (data, error) -> Void in + dispatch_async(dispatch_get_main_queue()) { + if let thisData = data, let currentImage = UIImage(data: thisData) { + self.storeInCache(currentImage) + completion(url: self.url, image: currentImage, error: nil) + } + else { + completion(url: self.url, image: nil, error: NSError(domain: "BeanError", code: -8000, userInfo: nil)) + } + } + } + } + } + + //For getting the JSON objects + public func getJSON(completion: (url: NSURL, json: [String: AnyObject]?, error : NSError?) -> Void) { + if let cachedJson = Cache.sharedCache.getJson(self.url.absoluteString) { + //Returns Cached JSON + dispatch_async(dispatch_get_main_queue()) { + completion(url: self.url, json: cachedJson, error: nil) + return + } + } + else{ + download{ (data, error) -> Void in + do{ + //Converts data into JSON by serialization + if let thisData = data, let json = try NSJSONSerialization.JSONObjectWithData(thisData, options:.AllowFragments) as? [String: AnyObject] { + self.storeInCache(json) + completion(url: self.url, json: json, error: nil) + } + else { + completion(url: self.url, json: nil, error: error) + } + } + catch let jsonError as NSError { + completion(url: self.url, json: nil, error: jsonError) + } + } + } + } + + public func cancel(url: NSURL){ + //Iterate through all the tasks and cancel the task with the url + session.getTasksWithCompletionHandler { (dataTasks, uploadTasks, downloadTasks) -> Void in + let tasks = dataTasks.filter({ (currentTask) -> Bool in + print(currentTask.originalRequest?.URL) + return (currentTask.originalRequest?.URL == url) + }) + for task in tasks { + task.cancel() + } + } + } + + +} + + diff --git a/Pod/Classes/UIImageView+Bean.swift b/Pod/Classes/UIImageView+Bean.swift new file mode 100644 index 0000000..b802e88 --- /dev/null +++ b/Pod/Classes/UIImageView+Bean.swift @@ -0,0 +1,46 @@ +// +// BeanExtensions.swift +// Pods +// +// Created by Prabaharan Elangovan on 17/12/15. +// +// + +import Foundation + +/** + Extension for Imageview class +*/ +public extension UIImageView { + + public func setImageWithUrl(url: NSURL, completion: (error : NSError?) -> Void) { + self.setImageWithUrl(url, placeholderImage: nil, completion: completion) + } + + public func setImageWithUrl(url: NSURL) { + self.setImageWithUrl(url, placeholderImage: nil, completion: nil) + } + + public func setImageWithUrl(url: NSURL, placeholderImage: UIImage? = nil, completion: ((error : NSError?) -> Void)?) { + + self.image = nil + if let _ = placeholderImage { + self.image = placeholderImage + } + download(url).getImage { (url, image, error) -> Void in + if error == nil , let _ = image { + self.image = image! + Cache.sharedCache.storeImage(image!, url: url.absoluteString) + if let _ = completion { + completion!(error: nil) + } + } + else{ + if let _ = completion { + completion!(error: error) + } + } + } + } +} + diff --git a/README.md b/README.md new file mode 100644 index 0000000..59e9c2b --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Bean + +[![CI Status](http://img.shields.io/travis/Prabaharan/Bean.svg?style=flat)](https://travis-ci.org/Prabaharan/Bean) +[![Version](https://img.shields.io/cocoapods/v/Bean.svg?style=flat)](http://cocoapods.org/pods/Bean) +[![License](https://img.shields.io/cocoapods/l/Bean.svg?style=flat)](http://cocoapods.org/pods/Bean) +[![Platform](https://img.shields.io/cocoapods/p/Bean.svg?style=flat)](http://cocoapods.org/pods/Bean) + +## Usage + +To run the example project, clone the repo, and run `pod install` from the Example directory first. + +## Requirements + +## Installation + +Bean is available through [CocoaPods](http://cocoapods.org). To install +it, simply add the following line to your Podfile: + +```ruby +pod "Bean" +``` + +## Author + +Prabaharan, prabaharan.e@payoda.com + +## License + +Bean is available under the MIT license. See the LICENSE file for more info. diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj new file mode 120000 index 0000000..3c5a8e7 --- /dev/null +++ b/_Pods.xcodeproj @@ -0,0 +1 @@ +Example/Pods/Pods.xcodeproj \ No newline at end of file