diff --git a/.gitignore b/LeadKit/.gitignore similarity index 85% rename from .gitignore rename to LeadKit/.gitignore index a5267031..39642d17 100644 --- a/.gitignore +++ b/LeadKit/.gitignore @@ -27,6 +27,10 @@ xcuserdata *.hmap *.ipa +## Playgrounds +timeline.xctimeline +playground.xcworkspace + # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. @@ -39,12 +43,12 @@ xcuserdata # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -# Pods/ +Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts +Carthage/Checkouts Carthage/Build @@ -58,7 +62,10 @@ Carthage/Build fastlane/report.xml fastlane/screenshots -#ignore all pods directory -Pods/ + +# AppCode +# https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems .idea/workspace.xml +.idea/tasks.xml + diff --git a/iOS-Base-Library/.swiftlint.yml b/LeadKit/.swiftlint.yml similarity index 83% rename from iOS-Base-Library/.swiftlint.yml rename to LeadKit/.swiftlint.yml index a9a887eb..8b98be46 100644 --- a/iOS-Base-Library/.swiftlint.yml +++ b/LeadKit/.swiftlint.yml @@ -4,4 +4,4 @@ disabled_rules: excluded: - Carthage - Pods -line_length: 128 +line_length: 128 \ No newline at end of file diff --git a/LeadKit/.tailor.yml b/LeadKit/.tailor.yml new file mode 100644 index 00000000..a4606163 --- /dev/null +++ b/LeadKit/.tailor.yml @@ -0,0 +1,3 @@ +exclude: + - 'Pods' + - 'Carthage' \ No newline at end of file diff --git a/LeadKit/Cartfile b/LeadKit/Cartfile new file mode 100644 index 00000000..e5683d98 --- /dev/null +++ b/LeadKit/Cartfile @@ -0,0 +1 @@ +github "CocoaLumberjack/CocoaLumberjack" \ No newline at end of file diff --git a/LeadKit/Cartfile.resolved b/LeadKit/Cartfile.resolved new file mode 100644 index 00000000..bfc8d2e4 --- /dev/null +++ b/LeadKit/Cartfile.resolved @@ -0,0 +1 @@ +github "CocoaLumberjack/CocoaLumberjack" "2.2.0" diff --git a/LeadKit/LeadKit.xcodeproj/project.pbxproj b/LeadKit/LeadKit.xcodeproj/project.pbxproj new file mode 100644 index 00000000..53ff7da8 --- /dev/null +++ b/LeadKit/LeadKit.xcodeproj/project.pbxproj @@ -0,0 +1,538 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7830C4151C6B337D00180D02 /* CocoaLumberjack.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7830C4141C6B337D00180D02 /* CocoaLumberjack.framework */; }; + 7830C4171C6B33F900180D02 /* CocoaLumberjackSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7830C4161C6B33F900180D02 /* CocoaLumberjackSwift.framework */; }; + 78A74EA91C6B373700FE9724 /* UIView+DefaultNibName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78A74EA81C6B373700FE9724 /* UIView+DefaultNibName.swift */; }; + 78A74EAD1C6B408C00FE9724 /* ViewModelBuilderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78A74EAC1C6B408C00FE9724 /* ViewModelBuilderProtocol.swift */; }; + 78B0FC7D1C6B2BE200358B64 /* LogFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78B0FC7C1C6B2BE200358B64 /* LogFormatter.swift */; }; + 78B0FC7F1C6B2C4D00358B64 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78B0FC7E1C6B2C4D00358B64 /* Log.swift */; }; + 78B0FC811C6B2CD500358B64 /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78B0FC801C6B2CD500358B64 /* App.swift */; }; + 78CFEE2E1C5C456B00F50370 /* LeadKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 78CFEE2D1C5C456B00F50370 /* LeadKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 78CFEE351C5C456B00F50370 /* LeadKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78CFEE2A1C5C456B00F50370 /* LeadKit.framework */; }; + 78CFEE3A1C5C456B00F50370 /* LeadKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE391C5C456B00F50370 /* LeadKitTests.swift */; }; + 78CFEE511C5C45E500F50370 /* UIStoryboard+InstantiateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE451C5C45E500F50370 /* UIStoryboard+InstantiateViewController.swift */; }; + 78CFEE521C5C45E500F50370 /* UITableView+CellRegistration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE461C5C45E500F50370 /* UITableView+CellRegistration.swift */; }; + 78CFEE531C5C45E500F50370 /* UITableView+DequeueCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE471C5C45E500F50370 /* UITableView+DequeueCustomCell.swift */; }; + 78CFEE541C5C45E500F50370 /* UIView+LoadFromNib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE481C5C45E500F50370 /* UIView+LoadFromNib.swift */; }; + 78CFEE551C5C45E500F50370 /* NibNameProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE4A1C5C45E500F50370 /* NibNameProtocol.swift */; }; + 78CFEE561C5C45E500F50370 /* ReuseIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE4B1C5C45E500F50370 /* ReuseIdentifierProtocol.swift */; }; + 78CFEE571C5C45E500F50370 /* StaticNibNameProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE4C1C5C45E500F50370 /* StaticNibNameProtocol.swift */; }; + 78CFEE581C5C45E500F50370 /* StaticViewHeightProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE4D1C5C45E500F50370 /* StaticViewHeightProtocol.swift */; }; + 78CFEE591C5C45E500F50370 /* StoryboardIdentifierProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE4E1C5C45E500F50370 /* StoryboardIdentifierProtocol.swift */; }; + 78CFEE5A1C5C45E500F50370 /* ViewHeightProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE4F1C5C45E500F50370 /* ViewHeightProtocol.swift */; }; + 78CFEE5B1C5C45E500F50370 /* ViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CFEE501C5C45E500F50370 /* ViewModelProtocol.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 78CFEE361C5C456B00F50370 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78CFEE211C5C456B00F50370 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 78CFEE291C5C456B00F50370; + remoteInfo = LeadKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 7830C4141C6B337D00180D02 /* CocoaLumberjack.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CocoaLumberjack.framework; path = Carthage/Build/iOS/CocoaLumberjack.framework; sourceTree = SOURCE_ROOT; }; + 7830C4161C6B33F900180D02 /* CocoaLumberjackSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CocoaLumberjackSwift.framework; path = Carthage/Build/iOS/CocoaLumberjackSwift.framework; sourceTree = SOURCE_ROOT; }; + 78A74EA81C6B373700FE9724 /* UIView+DefaultNibName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+DefaultNibName.swift"; sourceTree = ""; }; + 78A74EAC1C6B408C00FE9724 /* ViewModelBuilderProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewModelBuilderProtocol.swift; sourceTree = ""; }; + 78B0FC7C1C6B2BE200358B64 /* LogFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogFormatter.swift; sourceTree = ""; }; + 78B0FC7E1C6B2C4D00358B64 /* Log.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = ""; }; + 78B0FC801C6B2CD500358B64 /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = ""; }; + 78CFEE2A1C5C456B00F50370 /* LeadKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LeadKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 78CFEE2D1C5C456B00F50370 /* LeadKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LeadKit.h; sourceTree = ""; }; + 78CFEE2F1C5C456B00F50370 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 78CFEE341C5C456B00F50370 /* LeadKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LeadKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 78CFEE391C5C456B00F50370 /* LeadKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeadKitTests.swift; sourceTree = ""; }; + 78CFEE3B1C5C456B00F50370 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 78CFEE451C5C45E500F50370 /* UIStoryboard+InstantiateViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIStoryboard+InstantiateViewController.swift"; sourceTree = ""; }; + 78CFEE461C5C45E500F50370 /* UITableView+CellRegistration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+CellRegistration.swift"; sourceTree = ""; }; + 78CFEE471C5C45E500F50370 /* UITableView+DequeueCustomCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+DequeueCustomCell.swift"; sourceTree = ""; }; + 78CFEE481C5C45E500F50370 /* UIView+LoadFromNib.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+LoadFromNib.swift"; sourceTree = ""; }; + 78CFEE4A1C5C45E500F50370 /* NibNameProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NibNameProtocol.swift; sourceTree = ""; }; + 78CFEE4B1C5C45E500F50370 /* ReuseIdentifierProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReuseIdentifierProtocol.swift; sourceTree = ""; }; + 78CFEE4C1C5C45E500F50370 /* StaticNibNameProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaticNibNameProtocol.swift; sourceTree = ""; }; + 78CFEE4D1C5C45E500F50370 /* StaticViewHeightProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaticViewHeightProtocol.swift; sourceTree = ""; }; + 78CFEE4E1C5C45E500F50370 /* StoryboardIdentifierProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardIdentifierProtocol.swift; sourceTree = ""; }; + 78CFEE4F1C5C45E500F50370 /* ViewHeightProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewHeightProtocol.swift; sourceTree = ""; }; + 78CFEE501C5C45E500F50370 /* ViewModelProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewModelProtocol.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 78CFEE261C5C456B00F50370 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7830C4171C6B33F900180D02 /* CocoaLumberjackSwift.framework in Frameworks */, + 7830C4151C6B337D00180D02 /* CocoaLumberjack.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 78CFEE311C5C456B00F50370 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 78CFEE351C5C456B00F50370 /* LeadKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7830C4131C6B336A00180D02 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7830C4141C6B337D00180D02 /* CocoaLumberjack.framework */, + 7830C4161C6B33F900180D02 /* CocoaLumberjackSwift.framework */, + ); + path = Frameworks; + sourceTree = ""; + }; + 78A74EAA1C6B401800FE9724 /* Classes */ = { + isa = PBXGroup; + children = ( + 78B0FC7B1C6B2BAE00358B64 /* Logging */, + ); + path = Classes; + sourceTree = ""; + }; + 78B0FC7B1C6B2BAE00358B64 /* Logging */ = { + isa = PBXGroup; + children = ( + 78B0FC7C1C6B2BE200358B64 /* LogFormatter.swift */, + 78B0FC7E1C6B2C4D00358B64 /* Log.swift */, + 78B0FC801C6B2CD500358B64 /* App.swift */, + ); + path = Logging; + sourceTree = ""; + }; + 78CFEE201C5C456B00F50370 = { + isa = PBXGroup; + children = ( + 78CFEE2C1C5C456B00F50370 /* LeadKit */, + 78CFEE381C5C456B00F50370 /* LeadKitTests */, + 78CFEE2B1C5C456B00F50370 /* Products */, + ); + sourceTree = ""; + }; + 78CFEE2B1C5C456B00F50370 /* Products */ = { + isa = PBXGroup; + children = ( + 78CFEE2A1C5C456B00F50370 /* LeadKit.framework */, + 78CFEE341C5C456B00F50370 /* LeadKitTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 78CFEE2C1C5C456B00F50370 /* LeadKit */ = { + isa = PBXGroup; + children = ( + 7830C4131C6B336A00180D02 /* Frameworks */, + 78A74EAA1C6B401800FE9724 /* Classes */, + 78CFEE441C5C45E500F50370 /* Extensions */, + 78CFEE491C5C45E500F50370 /* Protocols */, + 78CFEE2D1C5C456B00F50370 /* LeadKit.h */, + 78CFEE2F1C5C456B00F50370 /* Info.plist */, + ); + path = LeadKit; + sourceTree = ""; + }; + 78CFEE381C5C456B00F50370 /* LeadKitTests */ = { + isa = PBXGroup; + children = ( + 78CFEE391C5C456B00F50370 /* LeadKitTests.swift */, + 78CFEE3B1C5C456B00F50370 /* Info.plist */, + ); + path = LeadKitTests; + sourceTree = ""; + }; + 78CFEE441C5C45E500F50370 /* Extensions */ = { + isa = PBXGroup; + children = ( + 78CFEE451C5C45E500F50370 /* UIStoryboard+InstantiateViewController.swift */, + 78CFEE461C5C45E500F50370 /* UITableView+CellRegistration.swift */, + 78CFEE471C5C45E500F50370 /* UITableView+DequeueCustomCell.swift */, + 78CFEE481C5C45E500F50370 /* UIView+LoadFromNib.swift */, + 78A74EA81C6B373700FE9724 /* UIView+DefaultNibName.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 78CFEE491C5C45E500F50370 /* Protocols */ = { + isa = PBXGroup; + children = ( + 78CFEE4C1C5C45E500F50370 /* StaticNibNameProtocol.swift */, + 78CFEE4A1C5C45E500F50370 /* NibNameProtocol.swift */, + 78CFEE4B1C5C45E500F50370 /* ReuseIdentifierProtocol.swift */, + 78CFEE4E1C5C45E500F50370 /* StoryboardIdentifierProtocol.swift */, + 78CFEE4D1C5C45E500F50370 /* StaticViewHeightProtocol.swift */, + 78CFEE4F1C5C45E500F50370 /* ViewHeightProtocol.swift */, + 78CFEE501C5C45E500F50370 /* ViewModelProtocol.swift */, + 78A74EAC1C6B408C00FE9724 /* ViewModelBuilderProtocol.swift */, + ); + path = Protocols; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 78CFEE271C5C456B00F50370 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 78CFEE2E1C5C456B00F50370 /* LeadKit.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 78CFEE291C5C456B00F50370 /* LeadKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 78CFEE3E1C5C456B00F50370 /* Build configuration list for PBXNativeTarget "LeadKit" */; + buildPhases = ( + 78CFEE251C5C456B00F50370 /* Sources */, + 78CFEE261C5C456B00F50370 /* Frameworks */, + 78CFEE271C5C456B00F50370 /* Headers */, + 78CFEE281C5C456B00F50370 /* Resources */, + 78B0FC871C6B314B00358B64 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LeadKit; + productName = LeadKit; + productReference = 78CFEE2A1C5C456B00F50370 /* LeadKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 78CFEE331C5C456B00F50370 /* LeadKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 78CFEE411C5C456B00F50370 /* Build configuration list for PBXNativeTarget "LeadKitTests" */; + buildPhases = ( + 78CFEE301C5C456B00F50370 /* Sources */, + 78CFEE311C5C456B00F50370 /* Frameworks */, + 78CFEE321C5C456B00F50370 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 78CFEE371C5C456B00F50370 /* PBXTargetDependency */, + ); + name = LeadKitTests; + productName = LeadKitTests; + productReference = 78CFEE341C5C456B00F50370 /* LeadKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 78CFEE211C5C456B00F50370 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Touch Instinct"; + TargetAttributes = { + 78CFEE291C5C456B00F50370 = { + CreatedOnToolsVersion = 7.2; + }; + 78CFEE331C5C456B00F50370 = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 78CFEE241C5C456B00F50370 /* Build configuration list for PBXProject "LeadKit" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 78CFEE201C5C456B00F50370; + productRefGroup = 78CFEE2B1C5C456B00F50370 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 78CFEE291C5C456B00F50370 /* LeadKit */, + 78CFEE331C5C456B00F50370 /* LeadKitTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 78CFEE281C5C456B00F50370 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 78CFEE321C5C456B00F50370 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 78B0FC871C6B314B00358B64 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/Carthage/Build/iOS/CocoaLumberjack.framework", + "$(SRCROOT)/Carthage/Build/iOS/CocoaLumberjackSwift.framework", + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/usr/local/bin/carthage copy-frameworks"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 78CFEE251C5C456B00F50370 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 78CFEE541C5C45E500F50370 /* UIView+LoadFromNib.swift in Sources */, + 78CFEE521C5C45E500F50370 /* UITableView+CellRegistration.swift in Sources */, + 78B0FC7F1C6B2C4D00358B64 /* Log.swift in Sources */, + 78CFEE571C5C45E500F50370 /* StaticNibNameProtocol.swift in Sources */, + 78CFEE531C5C45E500F50370 /* UITableView+DequeueCustomCell.swift in Sources */, + 78B0FC811C6B2CD500358B64 /* App.swift in Sources */, + 78CFEE551C5C45E500F50370 /* NibNameProtocol.swift in Sources */, + 78CFEE511C5C45E500F50370 /* UIStoryboard+InstantiateViewController.swift in Sources */, + 78CFEE561C5C45E500F50370 /* ReuseIdentifierProtocol.swift in Sources */, + 78CFEE5B1C5C45E500F50370 /* ViewModelProtocol.swift in Sources */, + 78CFEE5A1C5C45E500F50370 /* ViewHeightProtocol.swift in Sources */, + 78A74EA91C6B373700FE9724 /* UIView+DefaultNibName.swift in Sources */, + 78CFEE581C5C45E500F50370 /* StaticViewHeightProtocol.swift in Sources */, + 78CFEE591C5C45E500F50370 /* StoryboardIdentifierProtocol.swift in Sources */, + 78A74EAD1C6B408C00FE9724 /* ViewModelBuilderProtocol.swift in Sources */, + 78B0FC7D1C6B2BE200358B64 /* LogFormatter.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 78CFEE301C5C456B00F50370 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 78CFEE3A1C5C456B00F50370 /* LeadKitTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 78CFEE371C5C456B00F50370 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 78CFEE291C5C456B00F50370 /* LeadKit */; + targetProxy = 78CFEE361C5C456B00F50370 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 78CFEE3C1C5C456B00F50370 /* 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; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + 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_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 = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 78CFEE3D1C5C456B00F50370 /* 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; + CURRENT_PROJECT_VERSION = 1; + 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 = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 78CFEE3F1C5C456B00F50370 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LeadKit", + "$(PROJECT_DIR)/LeadKit/Frameworks", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = LeadKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.LeadKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 78CFEE401C5C456B00F50370 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LeadKit", + "$(PROJECT_DIR)/LeadKit/Frameworks", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = LeadKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.LeadKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 78CFEE421C5C456B00F50370 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = LeadKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.LeadKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 78CFEE431C5C456B00F50370 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = LeadKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.LeadKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 78CFEE241C5C456B00F50370 /* Build configuration list for PBXProject "LeadKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 78CFEE3C1C5C456B00F50370 /* Debug */, + 78CFEE3D1C5C456B00F50370 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 78CFEE3E1C5C456B00F50370 /* Build configuration list for PBXNativeTarget "LeadKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 78CFEE3F1C5C456B00F50370 /* Debug */, + 78CFEE401C5C456B00F50370 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 78CFEE411C5C456B00F50370 /* Build configuration list for PBXNativeTarget "LeadKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 78CFEE421C5C456B00F50370 /* Debug */, + 78CFEE431C5C456B00F50370 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 78CFEE211C5C456B00F50370 /* Project object */; +} diff --git a/iOS-Base-Library/iOS-Base-Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LeadKit/LeadKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 67% rename from iOS-Base-Library/iOS-Base-Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to LeadKit/LeadKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 8e06e807..4919e4ba 100644 --- a/iOS-Base-Library/iOS-Base-Library.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/LeadKit/LeadKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:LeadKit.xcodeproj"> diff --git a/LeadKit/LeadKit.xcodeproj/xcshareddata/xcschemes/LeadKit.xcscheme b/LeadKit/LeadKit.xcodeproj/xcshareddata/xcschemes/LeadKit.xcscheme new file mode 100644 index 00000000..b7823617 --- /dev/null +++ b/LeadKit/LeadKit.xcodeproj/xcshareddata/xcschemes/LeadKit.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS-Base-Library/iOS-Base-Library/App.swift b/LeadKit/LeadKit/Classes/Logging/App.swift similarity index 73% rename from iOS-Base-Library/iOS-Base-Library/App.swift rename to LeadKit/LeadKit/Classes/Logging/App.swift index 1289673c..4c54a905 100644 --- a/iOS-Base-Library/iOS-Base-Library/App.swift +++ b/LeadKit/LeadKit/Classes/Logging/App.swift @@ -1,23 +1,22 @@ // -// TIApp.swift -// iOS-Base-Library +// App.swift +// LeadKit // // Created by Николай Ашанин on 24.01.16. // Copyright © 2016 Touch Instinct. All rights reserved. // import Foundation -import UIKit public class App { private static let stringVendorIdentifierKey = "stringIdentifierForVendor" /// The value of CFBundleName - public static var bundleName: String = NSBundle.mainBundle().infoDictionary!["CFBundleName"] as! String + public static let bundleName = NSBundle.mainBundle().infoDictionary!["CFBundleName"] as! String /// The value of CFBundleShortVersionString - public static var shortVersion: String = NSBundle.mainBundle().infoDictionary!["CFBundleShortVersionString"] as! String + public static let shortVersion = NSBundle.mainBundle().infoDictionary!["CFBundleShortVersionString"] as! String /// The value of CFBundleVersion - public static var bundleVersion: String = NSBundle.mainBundle().infoDictionary!["CFBundleVersion"] as! String - + public static let bundleVersion = NSBundle.mainBundle().infoDictionary!["CFBundleVersion"] as! String + /** Return app's version - returns: shortBundleVersion.bundleVersion @@ -40,4 +39,4 @@ public class App { return returnValue! } -} +} \ No newline at end of file diff --git a/iOS-Base-Library/iOS-Base-Library/Log.swift b/LeadKit/LeadKit/Classes/Logging/Log.swift similarity index 83% rename from iOS-Base-Library/iOS-Base-Library/Log.swift rename to LeadKit/LeadKit/Classes/Logging/Log.swift index 659b5f55..88e59a00 100644 --- a/iOS-Base-Library/iOS-Base-Library/Log.swift +++ b/LeadKit/LeadKit/Classes/Logging/Log.swift @@ -1,37 +1,37 @@ // -// TILog.swift -// iOS-Base-Library +// Log.swift +// LeadKit // // Created by Николай Ашанин on 24.01.16. // Copyright © 2016 Touch Instinct. All rights reserved. // import Foundation -import CocoaLumberjack +import CocoaLumberjackSwift public class Log { - + /// Logger for CocoaLumberJack public let fileLogger = DDFileLogger() - + init() { - + DDLog.addLogger(fileLogger) - + DDLog.addLogger(DDASLLogger.sharedInstance()) DDLog.addLogger(DDTTYLogger.sharedInstance()) - - DDASLLogger.sharedInstance().logFormatter = LogFormatter.init() - DDTTYLogger.sharedInstance().logFormatter = LogFormatter.init() - - let assertionHandler = NSAssertionHandler.init() - + + DDASLLogger.sharedInstance().logFormatter = LogFormatter() + DDTTYLogger.sharedInstance().logFormatter = LogFormatter() + + let assertionHandler = NSAssertionHandler() + NSThread.currentThread().threadDictionary.setValue(assertionHandler, forKey: NSAssertionHandlerKey) } - + /** Add start message for your application - + - returns: Return value looks like "AppName 1.0.1 session started on version 9.2 (build 13c75)" */ public static func startMessage() -> String { @@ -40,5 +40,5 @@ public class Log { + NSProcessInfo.processInfo().operatingSystemVersionString.lowercaseString return startMessage } - -} + +} \ No newline at end of file diff --git a/iOS-Base-Library/iOS-Base-Library/LogFormatter.swift b/LeadKit/LeadKit/Classes/Logging/LogFormatter.swift similarity index 91% rename from iOS-Base-Library/iOS-Base-Library/LogFormatter.swift rename to LeadKit/LeadKit/Classes/Logging/LogFormatter.swift index 79060a50..27afb96d 100644 --- a/iOS-Base-Library/iOS-Base-Library/LogFormatter.swift +++ b/LeadKit/LeadKit/Classes/Logging/LogFormatter.swift @@ -1,26 +1,26 @@ // -// TILogFormatter.swift -// iOS-Base-Library +// LogFormatter.swift +// LeadKit // // Created by Николай Ашанин on 24.01.16. // Copyright © 2016 Touch Instinct. All rights reserved. // import Foundation -import CocoaLumberjack +import CocoaLumberjackSwift import CocoaLumberjack.DDDispatchQueueLogFormatter class LogFormatter: DDDispatchQueueLogFormatter { let dateFormatter: NSDateFormatter - + override init() { dateFormatter = NSDateFormatter() dateFormatter.formatterBehavior = .Behavior10_4 dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss:SSS" - + super.init() } - + override func formatLogMessage(logMessage: DDLogMessage!) -> String { var level: String! @@ -36,9 +36,9 @@ class LogFormatter: DDDispatchQueueLogFormatter { default: level = "VRB" } - + let dateAndTime = dateFormatter.stringFromDate(logMessage.timestamp) return "\(level) \(dateAndTime) [\(logMessage.fileName):\(logMessage.line)]: \(logMessage.message)" } - -} + +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Extensions/UIStoryboard+InstantiateViewController.swift b/LeadKit/LeadKit/Extensions/UIStoryboard+InstantiateViewController.swift new file mode 100644 index 00000000..9c5cb03a --- /dev/null +++ b/LeadKit/LeadKit/Extensions/UIStoryboard+InstantiateViewController.swift @@ -0,0 +1,20 @@ +// +// UIStoryboard+InstantiateViewController.swift +// Knapsack +// +// Created by Иван Смолин on 24/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import UIKit + +extension UIStoryboard { + /** + method for instanciating new UIViewController subclass from storyboard using storyboard identifier provided by StoryboardIdentifierProtocol protocol implementation + + - returns: UIViewController subclass instance + */ + public func instantiateViewController() -> T { + return instantiateViewControllerWithIdentifier(T.storyboardIdentifier()) as! T + } +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Extensions/UITableView+CellRegistration.swift b/LeadKit/LeadKit/Extensions/UITableView+CellRegistration.swift new file mode 100644 index 00000000..35eee6e1 --- /dev/null +++ b/LeadKit/LeadKit/Extensions/UITableView+CellRegistration.swift @@ -0,0 +1,34 @@ +// +// UITableView+CellRegistration.swift +// Knapsack +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import UIKit + +extension UITableView { + /** + method which register UITableViewCell subclass for reusing in UITableView with reuse identifier provided by ReuseIdentifierProtocol protocol implementation and nib name provided by StaticNibNameProtocol protocol implementation + + - parameter cellClass: UITableViewCell subclass which implements ReuseIdentifierProtocol and StaticNibNameProtocol + + - see: ReuseIdentifierProtocol, StaticNibNameProtocol + */ + public func registerNib(forCellClass cellClass: T.Type) { + self.registerNib(UINib(nibName: T.nibName()), forCellReuseIdentifier: T.reuseIdentifier()) + } + + /** + method which register UITableViewCell subclass for reusing in UITableView with reuse identifier provided by ReuseIdentifierProtocol protocol implementation and nib name provided by NibNameProtocol protocol implementation + + - parameter cellClass: UITableViewCell subclass which implements ReuseIdentifierProtocol and NibNameProtocol + - parameter interfaceIdiom: UIUserInterfaceIdiom value for NibNameProtocol + + - see: ReuseIdentifierProtocol, NibNameProtocol + */ + public func registerNib(forCellClass cellClass: T.Type, forUserInterfaceIdiom interfaceIdiom: UIUserInterfaceIdiom) { + self.registerNib(UINib(nibName: T.nibName(forConfiguration: interfaceIdiom)), forCellReuseIdentifier: T.reuseIdentifier()) + } +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Extensions/UITableView+DequeueCustomCell.swift b/LeadKit/LeadKit/Extensions/UITableView+DequeueCustomCell.swift new file mode 100644 index 00000000..de4ae5a6 --- /dev/null +++ b/LeadKit/LeadKit/Extensions/UITableView+DequeueCustomCell.swift @@ -0,0 +1,24 @@ +// +// UITableViewCell+DequeueFromTableView.swift +// Knapsack +// +// Created by Иван Смолин on 24/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import UIKit + +extension UITableView { + /** + method for dequeueing reusable table view cell with specific class using reuse identifier provided by ReuseIdentifierProtocol implementation + + - parameter indexPath: NSIndexPath object + + - returns: UITableViewCell subclass instance + + - see: ReuseIdentifierProtocol + */ + public func dequeueReusableCell(forIndexPath indexPath: NSIndexPath) -> T { + return dequeueReusableCellWithIdentifier(T.reuseIdentifier(), forIndexPath: indexPath) as! T + } +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Extensions/UIView+DefaultNibName.swift b/LeadKit/LeadKit/Extensions/UIView+DefaultNibName.swift new file mode 100644 index 00000000..3f2a8b51 --- /dev/null +++ b/LeadKit/LeadKit/Extensions/UIView+DefaultNibName.swift @@ -0,0 +1,20 @@ +// +// UIView+DefaultNibName.swift +// LeadKit +// +// Created by Иван Смолин on 10/02/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +extension UIView : StaticNibNameProtocol { + /** + default implementation of StaticNibNameProtocol + + - returns: class name string without dot (last class path component) + */ + public static func nibName() -> String { + return NSStringFromClass(self).componentsSeparatedByString(".").last! + } +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Extensions/UIView+LoadFromNib.swift b/LeadKit/LeadKit/Extensions/UIView+LoadFromNib.swift new file mode 100644 index 00000000..4981ca89 --- /dev/null +++ b/LeadKit/LeadKit/Extensions/UIView+LoadFromNib.swift @@ -0,0 +1,55 @@ +// +// UIView+LoadFromNib.swift +// Knapsack +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import UIKit + +extension UINib { + /** + convenience initialized for UINib class + + - parameter name: name of the nib + + - returns: UINib instance + */ + convenience public init(nibName name: String) { + self.init(nibName: name, bundle: nil) + } +} + +extension UIView { + /** + method which return UIView subclass instance loaded from nib using nib name provided by NibNameProtocol implementation + + - parameter interfaceIdiom: UIUserInterfaceIdiom value for passing into NibNameProtocol + + - returns: UIView subclass instance + */ + public static func loadFromNib(forUserInterfaceIdiom interfaceIdiom: UIUserInterfaceIdiom) -> T { + return loadFromNib(named: T.nibName(forConfiguration: interfaceIdiom)) + } + + /** + method which return UIView subclass instance loaded from nib using nib name provided by StaticNibNameProtocol implementation + + - returns: UIView subclass instance + */ + public static func loadFromNib() -> T { + return loadFromNib(named: T.nibName()) + } + + /** + method which loads UIView (or subclass) instance from nib using given nib name parameter + + - parameter nibName: nib name + + - returns: UIView subclass instance + */ + public static func loadFromNib(named nibName: String) -> T { + return UINib(nibName: nibName).instantiateWithOwner(nil, options: nil).first as! T + } +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Info.plist b/LeadKit/LeadKit/Info.plist new file mode 100644 index 00000000..11d74583 --- /dev/null +++ b/LeadKit/LeadKit/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.1 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/LeadKit/LeadKit/LeadKit.h b/LeadKit/LeadKit/LeadKit.h new file mode 100644 index 00000000..bf834717 --- /dev/null +++ b/LeadKit/LeadKit/LeadKit.h @@ -0,0 +1,19 @@ +// +// LeadKit.h +// LeadKit +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +#import + +//! Project version number for LeadKit. +FOUNDATION_EXPORT double LeadKitVersionNumber; + +//! Project version string for LeadKit. +FOUNDATION_EXPORT const unsigned char LeadKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/LeadKit/LeadKit/Protocols/NibNameProtocol.swift b/LeadKit/LeadKit/Protocols/NibNameProtocol.swift new file mode 100644 index 00000000..5b439e4a --- /dev/null +++ b/LeadKit/LeadKit/Protocols/NibNameProtocol.swift @@ -0,0 +1,39 @@ +// +// NIbNameProtocol.swift +// Knapsack +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import UIKit + +/** + * protocol which ensures that specific type can return nib name of view for specific configuration + */ +public protocol AbstractNibNameProtocol { + typealias ConfigurationType + + /** + static method which returns nib name for specific configuration + + - parameter configuration: object which represents configuration + + - returns: nib name string + */ + static func nibName(forConfiguration configuration: ConfigurationType) -> String +} + +/** + * protocol which ensures that specific type can return nib name of view for specified UserInterfaceIdiom (iPhone, iPad, AppleTV) + */ +public protocol NibNameProtocol : AbstractNibNameProtocol { + /** + static method which returns nib name for specific UIUserInterfaceIdiom value + + - parameter configuration: object which represents configuration in terms of user interface idiom + + - returns: nib name string + */ + static func nibName(forConfiguration configuration: UIUserInterfaceIdiom) -> String +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Protocols/ReuseIdentifierProtocol.swift b/LeadKit/LeadKit/Protocols/ReuseIdentifierProtocol.swift new file mode 100644 index 00000000..fdf88d2b --- /dev/null +++ b/LeadKit/LeadKit/Protocols/ReuseIdentifierProtocol.swift @@ -0,0 +1,35 @@ +// +// ReuseIdentifierProtocol.swift +// Knapsack +// +// Created by Иван Смолин on 24/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +/** + * protocol which ensures that specific type can return reuse identifier for view + */ +public protocol AbstractReuseIdentifierProtocol { + typealias IdentifierType + + /** + method which returns reuse identifier with protocol associated type + + - returns: reuse identifier + */ + static func reuseIdentifier() -> IdentifierType +} + +/** + * protocol which ensures that specific type can return string reuse identifier for view + */ +public protocol ReuseIdentifierProtocol: AbstractReuseIdentifierProtocol { + /** + method which returns reuse identifier with string type + + - returns: reuse identifier + */ + static func reuseIdentifier() -> String +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Protocols/StaticNibNameProtocol.swift b/LeadKit/LeadKit/Protocols/StaticNibNameProtocol.swift new file mode 100644 index 00000000..f5358ea6 --- /dev/null +++ b/LeadKit/LeadKit/Protocols/StaticNibNameProtocol.swift @@ -0,0 +1,21 @@ +// +// NibNameProtocol.swift +// Knapsack +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +/** + * protocol which ensures that specific type can return nib name of view + */ +public protocol StaticNibNameProtocol { + /** + static method which returns nib name + + - returns: nib name string + */ + static func nibName() -> String +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Protocols/StaticViewHeightProtocol.swift b/LeadKit/LeadKit/Protocols/StaticViewHeightProtocol.swift new file mode 100644 index 00000000..3d4a09c8 --- /dev/null +++ b/LeadKit/LeadKit/Protocols/StaticViewHeightProtocol.swift @@ -0,0 +1,21 @@ +// +// StaticViewHeightProtocol.swift +// Knapsack +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +/** + * protocol which ensures that specific type can return height of view + */ +public protocol StaticViewHeightProtocol { + /** + method which returns view height + + - returns: view height + */ + static func viewHeight() -> CGFloat +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Protocols/StoryboardIdentifierProtocol.swift b/LeadKit/LeadKit/Protocols/StoryboardIdentifierProtocol.swift new file mode 100644 index 00000000..db8a7855 --- /dev/null +++ b/LeadKit/LeadKit/Protocols/StoryboardIdentifierProtocol.swift @@ -0,0 +1,21 @@ +// +// StoryboardIdentifierProtocol.swift +// Knapsack +// +// Created by Иван Смолин on 24/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +/** + * protocol which ensures that specific type can return storyboard identifier of view controller + */ +public protocol StoryboardIdentifierProtocol { + /** + method which returns storyboard identifier of view controller + + - returns: storyboard identifier string + */ + static func storyboardIdentifier() -> String +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Protocols/ViewHeightProtocol.swift b/LeadKit/LeadKit/Protocols/ViewHeightProtocol.swift new file mode 100644 index 00000000..407425d3 --- /dev/null +++ b/LeadKit/LeadKit/Protocols/ViewHeightProtocol.swift @@ -0,0 +1,25 @@ +// +// ViewHeightProtocol.swift +// Knapsack +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +/** + * protocol which ensures that specific type can return height of view for view model + */ +public protocol ViewHeightProtocol { + typealias ViewModelType + + /** + method which returns view height for specific view model + + - parameter viewModel: object which represents view model of view + + - returns: view height + */ + static func viewHeight(forViewModel viewModel: ViewModelType) -> CGFloat +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Protocols/ViewModelBuilderProtocol.swift b/LeadKit/LeadKit/Protocols/ViewModelBuilderProtocol.swift new file mode 100644 index 00000000..26bd6bdb --- /dev/null +++ b/LeadKit/LeadKit/Protocols/ViewModelBuilderProtocol.swift @@ -0,0 +1,23 @@ +// +// ViewModelBuilderProtocol.swift +// LeadKit +// +// Created by Иван Смолин on 10/02/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +/** + * protocol which declares required methods for view model builder + */ +protocol ViewModelBuilderProtocol { + typealias ViewModelType + + /** + method which returns new view model + + - returns: view model object + */ + func buildViewModel() -> ViewModelType +} \ No newline at end of file diff --git a/LeadKit/LeadKit/Protocols/ViewModelProtocol.swift b/LeadKit/LeadKit/Protocols/ViewModelProtocol.swift new file mode 100644 index 00000000..a01f43f0 --- /dev/null +++ b/LeadKit/LeadKit/Protocols/ViewModelProtocol.swift @@ -0,0 +1,25 @@ +// +// ViewModelProtocol.swift +// Knapsack +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import Foundation + +/** + * protocol which ensures that specific type can create view model and can apply new view state with view model + */ +public protocol AbstractViewModelProtocol { + typealias ViewModelType + + /** + method which applies new view state with view model object + + - parameter viewModel: view model to apply new view state + + - returns: nothing + */ + func setViewModel(viewModel: ViewModelType) +} \ No newline at end of file diff --git a/LeadKit/LeadKitTests/Info.plist b/LeadKit/LeadKitTests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/LeadKit/LeadKitTests/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/LeadKit/LeadKitTests/LeadKitTests.swift b/LeadKit/LeadKitTests/LeadKitTests.swift new file mode 100644 index 00000000..96b03875 --- /dev/null +++ b/LeadKit/LeadKitTests/LeadKitTests.swift @@ -0,0 +1,36 @@ +// +// LeadKitTests.swift +// LeadKitTests +// +// Created by Иван Смолин on 30/01/16. +// Copyright © 2016 Touch Instinct. All rights reserved. +// + +import XCTest +@testable import LeadKit + +class LeadKitTests: 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. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/README.md b/README.md index 6828f41a..bf114831 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -# iOS-Base-Library \ No newline at end of file +# LeadKit +LeadKit it's a iOS framework with a bunch of tools for rapid app development \ No newline at end of file diff --git a/iOS-Base-Library/.tailor.yml b/iOS-Base-Library/.tailor.yml deleted file mode 100644 index 8efa4d56..00000000 --- a/iOS-Base-Library/.tailor.yml +++ /dev/null @@ -1,4 +0,0 @@ -exclude: - - 'Pods' - - 'Carthage' - - 'LTMorphingLabelDemo' \ No newline at end of file diff --git a/iOS-Base-Library/Podfile b/iOS-Base-Library/Podfile deleted file mode 100644 index 10b32710..00000000 --- a/iOS-Base-Library/Podfile +++ /dev/null @@ -1,16 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '8.0' -# Uncomment this line if you're using Swift -use_frameworks! - -# ignore all warnings from all pods -inhibit_all_warnings! - -source 'https://github.com/CocoaPods/Specs.git' - -target 'iOS-Base-Library' do - pod 'Alamofire', '~> 3.1.5' - pod 'CocoaLumberjack/Swift', '~> 2.2.0' - pod 'UIColor_Hex_Swift', '~> 1.8' - pod 'Device', '~> 0.0.6' -end \ No newline at end of file diff --git a/iOS-Base-Library/Pods/Alamofire/LICENSE b/iOS-Base-Library/Pods/Alamofire/LICENSE deleted file mode 100644 index bf300e44..00000000 --- a/iOS-Base-Library/Pods/Alamofire/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) - -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/iOS-Base-Library/Pods/Alamofire/README.md b/iOS-Base-Library/Pods/Alamofire/README.md deleted file mode 100644 index bcc0ff4b..00000000 --- a/iOS-Base-Library/Pods/Alamofire/README.md +++ /dev/null @@ -1,1149 +0,0 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/assets/alamofire.png) - -[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg)](https://travis-ci.org/Alamofire/Alamofire) -[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](http://cocoadocs.org/docsets/Alamofire) -[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](http://twitter.com/AlamofireSF) - -Alamofire is an HTTP networking library written in Swift. - -## Features - -- [x] Chainable Request / Response methods -- [x] URL / JSON / plist Parameter Encoding -- [x] Upload File / Data / Stream / MultipartFormData -- [x] Download using Request or Resume data -- [x] Authentication with NSURLCredential -- [x] HTTP Response Validation -- [x] TLS Certificate and Public Key Pinning -- [x] Progress Closure & NSProgress -- [x] cURL Debug Output -- [x] Comprehensive Unit Test Coverage -- [x] [Complete Documentation](http://cocoadocs.org/docsets/Alamofire) - -## Requirements - -- iOS 8.0+ / Mac OS X 10.9+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 7.2+ - -## Migration Guides - -- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) -- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) - -## Communication - -- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/alamofire). (Tag 'alamofire') -- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/alamofire). -- If you **found a bug**, open an issue. -- If you **have a feature request**, open an issue. -- If you **want to contribute**, submit a pull request. - -## Installation - -> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).** -> -> Alamofire is no longer supported on iOS 7 due to the lack of support for frameworks. Without frameworks, running Travis-CI against iOS 7 would require a second duplicated test target. The separate test suite would need to import all the Swift files and the tests would need to be duplicated and re-written. This split would be too difficult to maintain to ensure the highest possible quality of the Alamofire ecosystem. - -### CocoaPods - -[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: - -```bash -$ gem install cocoapods -``` - -> CocoaPods 0.39.0+ is required to build Alamofire 3.0.0+. - -To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' -use_frameworks! - -pod 'Alamofire', '~> 3.0' -``` - -Then, run the following command: - -```bash -$ pod install -``` - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. - -You can install Carthage with [Homebrew](http://brew.sh/) using the following command: - -```bash -$ brew update -$ brew install carthage -``` - -To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "Alamofire/Alamofire" ~> 3.0 -``` - -Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. - -### Manually - -If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project manually. - -#### Embedded Framework - -- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: - -```bash -$ git init -``` - -- Add Alamofire as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command: - -```bash -$ git submodule add https://github.com/Alamofire/Alamofire.git -``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. - - > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for OS X. - - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS` or `Alamofire OSX`. - -- And that's it! - -> The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - ---- - -## Usage - -### Making a Request - -```swift -import Alamofire - -Alamofire.request(.GET, "https://httpbin.org/get") -``` - -### Response Handling - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .responseJSON { response in - print(response.request) // original URL request - print(response.response) // URL response - print(response.data) // server data - print(response.result) // result of response serialization - - if let JSON = response.result.value { - print("JSON: \(JSON)") - } - } -``` - -> Networking in Alamofire is done _asynchronously_. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are [very good reasons](https://developer.apple.com/library/ios/qa/qa1693/_index.html) for doing it this way. - -> Rather than blocking execution to wait for a response from the server, a [callback](http://en.wikipedia.org/wiki/Callback_%28computer_programming%29) is specified to handle the response once it's received. The result of a request is only available inside the scope of a response handler. Any execution contingent on the response or data received from the server must be done within a handler. - -### Response Serialization - -**Built-in Response Methods** - -- `response()` -- `responseData()` -- `responseString(encoding: NSStringEncoding)` -- `responseJSON(options: NSJSONReadingOptions)` -- `responsePropertyList(options: NSPropertyListReadOptions)` - -#### Response Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .response { request, response, data, error in - print(request) - print(response) - print(data) - print(error) - } -``` - -> The `response` serializer does NOT evaluate any of the response data. It merely forwards on all the information directly from the URL session delegate. We strongly encourage you to leverage the other responser serializers taking advantage of `Response` and `Result` types. - -#### Response Data Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .responseData { response in - print(response.request) - print(response.response) - print(response.result) - } -``` - -#### Response String Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .responseString { response in - print("Success: \(response.result.isSuccess)") - print("Response String: \(response.result.value)") - } -``` - -#### Response JSON Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .responseJSON { response in - debugPrint(response) - } -``` - -#### Chained Response Handlers - -Response handlers can even be chained: - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .responseString { response in - print("Response String: \(response.result.value)") - } - .responseJSON { response in - print("Response JSON: \(response.result.value)") - } -``` - -### HTTP Methods - -`Alamofire.Method` lists the HTTP methods defined in [RFC 7231 §4.3](http://tools.ietf.org/html/rfc7231#section-4.3): - -```swift -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT -} -``` - -These values can be passed as the first argument of the `Alamofire.request` method: - -```swift -Alamofire.request(.POST, "https://httpbin.org/post") - -Alamofire.request(.PUT, "https://httpbin.org/put") - -Alamofire.request(.DELETE, "https://httpbin.org/delete") -``` - -### Parameters - -#### GET Request With URL-Encoded Parameters - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) -// https://httpbin.org/get?foo=bar -``` - -#### POST Request With URL-Encoded Parameters - -```swift -let parameters = [ - "foo": "bar", - "baz": ["a", 1], - "qux": [ - "x": 1, - "y": 2, - "z": 3 - ] -] - -Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters) -// HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3 -``` - -### Parameter Encoding - -Parameters can also be encoded as JSON, Property List, or any custom format, using the `ParameterEncoding` enum: - -```swift -enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(format: NSPropertyListFormat, options: NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) - - func encode(request: NSURLRequest, parameters: [String: AnyObject]?) -> (NSURLRequest, NSError?) - { ... } -} -``` - -- `URL`: A query string to be set as or appended to any existing URL query for `GET`, `HEAD`, and `DELETE` requests, or set as the body for requests with any other HTTP method. The `Content-Type` HTTP header field of an encoded request with HTTP body is set to `application/x-www-form-urlencoded`. _Since there is no published specification for how to encode collection types, Alamofire follows the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`)._ -- `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same implementation as the `.URL` case, but always applies the encoded result to the URL. -- `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -- `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/x-plist`. -- `Custom`: Uses the associated closure value to construct a new request given an existing request and parameters. - -#### Manual Parameter Encoding of an NSURLRequest - -```swift -let URL = NSURL(string: "https://httpbin.org/get")! -var request = NSMutableURLRequest(URL: URL) - -let parameters = ["foo": "bar"] -let encoding = Alamofire.ParameterEncoding.URL -(request, _) = encoding.encode(request, parameters: parameters) -``` - -#### POST Request with JSON-encoded Parameters - -```swift -let parameters = [ - "foo": [1,2,3], - "bar": [ - "baz": "qux" - ] -] - -Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters, encoding: .JSON) -// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} -``` - -### HTTP Headers - -Adding a custom HTTP header to a `Request` is supported directly in the global `request` method. This makes it easy to attach HTTP headers to a `Request` that can be constantly changing. - -> For HTTP headers that do not change, it is recommended to set them on the `NSURLSessionConfiguration` so they are automatically applied to any `NSURLSessionTask` created by the underlying `NSURLSession`. - -```swift -let headers = [ - "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", - "Content-Type": "application/x-www-form-urlencoded" -] - -Alamofire.request(.GET, "https://httpbin.org/get", headers: headers) - .responseJSON { response in - debugPrint(response) - } -``` - -### Caching - -Caching is handled on the system framework level by [`NSURLCache`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache). - -### Uploading - -**Supported Upload Types** - -- File -- Data -- Stream -- MultipartFormData - -#### Uploading a File - -```swift -let fileURL = NSBundle.mainBundle().URLForResource("Default", withExtension: "png") -Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) -``` - -#### Uploading with Progress - -```swift -Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) - .progress { bytesWritten, totalBytesWritten, totalBytesExpectedToWrite in - print(totalBytesWritten) - - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue()) { - print("Total bytes written on main queue: \(totalBytesWritten)") - } - } - .responseJSON { response in - debugPrint(response) - } -``` - -#### Uploading MultipartFormData - -```swift -Alamofire.upload( - .POST, - "https://httpbin.org/post", - multipartFormData: { multipartFormData in - multipartFormData.appendBodyPart(fileURL: unicornImageURL, name: "unicorn") - multipartFormData.appendBodyPart(fileURL: rainbowImageURL, name: "rainbow") - }, - encodingCompletion: { encodingResult in - switch encodingResult { - case .Success(let upload, _, _): - upload.responseJSON { response in - debugPrint(response) - } - case .Failure(let encodingError): - print(encodingError) - } - } -) -``` - -### Downloading - -**Supported Download Types** - -- Request -- Resume Data - -#### Downloading a File - -```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100") { temporaryURL, response in - let fileManager = NSFileManager.defaultManager() - let directoryURL = fileManager.URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] - let pathComponent = response.suggestedFilename - - return directoryURL.URLByAppendingPathComponent(pathComponent!) -} -``` - -#### Using the Default Download Destination - -```swift -let destination = Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask) -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) -``` - -#### Downloading a File w/Progress - -```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) - .progress { bytesRead, totalBytesRead, totalBytesExpectedToRead in - print(totalBytesRead) - - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue()) { - print("Total bytes read on main queue: \(totalBytesRead)") - } - } - .response { _, _, _, error in - if let error = error { - print("Failed with error: \(error)") - } else { - print("Downloaded file successfully") - } - } -``` - -#### Accessing Resume Data for Failed Downloads - -```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) - .response { _, _, data, _ in - if let - data = data, - resumeDataString = NSString(data: data, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") - } - } -``` - -> The `data` parameter is automatically populated with the `resumeData` if available. - -```swift -let download = Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) -download.response { _, _, _, _ in - if let - resumeData = download.resumeData, - resumeDataString = NSString(data: resumeData, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") - } -} -``` - -### Authentication - -Authentication is handled on the system framework level by [`NSURLCredential` and `NSURLAuthenticationChallenge`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html). - -**Supported Authentication Schemes** - -- [HTTP Basic](http://en.wikipedia.org/wiki/Basic_access_authentication) -- [HTTP Digest](http://en.wikipedia.org/wiki/Digest_access_authentication) -- [Kerberos](http://en.wikipedia.org/wiki/Kerberos_%28protocol%29) -- [NTLM](http://en.wikipedia.org/wiki/NT_LAN_Manager) - -#### HTTP Basic Authentication - -The `authenticate` method on a `Request` will automatically provide an `NSURLCredential` to an `NSURLAuthenticationChallenge` when appropriate: - -```swift -let user = "user" -let password = "password" - -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(user: user, password: password) - .responseJSON { response in - debugPrint(response) - } -``` - -Depending upon your server implementation, an `Authorization` header may also be appropriate: - -```swift -let user = "user" -let password = "password" - -let credentialData = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding)! -let base64Credentials = credentialData.base64EncodedStringWithOptions([]) - -let headers = ["Authorization": "Basic \(base64Credentials)"] - -Alamofire.request(.GET, "https://httpbin.org/basic-auth/user/password", headers: headers) - .responseJSON { response in - debugPrint(response) - } -``` - -#### Authentication with NSURLCredential - -```swift -let user = "user" -let password = "password" - -let credential = NSURLCredential(user: user, password: password, persistence: .ForSession) - -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(usingCredential: credential) - .responseJSON { response in - debugPrint(response) - } -``` - -### Validation - -By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling `validate` before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. - -#### Manual Validation - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate(statusCode: 200..<300) - .validate(contentType: ["application/json"]) - .response { response in - print(response) - } -``` - -#### Automatic Validation - -Automatically validates status code within `200...299` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseJSON { response in - switch response.result { - case .Success: - print("Validation Successful") - case .Failure(let error): - print(error) - } - } -``` - -### Printable - -```swift -let request = Alamofire.request(.GET, "https://httpbin.org/ip") - -print(request) -// GET https://httpbin.org/ip (200) -``` - -### DebugPrintable - -```swift -let request = Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - -debugPrint(request) -``` - -#### Output (cURL) - -```bash -$ curl -i \ - -H "User-Agent: Alamofire" \ - -H "Accept-Encoding: Accept-Encoding: gzip;q=1.0,compress;q=0.5" \ - -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ - "https://httpbin.org/get?foo=bar" -``` - ---- - -## Advanced Usage - -> Alamofire is built on `NSURLSession` and the Foundation URL Loading System. To make the most of -this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack. - -**Recommended Reading** - -- [URL Loading System Programming Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html) -- [NSURLSession Class Reference](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/Introduction/Introduction.html#//apple_ref/occ/cl/NSURLSession) -- [NSURLCache Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache) -- [NSURLAuthenticationChallenge Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html) - -### Manager - -Top-level convenience methods like `Alamofire.request` use a shared instance of `Alamofire.Manager`, which is configured with the default `NSURLSessionConfiguration`. - -As such, the following two statements are equivalent: - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") -``` - -```swift -let manager = Alamofire.Manager.sharedInstance -manager.request(NSURLRequest(URL: NSURL(string: "https://httpbin.org/get")!)) -``` - -Applications can create managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (`HTTPAdditionalHeaders`) or timeout interval (`timeoutIntervalForRequest`). - -#### Creating a Manager with Default Configuration - -```swift -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) -``` - -#### Creating a Manager with Background Configuration - -```swift -let configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier("com.example.app.background") -let manager = Alamofire.Manager(configuration: configuration) -``` - -#### Creating a Manager with Ephemeral Configuration - -```swift -let configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) -``` - -#### Modifying Session Configuration - -```swift -var defaultHeaders = Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders ?? [:] -defaultHeaders["DNT"] = "1 (Do Not Track Enabled)" - -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -configuration.HTTPAdditionalHeaders = defaultHeaders - -let manager = Alamofire.Manager(configuration: configuration) -``` - -> This is **not** recommended for `Authorization` or `Content-Type` headers. Instead, use `URLRequestConvertible` and `ParameterEncoding`, respectively. - -### Request - -The result of a `request`, `upload`, or `download` method is an instance of `Alamofire.Request`. A request is always created using a constructor method from an owning manager, and never initialized directly. - -Methods like `authenticate`, `validate` and `responseData` return the caller in order to facilitate chaining. - -Requests can be suspended, resumed, and cancelled: - -- `suspend()`: Suspends the underlying task and dispatch queue -- `resume()`: Resumes the underlying task and dispatch queue. If the owning manager does not have `startRequestsImmediately` set to `true`, the request must call `resume()` in order to start. -- `cancel()`: Cancels the underlying task, producing an error that is passed to any registered response handlers. - -### Response Serialization - -#### Creating a Custom Response Serializer - -Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on `Alamofire.Request`. - -For example, here's how a response handler using [Ono](https://github.com/mattt/Ono) might be implemented: - -```swift -extension Request { - public static func XMLResponseSerializer() -> ResponseSerializer { - return ResponseSerializer { request, response, data, error in - guard error == nil else { return .Failure(error!) } - - guard let validData = data else { - let failureReason = "Data could not be serialized. Input data was nil." - let error = Error.errorWithCode(.DataSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - do { - let XML = try ONOXMLDocument(data: validData) - return .Success(XML) - } catch { - return .Failure(error as NSError) - } - } - } - - public func responseXMLDocument(completionHandler: Response -> Void) -> Self { - return response(responseSerializer: Request.XMLResponseSerializer(), completionHandler: completionHandler) - } -} -``` - -#### Generic Response Object Serialization - -Generics can be used to provide automatic, type-safe response object serialization. - -```swift -public protocol ResponseObjectSerializable { - init?(response: NSHTTPURLResponse, representation: AnyObject) -} - -extension Request { - public func responseObject(completionHandler: Response -> Void) -> Self { - let responseSerializer = ResponseSerializer { request, response, data, error in - guard error == nil else { return .Failure(error!) } - - let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONResponseSerializer.serializeResponse(request, response, data, error) - - switch result { - case .Success(let value): - if let - response = response, - responseObject = T(response: response, representation: value) - { - return .Success(responseObject) - } else { - let failureReason = "JSON could not be serialized into response object: \(value)" - let error = Error.errorWithCode(.JSONSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - case .Failure(let error): - return .Failure(error) - } - } - - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) - } -} -``` - -```swift -final class User: ResponseObjectSerializable { - let username: String - let name: String - - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String - } -} -``` - -```swift -Alamofire.request(.GET, "https://example.com/users/mattt") - .responseObject { (response: Response) in - debugPrint(response) - } -``` - -The same approach can also be used to handle endpoints that return a representation of a collection of objects: - -```swift -public protocol ResponseCollectionSerializable { - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] -} - -extension Alamofire.Request { - public func responseCollection(completionHandler: Response<[T], NSError> -> Void) -> Self { - let responseSerializer = ResponseSerializer<[T], NSError> { request, response, data, error in - guard error == nil else { return .Failure(error!) } - - let JSONSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONSerializer.serializeResponse(request, response, data, error) - - switch result { - case .Success(let value): - if let response = response { - return .Success(T.collection(response: response, representation: value)) - } else { - let failureReason = "Response collection could not be serialized due to nil response" - let error = Error.errorWithCode(.JSONSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - case .Failure(let error): - return .Failure(error) - } - } - - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) - } -} -``` - -```swift -final class User: ResponseObjectSerializable, ResponseCollectionSerializable { - let username: String - let name: String - - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String - } - - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [User] { - var users: [User] = [] - - if let representation = representation as? [[String: AnyObject]] { - for userRepresentation in representation { - if let user = User(response: response, representation: userRepresentation) { - users.append(user) - } - } - } - - return users - } -} -``` - -```swift -Alamofire.request(.GET, "http://example.com/users") - .responseCollection { (response: Response<[User], NSError>) in - debugPrint(response) - } -``` - -### URLStringConvertible - -Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to construct URL requests. `NSString`, `NSURL`, `NSURLComponents`, and `NSURLRequest` conform to `URLStringConvertible` by default, allowing any of them to be passed as `URLString` parameters to the `request`, `upload`, and `download` methods: - -```swift -let string = NSString(string: "https://httpbin.org/post") -Alamofire.request(.POST, string) - -let URL = NSURL(string: string)! -Alamofire.request(.POST, URL) - -let URLRequest = NSURLRequest(URL: URL) -Alamofire.request(.POST, URLRequest) // overrides `HTTPMethod` of `URLRequest` - -let URLComponents = NSURLComponents(URL: URL, resolvingAgainstBaseURL: true) -Alamofire.request(.POST, URLComponents) -``` - -Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLStringConvertible` as a convenient way to map domain-specific models to server resources. - -#### Type-Safe Routing - -```swift -extension User: URLStringConvertible { - static let baseURLString = "http://example.com" - - var URLString: String { - return User.baseURLString + "/users/\(username)/" - } -} -``` - -```swift -let user = User(username: "mattt") -Alamofire.request(.GET, user) // http://example.com/users/mattt -``` - -### URLRequestConvertible - -Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. `NSURLRequest` conforms to `URLRequestConvertible` by default, allowing it to be passed into `request`, `upload`, and `download` methods directly (this is the recommended way to specify custom HTTP body for individual requests): - -```swift -let URL = NSURL(string: "https://httpbin.org/post")! -let mutableURLRequest = NSMutableURLRequest(URL: URL) -mutableURLRequest.HTTPMethod = "POST" - -let parameters = ["foo": "bar"] - -do { - mutableURLRequest.HTTPBody = try NSJSONSerialization.dataWithJSONObject(parameters, options: NSJSONWritingOptions()) -} catch { - // No-op -} - -mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - -Alamofire.request(mutableURLRequest) -``` - -Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLRequestConvertible` as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state. - -#### API Parameter Abstraction - -```swift -enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static let perPage = 50 - - case Search(query: String, page: Int) - - // MARK: URLRequestConvertible - - var URLRequest: NSMutableURLRequest { - let result: (path: String, parameters: [String: AnyObject]) = { - switch self { - case .Search(let query, let page) where page > 1: - return ("/search", ["q": query, "offset": Router.perPage * page]) - case .Search(let query, _): - return ("/search", ["q": query]) - } - }() - - let URL = NSURL(string: Router.baseURLString)! - let URLRequest = NSURLRequest(URL: URL.URLByAppendingPathComponent(result.path)) - let encoding = Alamofire.ParameterEncoding.URL - - return encoding.encode(URLRequest, parameters: result.parameters).0 - } -} -``` - -```swift -Alamofire.request(Router.Search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 -``` - -#### CRUD & Authorization - -```swift -enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static var OAuthToken: String? - - case CreateUser([String: AnyObject]) - case ReadUser(String) - case UpdateUser(String, [String: AnyObject]) - case DestroyUser(String) - - var method: Alamofire.Method { - switch self { - case .CreateUser: - return .POST - case .ReadUser: - return .GET - case .UpdateUser: - return .PUT - case .DestroyUser: - return .DELETE - } - } - - var path: String { - switch self { - case .CreateUser: - return "/users" - case .ReadUser(let username): - return "/users/\(username)" - case .UpdateUser(let username, _): - return "/users/\(username)" - case .DestroyUser(let username): - return "/users/\(username)" - } - } - - // MARK: URLRequestConvertible - - var URLRequest: NSMutableURLRequest { - let URL = NSURL(string: Router.baseURLString)! - let mutableURLRequest = NSMutableURLRequest(URL: URL.URLByAppendingPathComponent(path)) - mutableURLRequest.HTTPMethod = method.rawValue - - if let token = Router.OAuthToken { - mutableURLRequest.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization") - } - - switch self { - case .CreateUser(let parameters): - return Alamofire.ParameterEncoding.JSON.encode(mutableURLRequest, parameters: parameters).0 - case .UpdateUser(_, let parameters): - return Alamofire.ParameterEncoding.URL.encode(mutableURLRequest, parameters: parameters).0 - default: - return mutableURLRequest - } - } -} -``` - -```swift -Alamofire.request(Router.ReadUser("mattt")) // GET /users/mattt -``` - -### Security - -Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple's built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the `ServerTrustPolicy`. - -#### ServerTrustPolicy - -The `ServerTrustPolicy` enumeration evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when connecting to a server over a secure HTTPS connection. - -```swift -let serverTrustPolicy = ServerTrustPolicy.PinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), - validateCertificateChain: true, - validateHost: true -) -``` - -There are many different cases of server trust evaluation giving you complete control over the validation process: - -* `PerformDefaultEvaluation`: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. -* `PinCertificates`: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. -* `PinPublicKeys`: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. -* `DisableEvaluation`: Disables all evaluation which in turn will always consider any server trust as valid. -* `CustomEvaluation`: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution. - -#### Server Trust Policy Manager - -The `ServerTrustPolicyManager` is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy. - -```swift -let serverTrustPolicies: [String: ServerTrustPolicy] = [ - "test.example.com": .PinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), - validateCertificateChain: true, - validateHost: true - ), - "insecure.expired-apis.com": .DisableEvaluation -] - -let manager = Manager( - serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies) -) -``` - -> Make sure to keep a reference to the new `Manager` instance, otherwise your requests will all get cancelled when your `manager` is deallocated. - -These server trust policies will result in the following behavior: - -* `test.example.com` will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: - * Certificate chain MUST be valid. - * Certificate chain MUST include one of the pinned certificates. - * Challenge host MUST match the host in the certificate chain's leaf certificate. -* `insecure.expired-apis.com` will never evaluate the certificate chain and will always allow the TLS handshake to succeed. -* All other hosts will use the default evaluation provided by Apple. - -##### Subclassing Server Trust Policy Manager - -If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the `ServerTrustPolicyManager` and override the `serverTrustPolicyForHost` method with your own custom implementation. - -```swift -class CustomServerTrustPolicyManager: ServerTrustPolicyManager { - override func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { - var policy: ServerTrustPolicy? - - // Implement your custom domain matching behavior... - - return policy - } -} -``` - -#### Validating the Host - -The `.PerformDefaultEvaluation`, `.PinCertificates` and `.PinPublicKeys` server trust policies all take a `validateHost` parameter. Setting the value to `true` will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A `validateHost` value of `false` will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate. - -> It is recommended that `validateHost` always be set to `true` in production environments. - -#### Validating the Certificate Chain - -Pinning certificates and public keys both have the option of validating the certificate chain using the `validateCertificateChain` parameter. By setting this value to `true`, the full certificate chain will be evaluated in addition to performing a byte equality check against the pinned certficates or public keys. A value of `false` will skip the certificate chain validation, but will still perform the byte equality check. - -There are several cases where it may make sense to disable certificate chain validation. The most common use cases for disabling validation are self-signed and expired certificates. The evaluation would always fail in both of these cases, but the byte equality check will still ensure you are receiving the certificate you expect from the server. - -> It is recommended that `validateCertificateChain` always be set to `true` in production environments. - -#### App Transport Security - -With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom `ServerTrustPolicyManager` with several `ServerTrustPolicy` objects will have no effect. If you continuously see `CFNetwork SSLHandshake failed (-9806)` errors, you have probably run into this problem. Apple's ATS system overrides the entire challenge system unless you configure the ATS settings in your app's plist to disable enough of it to allow your app to evaluate the server trust. - -If you run into this problem (high probability with self-signed certificates), you can work around this issue by adding the following to your `Info.plist`. - -```xml - - NSAppTransportSecurity - - NSExceptionDomains - - example.com - - NSExceptionAllowsInsecureHTTPLoads - - NSExceptionRequiresForwardSecrecy - - NSIncludesSubdomains - - - NSTemporaryExceptionMinimumTLSVersion - TLSv1.2 - - - - -``` - -Whether you need to set the `NSExceptionRequiresForwardSecrecy` to `NO` depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to `NO`. The `NSExceptionAllowsInsecureHTTPLoads` MUST be set to `YES` in order to allow the `SessionDelegate` to receive challenge callbacks. Once the challenge callbacks are being called, the `ServerTrustPolicyManager` will take over the server trust evaluation. You may also need to specify the `NSTemporaryExceptionMinimumTLSVersion` if you're trying to connect to a host that only supports TLS versions less than `1.2`. - -> It is recommended to always use valid certificates in production environments. - ---- - -## Component Libraries - -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. - -* [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. - -## Open Rdars - -The following rdars have some affect on the current implementation of Alamofire. - -* [rdar://21349340](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case - -## FAQ - -### What's the origin of the name Alamofire? - -Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. - ---- - -## Credits - -Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. - -### Security Disclosure - -If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. - -## License - -Alamofire is released under the MIT license. See LICENSE for details. diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Alamofire.swift b/iOS-Base-Library/Pods/Alamofire/Source/Alamofire.swift deleted file mode 100644 index b866f422..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Alamofire.swift +++ /dev/null @@ -1,368 +0,0 @@ -// Alamofire.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -// MARK: - URLStringConvertible - -/** - Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to - construct URL requests. -*/ -public protocol URLStringConvertible { - /** - A URL that conforms to RFC 2396. - - Methods accepting a `URLStringConvertible` type parameter parse it according to RFCs 1738 and 1808. - - See https://tools.ietf.org/html/rfc2396 - See https://tools.ietf.org/html/rfc1738 - See https://tools.ietf.org/html/rfc1808 - */ - var URLString: String { get } -} - -extension String: URLStringConvertible { - public var URLString: String { - return self - } -} - -extension NSURL: URLStringConvertible { - public var URLString: String { - return absoluteString - } -} - -extension NSURLComponents: URLStringConvertible { - public var URLString: String { - return URL!.URLString - } -} - -extension NSURLRequest: URLStringConvertible { - public var URLString: String { - return URL!.URLString - } -} - -// MARK: - URLRequestConvertible - -/** - Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -*/ -public protocol URLRequestConvertible { - /// The URL request. - var URLRequest: NSMutableURLRequest { get } -} - -extension NSURLRequest: URLRequestConvertible { - public var URLRequest: NSMutableURLRequest { - return self.mutableCopy() as! NSMutableURLRequest - } -} - -// MARK: - Convenience - -func URLRequest( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil) - -> NSMutableURLRequest -{ - let mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: URLString.URLString)!) - mutableURLRequest.HTTPMethod = method.rawValue - - if let headers = headers { - for (headerField, headerValue) in headers { - mutableURLRequest.setValue(headerValue, forHTTPHeaderField: headerField) - } - } - - return mutableURLRequest -} - -// MARK: - Request Methods - -/** - Creates a request using the shared manager instance for the specified method, URL string, parameters, and - parameter encoding. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. -*/ -public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request -{ - return Manager.sharedInstance.request( - method, - URLString, - parameters: parameters, - encoding: encoding, - headers: headers - ) -} - -/** - Creates a request using the shared manager instance for the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - - returns: The created request. -*/ -public func request(URLRequest: URLRequestConvertible) -> Request { - return Manager.sharedInstance.request(URLRequest.URLRequest) -} - -// MARK: - Upload Methods - -// MARK: File - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and file. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload. - - - returns: The created upload request. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request -{ - return Manager.sharedInstance.upload(method, URLString, headers: headers, file: file) -} - -/** - Creates an upload request using the shared manager instance for the specified URL request and file. - - - parameter URLRequest: The URL request. - - parameter file: The file to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return Manager.sharedInstance.upload(URLRequest, file: file) -} - -// MARK: Data - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and data. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request -{ - return Manager.sharedInstance.upload(method, URLString, headers: headers, data: data) -} - -/** - Creates an upload request using the shared manager instance for the specified URL request and data. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return Manager.sharedInstance.upload(URLRequest, data: data) -} - -// MARK: Stream - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and stream. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request -{ - return Manager.sharedInstance.upload(method, URLString, headers: headers, stream: stream) -} - -/** - Creates an upload request using the shared manager instance for the specified URL request and stream. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return Manager.sharedInstance.upload(URLRequest, stream: stream) -} - -// MARK: MultipartFormData - -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) -{ - return Manager.sharedInstance.upload( - method, - URLString, - headers: headers, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) -} - -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ -public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) -{ - return Manager.sharedInstance.upload( - URLRequest, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) -} - -// MARK: - Download Methods - -// MARK: URL Request - -/** - Creates a download request using the shared manager instance for the specified method and URL string. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request -{ - return Manager.sharedInstance.download( - method, - URLString, - parameters: parameters, - encoding: encoding, - headers: headers, - destination: destination - ) -} - -/** - Creates a download request using the shared manager instance for the specified URL request. - - - parameter URLRequest: The URL request. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(URLRequest, destination: destination) -} - -// MARK: Resume Data - -/** - Creates a request using the shared manager instance for downloading from the resume data produced from a - previous request cancellation. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for additional - information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(resumeData data: NSData, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(data, destination: destination) -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Download.swift b/iOS-Base-Library/Pods/Alamofire/Source/Download.swift deleted file mode 100644 index b9a043cb..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Download.swift +++ /dev/null @@ -1,244 +0,0 @@ -// Download.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -extension Manager { - private enum Downloadable { - case Request(NSURLRequest) - case ResumeData(NSData) - } - - private func download(downloadable: Downloadable, destination: Request.DownloadFileDestination) -> Request { - var downloadTask: NSURLSessionDownloadTask! - - switch downloadable { - case .Request(let request): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithRequest(request) - } - case .ResumeData(let resumeData): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithResumeData(resumeData) - } - } - - let request = Request(session: session, task: downloadTask) - - if let downloadDelegate = request.delegate as? Request.DownloadTaskDelegate { - downloadDelegate.downloadTaskDidFinishDownloadingToURL = { session, downloadTask, URL in - return destination(URL, downloadTask.response as! NSHTTPURLResponse) - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: Request - - /** - Creates a download request for the specified method, URL string, parameters, parameter encoding, headers - and destination. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - - return download(encodedURLRequest, destination: destination) - } - - /** - Creates a request for downloading from the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return download(.Request(URLRequest.URLRequest), destination: destination) - } - - // MARK: Resume Data - - /** - Creates a request for downloading from the resume data produced from a previous request cancellation. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for - additional information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(resumeData: NSData, destination: Request.DownloadFileDestination) -> Request { - return download(.ResumeData(resumeData), destination: destination) - } -} - -// MARK: - - -extension Request { - /** - A closure executed once a request has successfully completed in order to determine where to move the temporary - file written to during the download process. The closure takes two arguments: the temporary file URL and the URL - response, and returns a single argument: the file URL where the temporary file should be moved. - */ - public typealias DownloadFileDestination = (NSURL, NSHTTPURLResponse) -> NSURL - - /** - Creates a download file destination closure which uses the default file manager to move the temporary file to a - file URL in the first available directory with the specified search path directory and search path domain mask. - - - parameter directory: The search path directory. `.DocumentDirectory` by default. - - parameter domain: The search path domain mask. `.UserDomainMask` by default. - - - returns: A download file destination closure. - */ - public class func suggestedDownloadDestination( - directory directory: NSSearchPathDirectory = .DocumentDirectory, - domain: NSSearchPathDomainMask = .UserDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response -> NSURL in - let directoryURLs = NSFileManager.defaultManager().URLsForDirectory(directory, inDomains: domain) - - if !directoryURLs.isEmpty { - return directoryURLs[0].URLByAppendingPathComponent(response.suggestedFilename!) - } - - return temporaryURL - } - } - - /// The resume data of the underlying download task if available after a failure. - public var resumeData: NSData? { - var data: NSData? - - if let delegate = delegate as? DownloadTaskDelegate { - data = delegate.resumeData - } - - return data - } - - // MARK: - DownloadTaskDelegate - - class DownloadTaskDelegate: TaskDelegate, NSURLSessionDownloadDelegate { - var downloadTask: NSURLSessionDownloadTask? { return task as? NSURLSessionDownloadTask } - var downloadProgress: ((Int64, Int64, Int64) -> Void)? - - var resumeData: NSData? - override var data: NSData? { return resumeData } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> NSURL)? - var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - do { - let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - try NSFileManager.defaultManager().moveItemAtURL(location, toURL: destination) - } catch { - self.error = error as NSError - } - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - downloadProgress?(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Error.swift b/iOS-Base-Library/Pods/Alamofire/Source/Error.swift deleted file mode 100644 index 7a813f1b..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Error.swift +++ /dev/null @@ -1,66 +0,0 @@ -// Error.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -/// The `Error` struct provides a convenience for creating custom Alamofire NSErrors. -public struct Error { - /// The domain used for creating all Alamofire errors. - public static let Domain = "com.alamofire.error" - - /// The custom error codes generated by Alamofire. - public enum Code: Int { - case InputStreamReadFailed = -6000 - case OutputStreamWriteFailed = -6001 - case ContentTypeValidationFailed = -6002 - case StatusCodeValidationFailed = -6003 - case DataSerializationFailed = -6004 - case StringSerializationFailed = -6005 - case JSONSerializationFailed = -6006 - case PropertyListSerializationFailed = -6007 - } - - /** - Creates an `NSError` with the given error code and failure reason. - - - parameter code: The error code. - - parameter failureReason: The failure reason. - - - returns: An `NSError` with the given error code and failure reason. - */ - public static func errorWithCode(code: Code, failureReason: String) -> NSError { - return errorWithCode(code.rawValue, failureReason: failureReason) - } - - /** - Creates an `NSError` with the given error code and failure reason. - - - parameter code: The error code. - - parameter failureReason: The failure reason. - - - returns: An `NSError` with the given error code and failure reason. - */ - public static func errorWithCode(code: Int, failureReason: String) -> NSError { - let userInfo = [NSLocalizedFailureReasonErrorKey: failureReason] - return NSError(domain: Domain, code: code, userInfo: userInfo) - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Manager.swift b/iOS-Base-Library/Pods/Alamofire/Source/Manager.swift deleted file mode 100644 index d81c7380..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Manager.swift +++ /dev/null @@ -1,693 +0,0 @@ -// Manager.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -/** - Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -*/ -public class Manager { - - // MARK: - Properties - - /** - A shared instance of `Manager`, used by top-level Alamofire request methods, and suitable for use directly - for any ad hoc requests. - */ - public static let sharedInstance: Manager = { - let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() - configuration.HTTPAdditionalHeaders = Manager.defaultHTTPHeaders - - return Manager(configuration: configuration) - }() - - /** - Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - */ - public static let defaultHTTPHeaders: [String: String] = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage = NSLocale.preferredLanguages().prefix(6).enumerate().map { index, languageCode in - let quality = 1.0 - (Double(index) * 0.1) - return "\(languageCode);q=\(quality)" - }.joinWithSeparator(", ") - - // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - let userAgent: String = { - if let info = NSBundle.mainBundle().infoDictionary { - let executable: AnyObject = info[kCFBundleExecutableKey as String] ?? "Unknown" - let bundle: AnyObject = info[kCFBundleIdentifierKey as String] ?? "Unknown" - let version: AnyObject = info[kCFBundleVersionKey as String] ?? "Unknown" - let os: AnyObject = NSProcessInfo.processInfo().operatingSystemVersionString ?? "Unknown" - - var mutableUserAgent = NSMutableString(string: "\(executable)/\(bundle) (\(version); OS \(os))") as CFMutableString - let transform = NSString(string: "Any-Latin; Latin-ASCII; [:^ASCII:] Remove") as CFString - - if CFStringTransform(mutableUserAgent, UnsafeMutablePointer(nil), transform, false) { - return mutableUserAgent as String - } - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - let queue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL) - - /// The underlying session. - public let session: NSURLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - public var startRequestsImmediately: Bool = true - - /** - The background completion handler closure provided by the UIApplicationDelegate - `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - will automatically call the handler. - - If you need to handle your own events before the handler is called, then you need to override the - SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - - `nil` by default. - */ - public var backgroundCompletionHandler: (() -> Void)? - - // MARK: - Lifecycle - - /** - Initializes the `Manager` instance with the specified configuration, delegate and server trust policy. - - - parameter configuration: The configuration used to construct the managed session. - `NSURLSessionConfiguration.defaultSessionConfiguration()` by default. - - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by - default. - - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - challenges. `nil` by default. - - - returns: The new `Manager` instance. - */ - public init( - configuration: NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration(), - delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = NSURLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - /** - Initializes the `Manager` instance with the specified session, delegate and server trust policy. - - - parameter session: The URL session. - - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. - - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - challenges. `nil` by default. - - - returns: The new `Manager` instance if the URL session's delegate matches the delegate parameter. - */ - public init?( - session: NSURLSession, - delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = session - - guard delegate === session.delegate else { return nil } - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - private func commonInit(serverTrustPolicyManager serverTrustPolicyManager: ServerTrustPolicyManager?) { - session.serverTrustPolicyManager = serverTrustPolicyManager - - delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - dispatch_async(dispatch_get_main_queue()) { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Request - - /** - Creates a request for the specified method, URL string, parameters, parameter encoding and headers. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. - */ - public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - return request(encodedURLRequest) - } - - /** - Creates a request for the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - - returns: The created request. - */ - public func request(URLRequest: URLRequestConvertible) -> Request { - var dataTask: NSURLSessionDataTask! - dispatch_sync(queue) { dataTask = self.session.dataTaskWithRequest(URLRequest.URLRequest) } - - let request = Request(session: session, task: dataTask) - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: - SessionDelegate - - /** - Responsible for handling all delegate callbacks for the underlying session. - */ - public final class SessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate { - private var subdelegates: [Int: Request.TaskDelegate] = [:] - private let subdelegateQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_CONCURRENT) - - subscript(task: NSURLSessionTask) -> Request.TaskDelegate? { - get { - var subdelegate: Request.TaskDelegate? - dispatch_sync(subdelegateQueue) { subdelegate = self.subdelegates[task.taskIdentifier] } - - return subdelegate - } - - set { - dispatch_barrier_async(subdelegateQueue) { self.subdelegates[task.taskIdentifier] = newValue } - } - } - - /** - Initializes the `SessionDelegate` instance. - - - returns: The new `SessionDelegate` instance. - */ - public override init() { - super.init() - } - - // MARK: - NSURLSessionDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didBecomeInvalidWithError:`. - public var sessionDidBecomeInvalidWithError: ((NSURLSession, NSError?) -> Void)? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. - public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. - public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the session has been invalidated. - - - parameter session: The session object that was invalidated. - - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - */ - public func URLSession(session: NSURLSession, didBecomeInvalidWithError error: NSError?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - /** - Requests credentials from the delegate in response to a session-level authentication request from the remote server. - - - parameter session: The session containing the task that requested authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } - } - } - - completionHandler(disposition, credential) - } - - /** - Tells the delegate that all messages enqueued for a session have been delivered. - - - parameter session: The session that no longer has any outstanding requests. - */ - public func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) - } - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. - public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:`. - public var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:`. - public var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream!)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. - public var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didCompleteWithError:`. - public var taskDidComplete: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the remote server requested an HTTP redirect. - - - parameter session: The session containing the task whose request resulted in a redirect. - - parameter task: The task whose request resulted in a redirect. - - parameter response: An object containing the server’s response to the original request. - - parameter request: A URL request object filled out with the new location. - - parameter completionHandler: A closure that your handler should call with either the value of the request - parameter, a modified URL request object, or NULL to refuse the redirect and - return the body of the redirect response. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: ((NSURLRequest?) -> Void)) - { - var redirectRequest: NSURLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - /** - Requests credentials from the delegate in response to an authentication request from the remote server. - - - parameter session: The session containing the task whose request requires authentication. - - parameter task: The task whose request requires authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - completionHandler(taskDidReceiveChallenge(session, task, challenge)) - } else if let delegate = self[task] { - delegate.URLSession( - session, - task: task, - didReceiveChallenge: challenge, - completionHandler: completionHandler - ) - } else { - URLSession(session, didReceiveChallenge: challenge, completionHandler: completionHandler) - } - } - - /** - Tells the delegate when a task requires a new request body stream to send to the remote server. - - - parameter session: The session containing the task that needs a new body stream. - - parameter task: The task that needs a new body stream. - - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) - { - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /** - Periodically informs the delegate of the progress of sending body content to the server. - - - parameter session: The session containing the data task. - - parameter task: The data task. - - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - - parameter totalBytesSent: The total number of bytes sent so far. - - parameter totalBytesExpectedToSend: The expected length of the body data. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task] as? Request.UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } - - /** - Tells the delegate that the task finished transferring data. - - - parameter session: The session containing the task whose request finished transferring data. - - parameter task: The task whose request finished transferring data. - - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. - */ - public func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidComplete = taskDidComplete { - taskDidComplete(session, task, error) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, didCompleteWithError: error) - } - - self[task] = nil - } - - // MARK: - NSURLSessionDataDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:`. - public var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didBecomeDownloadTask:`. - public var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveData:`. - public var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. - public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse!)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the data task received the initial reply (headers) from the server. - - - parameter session: The session containing the data task that received an initial reply. - - parameter dataTask: The data task that received an initial reply. - - parameter response: A URL response object populated with headers. - - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - constant to indicate whether the transfer should continue as a data task or - should become a download task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: ((NSURLSessionResponseDisposition) -> Void)) - { - var disposition: NSURLSessionResponseDisposition = .Allow - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - /** - Tells the delegate that the data task was changed to a download task. - - - parameter session: The session containing the task that was replaced by a download task. - - parameter dataTask: The data task that was replaced by a download task. - - parameter downloadTask: The new download task that replaced the data task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - let downloadDelegate = Request.DownloadTaskDelegate(task: downloadTask) - self[downloadTask] = downloadDelegate - } - } - - /** - Tells the delegate that the data task has received some of the expected data. - - - parameter session: The session containing the data task that provided data. - - parameter dataTask: The data task that provided data. - - parameter data: A data object containing the transferred data. - */ - public func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession(session, dataTask: dataTask, didReceiveData: data) - } - } - - /** - Asks the delegate whether the data (or upload) task should store the response in the cache. - - - parameter session: The session containing the data (or upload) task. - - parameter dataTask: The data (or upload) task. - - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - caching policy and the values of certain received headers, such as the Pragma - and Cache-Control headers. - - parameter completionHandler: A block that your handler must call, providing either the original proposed - response, a modified version of that response, or NULL to prevent caching the - response. If your delegate implements this method, it must call this completion - handler; otherwise, your app leaks memory. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: ((NSCachedURLResponse?) -> Void)) - { - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } - } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didFinishDownloadingToURL:`. - public var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:`. - public var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. - public var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that a download task has finished downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that finished. - - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - open the file for reading or move it to a permanent location in your app’s sandbox - container directory before returning from this delegate method. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession(session, downloadTask: downloadTask, didFinishDownloadingToURL: location) - } - } - - /** - Periodically informs the delegate about the download’s progress. - - - parameter session: The session containing the download task. - - parameter downloadTask: The download task. - - parameter bytesWritten: The number of bytes transferred since the last time this delegate - method was called. - - parameter totalBytesWritten: The total number of bytes transferred so far. - - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - header. If this header was not provided, the value is - `NSURLSessionTransferSizeUnknown`. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) - } - } - - /** - Tells the delegate that the download task has resumed downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that resumed. See explanation in the discussion. - - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - existing content, then this value is zero. Otherwise, this value is an - integer representing the number of bytes on disk that do not need to be - retrieved again. - - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) - } - } - - // MARK: - NSURLSessionStreamDelegate - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - - // MARK: - NSObject - - public override func respondsToSelector(selector: Selector) -> Bool { - switch selector { - case "URLSession:didBecomeInvalidWithError:": - return sessionDidBecomeInvalidWithError != nil - case "URLSession:didReceiveChallenge:completionHandler:": - return sessionDidReceiveChallenge != nil - case "URLSessionDidFinishEventsForBackgroundURLSession:": - return sessionDidFinishEventsForBackgroundURLSession != nil - case "URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:": - return taskWillPerformHTTPRedirection != nil - case "URLSession:dataTask:didReceiveResponse:completionHandler:": - return dataTaskDidReceiveResponse != nil - default: - return self.dynamicType.instancesRespondToSelector(selector) - } - } - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/MultipartFormData.swift b/iOS-Base-Library/Pods/Alamofire/Source/MultipartFormData.swift deleted file mode 100644 index 8c37f164..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/MultipartFormData.swift +++ /dev/null @@ -1,669 +0,0 @@ -// MultipartFormData.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -#if os(iOS) || os(watchOS) || os(tvOS) -import MobileCoreServices -#elseif os(OSX) -import CoreServices -#endif - -/** - Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode - multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead - to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the - data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for - larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. - - For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well - and the w3 form documentation. - - - https://www.ietf.org/rfc/rfc2388.txt - - https://www.ietf.org/rfc/rfc2045.txt - - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -*/ -public class MultipartFormData { - - // MARK: - Helper Types - - struct EncodingCharacters { - static let CRLF = "\r\n" - } - - struct BoundaryGenerator { - enum BoundaryType { - case Initial, Encapsulated, Final - } - - static func randomBoundary() -> String { - return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) - } - - static func boundaryData(boundaryType boundaryType: BoundaryType, boundary: String) -> NSData { - let boundaryText: String - - switch boundaryType { - case .Initial: - boundaryText = "--\(boundary)\(EncodingCharacters.CRLF)" - case .Encapsulated: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)\(EncodingCharacters.CRLF)" - case .Final: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)--\(EncodingCharacters.CRLF)" - } - - return boundaryText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! - } - } - - class BodyPart { - let headers: [String: String] - let bodyStream: NSInputStream - let bodyContentLength: UInt64 - var hasInitialBoundary = false - var hasFinalBoundary = false - - init(headers: [String: String], bodyStream: NSInputStream, bodyContentLength: UInt64) { - self.headers = headers - self.bodyStream = bodyStream - self.bodyContentLength = bodyContentLength - } - } - - // MARK: - Properties - - /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - public var contentType: String { return "multipart/form-data; boundary=\(boundary)" } - - /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. - public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } - - /// The boundary used to separate the body parts in the encoded form data. - public let boundary: String - - private var bodyParts: [BodyPart] - private var bodyPartError: NSError? - private let streamBufferSize: Int - - // MARK: - Lifecycle - - /** - Creates a multipart form data object. - - - returns: The multipart form data object. - */ - public init() { - self.boundary = BoundaryGenerator.randomBoundary() - self.bodyParts = [] - - /** - * The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - * information, please refer to the following article: - * - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - */ - - self.streamBufferSize = 1024 - } - - // MARK: - Body Parts - - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String) { - let headers = contentHeaders(name: name) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, mimeType: String) { - let headers = contentHeaders(name: name, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - system associated MIME type. - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String) { - if let - fileName = fileURL.lastPathComponent, - pathExtension = fileURL.pathExtension - { - let mimeType = mimeTypeForPathExtension(pathExtension) - appendBodyPart(fileURL: fileURL, name: name, fileName: fileName, mimeType: mimeType) - } else { - let failureReason = "Failed to extract the fileName of the provided URL: \(fileURL)" - setBodyPartError(Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason)) - } - } - - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - - Content-Type: #{mimeType} (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - - //============================================================ - // Check 1 - is file URL? - //============================================================ - - guard fileURL.fileURL else { - let failureReason = "The file URL does not point to a file URL: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - setBodyPartError(error) - return - } - - //============================================================ - // Check 2 - is file URL reachable? - //============================================================ - - var isReachable = true - - if #available(OSX 10.10, *) { - isReachable = fileURL.checkPromisedItemIsReachableAndReturnError(nil) - } - - guard isReachable else { - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: "The file URL is not reachable: \(fileURL)") - setBodyPartError(error) - return - } - - //============================================================ - // Check 3 - is file URL a directory? - //============================================================ - - var isDirectory: ObjCBool = false - - guard let - path = fileURL.path - where NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory: &isDirectory) && !isDirectory else - { - let failureReason = "The file URL is a directory, not a file: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - setBodyPartError(error) - return - } - - //============================================================ - // Check 4 - can the file size be extracted? - //============================================================ - - var bodyContentLength: UInt64? - - do { - if let - path = fileURL.path, - fileSize = try NSFileManager.defaultManager().attributesOfItemAtPath(path)[NSFileSize] as? NSNumber - { - bodyContentLength = fileSize.unsignedLongLongValue - } - } catch { - // No-op - } - - guard let length = bodyContentLength else { - let failureReason = "Could not fetch attributes from the file URL: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - setBodyPartError(error) - return - } - - //============================================================ - // Check 5 - can a stream be created from file URL? - //============================================================ - - guard let stream = NSInputStream(URL: fileURL) else { - let failureReason = "Failed to create an input stream from the file URL: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorCannotOpenFile, failureReason: failureReason) - setBodyPartError(error) - return - } - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the stream and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - */ - public func appendBodyPart( - stream stream: NSInputStream, - length: UInt64, - name: String, - fileName: String, - mimeType: String) - { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part with the headers, stream and length and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - HTTP headers - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter headers: The HTTP headers for the body part. - */ - public func appendBodyPart(stream stream: NSInputStream, length: UInt64, headers: [String: String]) { - let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) - bodyParts.append(bodyPart) - } - - // MARK: - Data Encoding - - /** - Encodes all the appended body parts into a single `NSData` object. - - It is important to note that this method will load all the appended body parts into memory all at the same - time. This method should only be used when the encoded data will have a small memory footprint. For large data - cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. - - - throws: An `NSError` if encoding encounters an error. - - - returns: The encoded `NSData` if encoding is successful. - */ - public func encode() throws -> NSData { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - let encoded = NSMutableData() - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - let encodedData = try encodeBodyPart(bodyPart) - encoded.appendData(encodedData) - } - - return encoded - } - - /** - Writes the appended body parts into the given file URL. - - This process is facilitated by reading and writing with input and output streams, respectively. Thus, - this approach is very memory efficient and should be used for large body part data. - - - parameter fileURL: The file URL to write the multipart form data into. - - - throws: An `NSError` if encoding encounters an error. - */ - public func writeEncodedDataToDisk(fileURL: NSURL) throws { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - if let path = fileURL.path where NSFileManager.defaultManager().fileExistsAtPath(path) { - let failureReason = "A file already exists at the given file URL: \(fileURL)" - throw Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - } else if !fileURL.fileURL { - let failureReason = "The URL does not point to a valid file: \(fileURL)" - throw Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - } - - let outputStream: NSOutputStream - - if let possibleOutputStream = NSOutputStream(URL: fileURL, append: false) { - outputStream = possibleOutputStream - } else { - let failureReason = "Failed to create an output stream with the given URL: \(fileURL)" - throw Error.errorWithCode(NSURLErrorCannotOpenFile, failureReason: failureReason) - } - - outputStream.scheduleInRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) - outputStream.open() - - self.bodyParts.first?.hasInitialBoundary = true - self.bodyParts.last?.hasFinalBoundary = true - - for bodyPart in self.bodyParts { - try writeBodyPart(bodyPart, toOutputStream: outputStream) - } - - outputStream.close() - outputStream.removeFromRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) - } - - // MARK: - Private - Body Part Encoding - - private func encodeBodyPart(bodyPart: BodyPart) throws -> NSData { - let encoded = NSMutableData() - - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.appendData(initialData) - - let headerData = encodeHeaderDataForBodyPart(bodyPart) - encoded.appendData(headerData) - - let bodyStreamData = try encodeBodyStreamDataForBodyPart(bodyPart) - encoded.appendData(bodyStreamData) - - if bodyPart.hasFinalBoundary { - encoded.appendData(finalBoundaryData()) - } - - return encoded - } - - private func encodeHeaderDataForBodyPart(bodyPart: BodyPart) -> NSData { - var headerText = "" - - for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.CRLF)" - } - headerText += EncodingCharacters.CRLF - - return headerText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! - } - - private func encodeBodyStreamDataForBodyPart(bodyPart: BodyPart) throws -> NSData { - let inputStream = bodyPart.bodyStream - inputStream.scheduleInRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) - inputStream.open() - - var error: NSError? - let encoded = NSMutableData() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if inputStream.streamError != nil { - error = inputStream.streamError - break - } - - if bytesRead > 0 { - encoded.appendBytes(buffer, length: bytesRead) - } else if bytesRead < 0 { - let failureReason = "Failed to read from input stream: \(inputStream)" - error = Error.errorWithCode(.InputStreamReadFailed, failureReason: failureReason) - break - } else { - break - } - } - - inputStream.close() - inputStream.removeFromRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) - - if let error = error { - throw error - } - - return encoded - } - - // MARK: - Private - Writing Body Part to Output Stream - - private func writeBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - try writeInitialBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeHeaderDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeBodyStreamForBodyPart(bodyPart, toOutputStream: outputStream) - try writeFinalBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) - } - - private func writeInitialBoundaryDataForBodyPart( - bodyPart: BodyPart, - toOutputStream outputStream: NSOutputStream) - throws - { - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try writeData(initialData, toOutputStream: outputStream) - } - - private func writeHeaderDataForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - let headerData = encodeHeaderDataForBodyPart(bodyPart) - return try writeData(headerData, toOutputStream: outputStream) - } - - private func writeBodyStreamForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - let inputStream = bodyPart.bodyStream - inputStream.scheduleInRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) - inputStream.open() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let streamError = inputStream.streamError { - throw streamError - } - - if bytesRead > 0 { - if buffer.count != bytesRead { - buffer = Array(buffer[0.. 0 { - if outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - - if let streamError = outputStream.streamError { - throw streamError - } - - if bytesWritten < 0 { - let failureReason = "Failed to write to output stream: \(outputStream)" - throw Error.errorWithCode(.OutputStreamWriteFailed, failureReason: failureReason) - } - - bytesToWrite -= bytesWritten - - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. String { - if let - id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension, nil)?.takeRetainedValue(), - contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() - { - return contentType as String - } - - return "application/octet-stream" - } - - // MARK: - Private - Content Headers - - private func contentHeaders(name name: String) -> [String: String] { - return ["Content-Disposition": "form-data; name=\"\(name)\""] - } - - private func contentHeaders(name name: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"", - "Content-Type": "\(mimeType)" - ] - } - - private func contentHeaders(name name: String, fileName: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"; filename=\"\(fileName)\"", - "Content-Type": "\(mimeType)" - ] - } - - // MARK: - Private - Boundary Encoding - - private func initialBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Initial, boundary: boundary) - } - - private func encapsulatedBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Encapsulated, boundary: boundary) - } - - private func finalBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Final, boundary: boundary) - } - - // MARK: - Private - Errors - - private func setBodyPartError(error: NSError) { - if bodyPartError == nil { - bodyPartError = error - } - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/ParameterEncoding.swift b/iOS-Base-Library/Pods/Alamofire/Source/ParameterEncoding.swift deleted file mode 100644 index d56d2d6c..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/ParameterEncoding.swift +++ /dev/null @@ -1,251 +0,0 @@ -// ParameterEncoding.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -/** - HTTP method definitions. - - See https://tools.ietf.org/html/rfc7231#section-4.3 -*/ -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT -} - -// MARK: ParameterEncoding - -/** - Used to specify the way in which a set of parameters are applied to a URL request. - - - `URL`: Creates a query string to be set as or appended to any existing URL query for `GET`, `HEAD`, - and `DELETE` requests, or set as the body for requests with any other HTTP method. The - `Content-Type` HTTP header field of an encoded request with HTTP body is set to - `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification - for how to encode collection types, the convention of appending `[]` to the key for array - values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested - dictionary values (`foo[bar]=baz`). - - - `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same - implementation as the `.URL` case, but always applies the encoded result to the URL. - - - `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is - set as the body of the request. The `Content-Type` HTTP header field of an encoded request is - set to `application/json`. - - - `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, - according to the associated format and write options values, which is set as the body of the - request. The `Content-Type` HTTP header field of an encoded request is set to - `application/x-plist`. - - - `Custom`: Uses the associated closure value to construct a new request given an existing request and - parameters. -*/ -public enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(NSPropertyListFormat, NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) - - /** - Creates a URL request by encoding parameters and applying them onto an existing request. - - - parameter URLRequest: The request to have parameters applied - - parameter parameters: The parameters to apply - - - returns: A tuple containing the constructed request and the error that occurred during parameter encoding, - if any. - */ - public func encode( - URLRequest: URLRequestConvertible, - parameters: [String: AnyObject]?) - -> (NSMutableURLRequest, NSError?) - { - var mutableURLRequest = URLRequest.URLRequest - - guard let parameters = parameters where !parameters.isEmpty else { - return (mutableURLRequest, nil) - } - - var encodingError: NSError? = nil - - switch self { - case .URL, .URLEncodedInURL: - func query(parameters: [String: AnyObject]) -> String { - var components: [(String, String)] = [] - - for key in parameters.keys.sort(<) { - let value = parameters[key]! - components += queryComponents(key, value) - } - - return (components.map { "\($0)=\($1)" } as [String]).joinWithSeparator("&") - } - - func encodesParametersInURL(method: Method) -> Bool { - switch self { - case .URLEncodedInURL: - return true - default: - break - } - - switch method { - case .GET, .HEAD, .DELETE: - return true - default: - return false - } - } - - if let method = Method(rawValue: mutableURLRequest.HTTPMethod) where encodesParametersInURL(method) { - if let URLComponents = NSURLComponents(URL: mutableURLRequest.URL!, resolvingAgainstBaseURL: false) { - let percentEncodedQuery = (URLComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - URLComponents.percentEncodedQuery = percentEncodedQuery - mutableURLRequest.URL = URLComponents.URL - } - } else { - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue( - "application/x-www-form-urlencoded; charset=utf-8", - forHTTPHeaderField: "Content-Type" - ) - } - - mutableURLRequest.HTTPBody = query(parameters).dataUsingEncoding( - NSUTF8StringEncoding, - allowLossyConversion: false - ) - } - case .JSON: - do { - let options = NSJSONWritingOptions() - let data = try NSJSONSerialization.dataWithJSONObject(parameters, options: options) - - mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError - } - case .PropertyList(let format, let options): - do { - let data = try NSPropertyListSerialization.dataWithPropertyList( - parameters, - format: format, - options: options - ) - mutableURLRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError - } - case .Custom(let closure): - (mutableURLRequest, encodingError) = closure(mutableURLRequest, parameters) - } - - return (mutableURLRequest, encodingError) - } - - /** - Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. - - - parameter key: The key of the query component. - - parameter value: The value of the query component. - - - returns: The percent-escaped, URL encoded query string components. - */ - public func queryComponents(key: String, _ value: AnyObject) -> [(String, String)] { - var components: [(String, String)] = [] - - if let dictionary = value as? [String: AnyObject] { - for (nestedKey, value) in dictionary { - components += queryComponents("\(key)[\(nestedKey)]", value) - } - } else if let array = value as? [AnyObject] { - for value in array { - components += queryComponents("\(key)[]", value) - } - } else { - components.append((escape(key), escape("\(value)"))) - } - - return components - } - - /** - Returns a percent-escaped string following RFC 3986 for a query string key or value. - - RFC 3986 states that the following characters are "reserved" characters. - - - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - - In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - should be percent-escaped in the query string. - - - parameter string: The string to be percent-escaped. - - - returns: The percent-escaped string. - */ - public func escape(string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - - let allowedCharacterSet = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet - allowedCharacterSet.removeCharactersInString(generalDelimitersToEncode + subDelimitersToEncode) - - var escaped = "" - - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinense characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== - - if #available(iOS 8.3, OSX 10.10, *) { - escaped = string.stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) ?? string - } else { - let batchSize = 50 - var index = string.startIndex - - while index != string.endIndex { - let startIndex = index - let endIndex = index.advancedBy(batchSize, limit: string.endIndex) - let range = Range(start: startIndex, end: endIndex) - - let substring = string.substringWithRange(range) - - escaped += substring.stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) ?? substring - - index = endIndex - } - } - - return escaped - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Request.swift b/iOS-Base-Library/Pods/Alamofire/Source/Request.swift deleted file mode 100644 index 3e242e7e..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Request.swift +++ /dev/null @@ -1,538 +0,0 @@ -// Request.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -/** - Responsible for sending a request and receiving the response and associated data from the server, as well as - managing its underlying `NSURLSessionTask`. -*/ -public class Request { - - // MARK: - Properties - - /// The delegate for the underlying task. - public let delegate: TaskDelegate - - /// The underlying task. - public var task: NSURLSessionTask { return delegate.task } - - /// The session belonging to the underlying task. - public let session: NSURLSession - - /// The request sent or to be sent to the server. - public var request: NSURLRequest? { return task.originalRequest } - - /// The response received from the server, if any. - public var response: NSHTTPURLResponse? { return task.response as? NSHTTPURLResponse } - - /// The progress of the request lifecycle. - public var progress: NSProgress { return delegate.progress } - - // MARK: - Lifecycle - - init(session: NSURLSession, task: NSURLSessionTask) { - self.session = session - - switch task { - case is NSURLSessionUploadTask: - self.delegate = UploadTaskDelegate(task: task) - case is NSURLSessionDataTask: - self.delegate = DataTaskDelegate(task: task) - case is NSURLSessionDownloadTask: - self.delegate = DownloadTaskDelegate(task: task) - default: - self.delegate = TaskDelegate(task: task) - } - } - - // MARK: - Authentication - - /** - Associates an HTTP Basic credential with the request. - - - parameter user: The user. - - parameter password: The password. - - parameter persistence: The URL credential persistence. `.ForSession` by default. - - - returns: The request. - */ - public func authenticate( - user user: String, - password: String, - persistence: NSURLCredentialPersistence = .ForSession) - -> Self - { - let credential = NSURLCredential(user: user, password: password, persistence: persistence) - - return authenticate(usingCredential: credential) - } - - /** - Associates a specified credential with the request. - - - parameter credential: The credential. - - - returns: The request. - */ - public func authenticate(usingCredential credential: NSURLCredential) -> Self { - delegate.credential = credential - - return self - } - - // MARK: - Progress - - /** - Sets a closure to be called periodically during the lifecycle of the request as data is written to or read - from the server. - - - For uploads, the progress closure returns the bytes written, total bytes written, and total bytes expected - to write. - - For downloads and data tasks, the progress closure returns the bytes read, total bytes read, and total bytes - expected to read. - - - parameter closure: The code to be executed periodically during the lifecycle of the request. - - - returns: The request. - */ - public func progress(closure: ((Int64, Int64, Int64) -> Void)? = nil) -> Self { - if let uploadDelegate = delegate as? UploadTaskDelegate { - uploadDelegate.uploadProgress = closure - } else if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataProgress = closure - } else if let downloadDelegate = delegate as? DownloadTaskDelegate { - downloadDelegate.downloadProgress = closure - } - - return self - } - - /** - Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. - - This closure returns the bytes most recently received from the server, not including data from previous calls. - If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - also important to note that the `response` closure will be called with nil `responseData`. - - - parameter closure: The code to be executed periodically during the lifecycle of the request. - - - returns: The request. - */ - public func stream(closure: (NSData -> Void)? = nil) -> Self { - if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataStream = closure - } - - return self - } - - // MARK: - State - - /** - Suspends the request. - */ - public func suspend() { - task.suspend() - } - - /** - Resumes the request. - */ - public func resume() { - task.resume() - } - - /** - Cancels the request. - */ - public func cancel() { - if let - downloadDelegate = delegate as? DownloadTaskDelegate, - downloadTask = downloadDelegate.downloadTask - { - downloadTask.cancelByProducingResumeData { data in - downloadDelegate.resumeData = data - } - } else { - task.cancel() - } - } - - // MARK: - TaskDelegate - - /** - The task delegate is responsible for handling all delegate callbacks for the underlying task as well as - executing all operations attached to the serial operation queue upon task completion. - */ - public class TaskDelegate: NSObject { - - /// The serial operation queue used to execute all operations after the task completes. - public let queue: NSOperationQueue - - let task: NSURLSessionTask - let progress: NSProgress - - var data: NSData? { return nil } - var error: NSError? - - var credential: NSURLCredential? - - init(task: NSURLSessionTask) { - self.task = task - self.progress = NSProgress(totalUnitCount: 0) - self.queue = { - let operationQueue = NSOperationQueue() - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.suspended = true - - if #available(OSX 10.10, *) { - operationQueue.qualityOfService = NSQualityOfService.Utility - } - - return operationQueue - }() - } - - deinit { - queue.cancelAllOperations() - queue.suspended = false - } - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? - var taskDidCompleteWithError: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: ((NSURLRequest?) -> Void)) - { - var redirectRequest: NSURLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } - } - } else { - if challenge.previousFailureCount > 0 { - disposition = .CancelAuthenticationChallenge - } else { - credential = self.credential ?? session.configuration.URLCredentialStorage?.defaultCredentialForProtectionSpace(challenge.protectionSpace) - - if credential != nil { - disposition = .UseCredential - } - } - } - - completionHandler(disposition, credential) - } - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) - { - var bodyStream: NSInputStream? - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) - } - - completionHandler(bodyStream) - } - - func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - self.error = error - - if let - downloadDelegate = self as? DownloadTaskDelegate, - userInfo = error.userInfo as? [String: AnyObject], - resumeData = userInfo[NSURLSessionDownloadTaskResumeData] as? NSData - { - downloadDelegate.resumeData = resumeData - } - } - - queue.suspended = false - } - } - } - - // MARK: - DataTaskDelegate - - class DataTaskDelegate: TaskDelegate, NSURLSessionDataDelegate { - var dataTask: NSURLSessionDataTask? { return task as? NSURLSessionDataTask } - - private var totalBytesReceived: Int64 = 0 - private var mutableData: NSMutableData - override var data: NSData? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } - - private var expectedContentLength: Int64? - private var dataProgress: ((bytesReceived: Int64, totalBytesReceived: Int64, totalBytesExpectedToReceive: Int64) -> Void)? - private var dataStream: ((data: NSData) -> Void)? - - override init(task: NSURLSessionTask) { - mutableData = NSMutableData() - super.init(task: task) - } - - // MARK: - NSURLSessionDataDelegate - - // MARK: Override Closures - - var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: (NSURLSessionResponseDisposition -> Void)) - { - var disposition: NSURLSessionResponseDisposition = .Allow - - expectedContentLength = response.expectedContentLength - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } - - func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data: data) - } else { - mutableData.appendData(data) - } - - totalBytesReceived += data.length - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived - - dataProgress?( - bytesReceived: Int64(data.length), - totalBytesReceived: totalBytesReceived, - totalBytesExpectedToReceive: totalBytesExpected - ) - } - } - - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: ((NSCachedURLResponse?) -> Void)) - { - var cachedResponse: NSCachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) - } - - completionHandler(cachedResponse) - } - } -} - -// MARK: - CustomStringConvertible - -extension Request: CustomStringConvertible { - - /** - The textual representation used when written to an output stream, which includes the HTTP method and URL, as - well as the response status code if a response has been received. - */ - public var description: String { - var components: [String] = [] - - if let HTTPMethod = request?.HTTPMethod { - components.append(HTTPMethod) - } - - if let URLString = request?.URL?.absoluteString { - components.append(URLString) - } - - if let response = response { - components.append("(\(response.statusCode))") - } - - return components.joinWithSeparator(" ") - } -} - -// MARK: - CustomDebugStringConvertible - -extension Request: CustomDebugStringConvertible { - func cURLRepresentation() -> String { - var components = ["$ curl -i"] - - guard let - request = self.request, - URL = request.URL, - host = URL.host - else { - return "$ curl command could not be created" - } - - if let HTTPMethod = request.HTTPMethod where HTTPMethod != "GET" { - components.append("-X \(HTTPMethod)") - } - - if let credentialStorage = self.session.configuration.URLCredentialStorage { - let protectionSpace = NSURLProtectionSpace( - host: host, - port: URL.port?.integerValue ?? 0, - `protocol`: URL.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) - - if let credentials = credentialStorage.credentialsForProtectionSpace(protectionSpace)?.values { - for credential in credentials { - components.append("-u \(credential.user!):\(credential.password!)") - } - } else { - if let credential = delegate.credential { - components.append("-u \(credential.user!):\(credential.password!)") - } - } - } - - if session.configuration.HTTPShouldSetCookies { - if let - cookieStorage = session.configuration.HTTPCookieStorage, - cookies = cookieStorage.cookiesForURL(URL) where !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value ?? String());" } - components.append("-b \"\(string.substringToIndex(string.endIndex.predecessor()))\"") - } - } - - if let headerFields = request.allHTTPHeaderFields { - for (field, value) in headerFields { - switch field { - case "Cookie": - continue - default: - components.append("-H \"\(field): \(value)\"") - } - } - } - - if let additionalHeaders = session.configuration.HTTPAdditionalHeaders { - for (field, value) in additionalHeaders { - switch field { - case "Cookie": - continue - default: - components.append("-H \"\(field): \(value)\"") - } - } - } - - if let - HTTPBodyData = request.HTTPBody, - HTTPBody = String(data: HTTPBodyData, encoding: NSUTF8StringEncoding) - { - let escapedBody = HTTPBody.stringByReplacingOccurrencesOfString("\"", withString: "\\\"") - components.append("-d \"\(escapedBody)\"") - } - - components.append("\"\(URL.absoluteString)\"") - - return components.joinWithSeparator(" \\\n\t") - } - - /// The textual representation used when written to an output stream, in the form of a cURL command. - public var debugDescription: String { - return cURLRepresentation() - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Response.swift b/iOS-Base-Library/Pods/Alamofire/Source/Response.swift deleted file mode 100644 index fa2fffb3..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Response.swift +++ /dev/null @@ -1,83 +0,0 @@ -// Response.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -/// Used to store all response data returned from a completed `Request`. -public struct Response { - /// The URL request sent to the server. - public let request: NSURLRequest? - - /// The server's response to the URL request. - public let response: NSHTTPURLResponse? - - /// The data returned by the server. - public let data: NSData? - - /// The result of response serialization. - public let result: Result - - /** - Initializes the `Response` instance with the specified URL request, URL response, server data and response - serialization result. - - - parameter request: The URL request sent to the server. - - parameter response: The server's response to the URL request. - - parameter data: The data returned by the server. - - parameter result: The result of response serialization. - - - returns: the new `Response` instance. - */ - public init(request: NSURLRequest?, response: NSHTTPURLResponse?, data: NSData?, result: Result) { - self.request = request - self.response = response - self.data = data - self.result = result - } -} - -// MARK: - CustomStringConvertible - -extension Response: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } -} - -// MARK: - CustomDebugStringConvertible - -extension Response: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data and the response serialization result. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[Data]: \(data?.length ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - - return output.joinWithSeparator("\n") - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/ResponseSerialization.swift b/iOS-Base-Library/Pods/Alamofire/Source/ResponseSerialization.swift deleted file mode 100644 index 4aaacf61..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/ResponseSerialization.swift +++ /dev/null @@ -1,355 +0,0 @@ -// ResponseSerialization.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -// MARK: ResponseSerializer - -/** - The type in which all response serializers must conform to in order to serialize a response. -*/ -public protocol ResponseSerializerType { - /// The type of serialized object to be created by this `ResponseSerializerType`. - typealias SerializedObject - - /// The type of error to be created by this `ResponseSerializer` if serialization fails. - typealias ErrorObject: ErrorType - - /** - A closure used by response handlers that takes a request, response, data and error and returns a result. - */ - var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result { get } -} - -// MARK: - - -/** - A generic `ResponseSerializerType` used to serialize a request, response, and data into a serialized object. -*/ -public struct ResponseSerializer: ResponseSerializerType { - /// The type of serialized object to be created by this `ResponseSerializer`. - public typealias SerializedObject = Value - - /// The type of error to be created by this `ResponseSerializer` if serialization fails. - public typealias ErrorObject = Error - - /** - A closure used by response handlers that takes a request, response, data and error and returns a result. - */ - public var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result - - /** - Initializes the `ResponseSerializer` instance with the given serialize response closure. - - - parameter serializeResponse: The closure used to serialize the response. - - - returns: The new generic response serializer instance. - */ - public init(serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - Default - -extension Request { - - /** - Adds a handler to be called once the request has finished. - - - parameter queue: The queue on which the completion handler is dispatched. - - parameter completionHandler: The code to be executed once the request has finished. - - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Void) - -> Self - { - delegate.queue.addOperationWithBlock { - dispatch_async(queue ?? dispatch_get_main_queue()) { - completionHandler(self.request, self.response, self.delegate.data, self.delegate.error) - } - } - - return self - } - - /** - Adds a handler to be called once the request has finished. - - - parameter queue: The queue on which the completion handler is dispatched. - - parameter responseSerializer: The response serializer responsible for serializing the request, response, - and data. - - parameter completionHandler: The code to be executed once the request has finished. - - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, - responseSerializer: T, - completionHandler: Response -> Void) - -> Self - { - delegate.queue.addOperationWithBlock { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.delegate.data, - self.delegate.error - ) - - dispatch_async(queue ?? dispatch_get_main_queue()) { - let response = Response( - request: self.request, - response: self.response, - data: self.delegate.data, - result: result - ) - - completionHandler(response) - } - } - - return self - } -} - -// MARK: - Data - -extension Request { - - /** - Creates a response serializer that returns the associated data as-is. - - - returns: A data response serializer. - */ - public static func dataResponseSerializer() -> ResponseSerializer { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success(NSData()) } - - guard let validData = data else { - let failureReason = "Data could not be serialized. Input data was nil." - let error = Error.errorWithCode(.DataSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - return .Success(validData) - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter completionHandler: The code to be executed once the request has finished. - - - returns: The request. - */ - public func responseData(completionHandler: Response -> Void) -> Self { - return response(responseSerializer: Request.dataResponseSerializer(), completionHandler: completionHandler) - } -} - -// MARK: - String - -extension Request { - - /** - Creates a response serializer that returns a string initialized from the response data with the specified - string encoding. - - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - response, falling back to the default HTTP default character set, ISO-8859-1. - - - returns: A string response serializer. - */ - public static func stringResponseSerializer( - var encoding encoding: NSStringEncoding? = nil) - -> ResponseSerializer - { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success("") } - - guard let validData = data else { - let failureReason = "String could not be serialized. Input data was nil." - let error = Error.errorWithCode(.StringSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - if let encodingName = response?.textEncodingName where encoding == nil { - encoding = CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName) - ) - } - - let actualEncoding = encoding ?? NSISOLatin1StringEncoding - - if let string = String(data: validData, encoding: actualEncoding) { - return .Success(string) - } else { - let failureReason = "String could not be serialized with encoding: \(actualEncoding)" - let error = Error.errorWithCode(.StringSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - server response, falling back to the default HTTP default character set, - ISO-8859-1. - - parameter completionHandler: A closure to be executed once the request has finished. - - - returns: The request. - */ - public func responseString( - encoding encoding: NSStringEncoding? = nil, - completionHandler: Response -> Void) - -> Self - { - return response( - responseSerializer: Request.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -// MARK: - JSON - -extension Request { - - /** - Creates a response serializer that returns a JSON object constructed from the response data using - `NSJSONSerialization` with the specified reading options. - - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. - - - returns: A JSON object response serializer. - */ - public static func JSONResponseSerializer( - options options: NSJSONReadingOptions = .AllowFragments) - -> ResponseSerializer - { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success(NSNull()) } - - guard let validData = data where validData.length > 0 else { - let failureReason = "JSON could not be serialized. Input data was nil or zero length." - let error = Error.errorWithCode(.JSONSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - do { - let JSON = try NSJSONSerialization.JSONObjectWithData(validData, options: options) - return .Success(JSON) - } catch { - return .Failure(error as NSError) - } - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. - - parameter completionHandler: A closure to be executed once the request has finished. - - - returns: The request. - */ - public func responseJSON( - options options: NSJSONReadingOptions = .AllowFragments, - completionHandler: Response -> Void) - -> Self - { - return response( - responseSerializer: Request.JSONResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -// MARK: - Property List - -extension Request { - - /** - Creates a response serializer that returns an object constructed from the response data using - `NSPropertyListSerialization` with the specified reading options. - - - parameter options: The property list reading options. `NSPropertyListReadOptions()` by default. - - - returns: A property list object response serializer. - */ - public static func propertyListResponseSerializer( - options options: NSPropertyListReadOptions = NSPropertyListReadOptions()) - -> ResponseSerializer - { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success(NSNull()) } - - guard let validData = data where validData.length > 0 else { - let failureReason = "Property list could not be serialized. Input data was nil or zero length." - let error = Error.errorWithCode(.PropertyListSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - do { - let plist = try NSPropertyListSerialization.propertyListWithData(validData, options: options, format: nil) - return .Success(plist) - } catch { - return .Failure(error as NSError) - } - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter options: The property list reading options. `0` by default. - - parameter completionHandler: A closure to be executed once the request has finished. The closure takes 3 - arguments: the URL request, the URL response, the server data and the result - produced while creating the property list. - - - returns: The request. - */ - public func responsePropertyList( - options options: NSPropertyListReadOptions = NSPropertyListReadOptions(), - completionHandler: Response -> Void) - -> Self - { - return response( - responseSerializer: Request.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Result.swift b/iOS-Base-Library/Pods/Alamofire/Source/Result.swift deleted file mode 100644 index a8557cab..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Result.swift +++ /dev/null @@ -1,101 +0,0 @@ -// Result.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -/** - Used to represent whether a request was successful or encountered an error. - - - Success: The request and all post processing operations were successful resulting in the serialization of the - provided associated value. - - Failure: The request encountered an error resulting in a failure. The associated values are the original data - provided by the server as well as the error that caused the failure. -*/ -public enum Result { - case Success(Value) - case Failure(Error) - - /// Returns `true` if the result is a success, `false` otherwise. - public var isSuccess: Bool { - switch self { - case .Success: - return true - case .Failure: - return false - } - } - - /// Returns `true` if the result is a failure, `false` otherwise. - public var isFailure: Bool { - return !isSuccess - } - - /// Returns the associated value if the result is a success, `nil` otherwise. - public var value: Value? { - switch self { - case .Success(let value): - return value - case .Failure: - return nil - } - } - - /// Returns the associated error value if the result is a failure, `nil` otherwise. - public var error: Error? { - switch self { - case .Success: - return nil - case .Failure(let error): - return error - } - } -} - -// MARK: - CustomStringConvertible - -extension Result: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - switch self { - case .Success: - return "SUCCESS" - case .Failure: - return "FAILURE" - } - } -} - -// MARK: - CustomDebugStringConvertible - -extension Result: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes whether the result was a - /// success or failure in addition to the value or error. - public var debugDescription: String { - switch self { - case .Success(let value): - return "SUCCESS: \(value)" - case .Failure(let error): - return "FAILURE: \(error)" - } - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/ServerTrustPolicy.swift b/iOS-Base-Library/Pods/Alamofire/Source/ServerTrustPolicy.swift deleted file mode 100644 index 07cd848a..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ /dev/null @@ -1,302 +0,0 @@ -// ServerTrustPolicy.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -public class ServerTrustPolicyManager { - /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /** - Initializes the `ServerTrustPolicyManager` instance with the given policies. - - Since different servers and web services can have different leaf certificates, intermediate and even root - certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - pinning for host3 and disabling evaluation for host4. - - - parameter policies: A dictionary of all policies mapped to a particular host. - - - returns: The new `ServerTrustPolicyManager` instance. - */ - public init(policies: [String: ServerTrustPolicy]) { - self.policies = policies - } - - /** - Returns the `ServerTrustPolicy` for the given host if applicable. - - By default, this method will return the policy that perfectly matches the given host. Subclasses could override - this method and implement more complex mapping implementations such as wildcards. - - - parameter host: The host to use when searching for a matching policy. - - - returns: The server trust policy for the given host if found. - */ - public func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { - return policies[host] - } -} - -// MARK: - - -extension NSURLSession { - private struct AssociatedKeys { - static var ManagerKey = "NSURLSession.ServerTrustPolicyManager" - } - - var serverTrustPolicyManager: ServerTrustPolicyManager? { - get { - return objc_getAssociatedObject(self, &AssociatedKeys.ManagerKey) as? ServerTrustPolicyManager - } - set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.ManagerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - -// MARK: - ServerTrustPolicy - -/** - The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when - connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust - with a given set of criteria to determine whether the server trust is valid and the connection should be made. - - Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other - vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged - to route all communication over an HTTPS connection with pinning enabled. - - - PerformDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to - validate the host provided by the challenge. Applications are encouraged to always - validate the host in production environments to guarantee the validity of the server's - certificate chain. - - - PinCertificates: Uses the pinned certificates to validate the server trust. The server trust is - considered valid if one of the pinned certificates match one of the server certificates. - By validating both the certificate chain and host, certificate pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - PinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered - valid if one of the pinned public keys match one of the server certificate public keys. - By validating both the certificate chain and host, public key pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - DisableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. - - - CustomEvaluation: Uses the associated closure to evaluate the validity of the server trust. -*/ -public enum ServerTrustPolicy { - case PerformDefaultEvaluation(validateHost: Bool) - case PinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case PinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case DisableEvaluation - case CustomEvaluation((serverTrust: SecTrust, host: String) -> Bool) - - // MARK: - Bundle Location - - /** - Returns all certificates within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `.cer` files. - - - returns: All certificates within the given bundle. - */ - public static func certificatesInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecCertificate] { - var certificates: [SecCertificate] = [] - - let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in - bundle.pathsForResourcesOfType(fileExtension, inDirectory: nil) - }.flatten()) - - for path in paths { - if let - certificateData = NSData(contentsOfFile: path), - certificate = SecCertificateCreateWithData(nil, certificateData) - { - certificates.append(certificate) - } - } - - return certificates - } - - /** - Returns all public keys within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `*.cer` files. - - - returns: All public keys within the given bundle. - */ - public static func publicKeysInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for certificate in certificatesInBundle(bundle) { - if let publicKey = publicKeyForCertificate(certificate) { - publicKeys.append(publicKey) - } - } - - return publicKeys - } - - // MARK: - Evaluation - - /** - Evaluates whether the server trust is valid for the given host. - - - parameter serverTrust: The server trust to evaluate. - - parameter host: The host of the challenge protection space. - - - returns: Whether the server trust is valid. - */ - public func evaluateServerTrust(serverTrust: SecTrust, isValidForHost host: String) -> Bool { - var serverTrustIsValid = false - - switch self { - case let .PerformDefaultEvaluation(validateHost): - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .PinCertificates(pinnedCertificates, validateCertificateChain, validateHost): - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) - - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates) - SecTrustSetAnchorCertificatesOnly(serverTrust, true) - - serverTrustIsValid = trustIsValid(serverTrust) - } else { - let serverCertificatesDataArray = certificateDataForTrust(serverTrust) - let pinnedCertificatesDataArray = certificateDataForCertificates(pinnedCertificates) - - outerLoop: for serverCertificateData in serverCertificatesDataArray { - for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData.isEqualToData(pinnedCertificateData) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case let .PinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): - var certificateChainEvaluationPassed = true - - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) - - certificateChainEvaluationPassed = trustIsValid(serverTrust) - } - - if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeysForTrust(serverTrust) as [AnyObject] { - for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { - if serverPublicKey.isEqual(pinnedPublicKey) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case .DisableEvaluation: - serverTrustIsValid = true - case let .CustomEvaluation(closure): - serverTrustIsValid = closure(serverTrust: serverTrust, host: host) - } - - return serverTrustIsValid - } - - // MARK: - Private - Trust Validation - - private func trustIsValid(trust: SecTrust) -> Bool { - var isValid = false - - var result = SecTrustResultType(kSecTrustResultInvalid) - let status = SecTrustEvaluate(trust, &result) - - if status == errSecSuccess { - let unspecified = SecTrustResultType(kSecTrustResultUnspecified) - let proceed = SecTrustResultType(kSecTrustResultProceed) - - isValid = result == unspecified || result == proceed - } - - return isValid - } - - // MARK: - Private - Certificate Data - - private func certificateDataForTrust(trust: SecTrust) -> [NSData] { - var certificates: [SecCertificate] = [] - - for index in 0.. [NSData] { - return certificates.map { SecCertificateCopyData($0) as NSData } - } - - // MARK: - Private - Public Key Extraction - - private static func publicKeysForTrust(trust: SecTrust) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for index in 0.. SecKey? { - var publicKey: SecKey? - - let policy = SecPolicyCreateBasicX509() - var trust: SecTrust? - let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - - if let trust = trust where trustCreationStatus == errSecSuccess { - publicKey = SecTrustCopyPublicKey(trust) - } - - return publicKey - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Stream.swift b/iOS-Base-Library/Pods/Alamofire/Source/Stream.swift deleted file mode 100644 index bc9ee450..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Stream.swift +++ /dev/null @@ -1,180 +0,0 @@ -// Stream.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -#if !os(watchOS) - -@available(iOS 9.0, OSX 10.11, *) -extension Manager { - private enum Streamable { - case Stream(String, Int) - case NetService(NSNetService) - } - - private func stream(streamable: Streamable) -> Request { - var streamTask: NSURLSessionStreamTask! - - switch streamable { - case .Stream(let hostName, let port): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithHostName(hostName, port: port) - } - case .NetService(let netService): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithNetService(netService) - } - } - - let request = Request(session: session, task: streamTask) - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - /** - Creates a request for bidirectional streaming with the given hostname and port. - - - parameter hostName: The hostname of the server to connect to. - - parameter port: The port of the server to connect to. - - :returns: The created stream request. - */ - public func stream(hostName hostName: String, port: Int) -> Request { - return stream(.Stream(hostName, port)) - } - - /** - Creates a request for bidirectional streaming with the given `NSNetService`. - - - parameter netService: The net service used to identify the endpoint. - - - returns: The created stream request. - */ - public func stream(netService netService: NSNetService) -> Request { - return stream(.NetService(netService)) - } -} - -// MARK: - - -@available(iOS 9.0, OSX 10.11, *) -extension Manager.SessionDelegate: NSURLSessionStreamDelegate { - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:readClosedForStreamTask:`. - public var streamTaskReadClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:writeClosedForStreamTask:`. - public var streamTaskWriteClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:betterRouteDiscoveredForStreamTask:`. - public var streamTaskBetterRouteDiscovered: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:streamTask:didBecomeInputStream:outputStream:`. - public var streamTaskDidBecomeInputStream: ((NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue - } - } - - // MARK: Delegate Methods - - /** - Tells the delegate that the read side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, readClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } - - /** - Tells the delegate that the write side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, writeClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } - - /** - Tells the delegate that the system has determined that a better route to the host is available. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, betterRouteDiscoveredForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } - - /** - Tells the delegate that the stream task has been completed and provides the unopened stream objects. - - - parameter session: The session. - - parameter streamTask: The stream task. - - parameter inputStream: The new input stream. - - parameter outputStream: The new output stream. - */ - public func URLSession( - session: NSURLSession, - streamTask: NSURLSessionStreamTask, - didBecomeInputStream inputStream: NSInputStream, - outputStream: NSOutputStream) - { - streamTaskDidBecomeInputStream?(session, streamTask, inputStream, outputStream) - } -} - -#endif diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Upload.swift b/iOS-Base-Library/Pods/Alamofire/Source/Upload.swift deleted file mode 100644 index ee6b34ce..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Upload.swift +++ /dev/null @@ -1,372 +0,0 @@ -// Upload.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -extension Manager { - private enum Uploadable { - case Data(NSURLRequest, NSData) - case File(NSURLRequest, NSURL) - case Stream(NSURLRequest, NSInputStream) - } - - private func upload(uploadable: Uploadable) -> Request { - var uploadTask: NSURLSessionUploadTask! - var HTTPBodyStream: NSInputStream? - - switch uploadable { - case .Data(let request, let data): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromData: data) - } - case .File(let request, let fileURL): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromFile: fileURL) - } - case .Stream(let request, let stream): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithStreamedRequest(request) - } - - HTTPBodyStream = stream - } - - let request = Request(session: session, task: uploadTask) - - if HTTPBodyStream != nil { - request.delegate.taskNeedNewBodyStream = { _, _ in - return HTTPBodyStream - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: File - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return upload(.File(URLRequest.URLRequest, file)) - } - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - return upload(mutableURLRequest, file: file) - } - - // MARK: Data - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return upload(.Data(URLRequest.URLRequest, data)) - } - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, data: data) - } - - // MARK: Stream - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return upload(.Stream(URLRequest.URLRequest, stream)) - } - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, stream: stream) - } - - // MARK: MultipartFormData - - /// Default memory threshold used when encoding `MultipartFormData`. - public static let MultipartFormDataEncodingMemoryThreshold: UInt64 = 10 * 1024 * 1024 - - /** - Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - associated values. - - - Success: Represents a successful `MultipartFormData` encoding and contains the new `Request` along with - streaming information. - - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - error. - */ - public enum MultipartFormDataEncodingResult { - case Success(request: Request, streamingFromDisk: Bool, streamFileURL: NSURL?) - case Failure(ErrorType) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload( - mutableURLRequest, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { - let formData = MultipartFormData() - multipartFormData(formData) - - let URLRequestWithContentType = URLRequest.URLRequest - URLRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - do { - let data = try formData.encode() - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, data: data), - streamingFromDisk: false, - streamFileURL: nil - ) - - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } else { - let fileManager = NSFileManager.defaultManager() - let tempDirectoryURL = NSURL(fileURLWithPath: NSTemporaryDirectory()) - let directoryURL = tempDirectoryURL.URLByAppendingPathComponent("com.alamofire.manager/multipart.form.data") - let fileName = NSUUID().UUIDString - let fileURL = directoryURL.URLByAppendingPathComponent(fileName) - - do { - try fileManager.createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil) - try formData.writeEncodedDataToDisk(fileURL) - - dispatch_async(dispatch_get_main_queue()) { - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, file: fileURL), - streamingFromDisk: true, - streamFileURL: fileURL - ) - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } - } - } -} - -// MARK: - - -extension Request { - - // MARK: - UploadTaskDelegate - - class UploadTaskDelegate: DataTaskDelegate { - var uploadTask: NSURLSessionUploadTask? { return task as? NSURLSessionUploadTask } - var uploadProgress: ((Int64, Int64, Int64) -> Void)! - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - progress.totalUnitCount = totalBytesExpectedToSend - progress.completedUnitCount = totalBytesSent - - uploadProgress?(bytesSent, totalBytesSent, totalBytesExpectedToSend) - } - } - } -} diff --git a/iOS-Base-Library/Pods/Alamofire/Source/Validation.swift b/iOS-Base-Library/Pods/Alamofire/Source/Validation.swift deleted file mode 100644 index 71d21e1a..00000000 --- a/iOS-Base-Library/Pods/Alamofire/Source/Validation.swift +++ /dev/null @@ -1,189 +0,0 @@ -// Validation.swift -// -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -import Foundation - -extension Request { - - /** - Used to represent whether validation was successful or encountered an error resulting in a failure. - - - Success: The validation was successful. - - Failure: The validation failed encountering the provided error. - */ - public enum ValidationResult { - case Success - case Failure(NSError) - } - - /** - A closure used to validate a request that takes a URL request and URL response, and returns whether the - request was valid. - */ - public typealias Validation = (NSURLRequest?, NSHTTPURLResponse) -> ValidationResult - - /** - Validates the request, using the specified closure. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter validation: A closure to validate the request. - - - returns: The request. - */ - public func validate(validation: Validation) -> Self { - delegate.queue.addOperationWithBlock { - if let - response = self.response where self.delegate.error == nil, - case let .Failure(error) = validation(self.request, response) - { - self.delegate.error = error - } - } - - return self - } - - // MARK: - Status Code - - /** - Validates that the response has a status code in the specified range. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter range: The range of acceptable status codes. - - - returns: The request. - */ - public func validate(statusCode acceptableStatusCode: S) -> Self { - return validate { _, response in - if acceptableStatusCode.contains(response.statusCode) { - return .Success - } else { - let failureReason = "Response status code was unacceptable: \(response.statusCode)" - return .Failure(Error.errorWithCode(.StatusCodeValidationFailed, failureReason: failureReason)) - } - } - } - - // MARK: - Content-Type - - private struct MIMEType { - let type: String - let subtype: String - - init?(_ string: String) { - let components: [String] = { - let stripped = string.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) - let split = stripped.substringToIndex(stripped.rangeOfString(";")?.startIndex ?? stripped.endIndex) - return split.componentsSeparatedByString("/") - }() - - if let - type = components.first, - subtype = components.last - { - self.type = type - self.subtype = subtype - } else { - return nil - } - } - - func matches(MIME: MIMEType) -> Bool { - switch (type, subtype) { - case (MIME.type, MIME.subtype), (MIME.type, "*"), ("*", MIME.subtype), ("*", "*"): - return true - default: - return false - } - } - } - - /** - Validates that the response has a content type in the specified array. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - - - returns: The request. - */ - public func validate(contentType acceptableContentTypes: S) -> Self { - return validate { _, response in - guard let validData = self.delegate.data where validData.length > 0 else { return .Success } - - if let - responseContentType = response.MIMEType, - responseMIMEType = MIMEType(responseContentType) - { - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType) where acceptableMIMEType.matches(responseMIMEType) { - return .Success - } - } - } else { - for contentType in acceptableContentTypes { - if let MIMEType = MIMEType(contentType) where MIMEType.type == "*" && MIMEType.subtype == "*" { - return .Success - } - } - } - - let failureReason: String - - if let responseContentType = response.MIMEType { - failureReason = ( - "Response content type \"\(responseContentType)\" does not match any acceptable " + - "content types: \(acceptableContentTypes)" - ) - } else { - failureReason = "Response content type was missing and acceptable content type does not match \"*/*\"" - } - - return .Failure(Error.errorWithCode(.ContentTypeValidationFailed, failureReason: failureReason)) - } - } - - // MARK: - Automatic - - /** - Validates that the response has a status code in the default acceptable range of 200...299, and that the content - type matches any specified in the Accept HTTP header field. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - returns: The request. - */ - public func validate() -> Self { - let acceptableStatusCodes: Range = 200..<300 - let acceptableContentTypes: [String] = { - if let accept = request?.valueForHTTPHeaderField("Accept") { - return accept.componentsSeparatedByString(",") - } - - return ["*/*"] - }() - - return validate(statusCode: acceptableStatusCodes).validate(contentType: acceptableContentTypes) - } -} diff --git a/iOS-Base-Library/Pods/Manifest.lock b/iOS-Base-Library/Pods/Manifest.lock deleted file mode 100644 index 63d893ed..00000000 --- a/iOS-Base-Library/Pods/Manifest.lock +++ /dev/null @@ -1,25 +0,0 @@ -PODS: - - Alamofire (3.1.5) - - CocoaLumberjack/Core (2.2.0) - - CocoaLumberjack/Default (2.2.0): - - CocoaLumberjack/Core - - CocoaLumberjack/Extensions (2.2.0): - - CocoaLumberjack/Default - - CocoaLumberjack/Swift (2.2.0): - - CocoaLumberjack/Extensions - - Device (0.0.6) - - UIColor_Hex_Swift (1.8) - -DEPENDENCIES: - - Alamofire (~> 3.1.5) - - CocoaLumberjack/Swift (~> 2.2.0) - - Device (~> 0.0.6) - - UIColor_Hex_Swift (~> 1.8) - -SPEC CHECKSUMS: - Alamofire: 5f730ba29fd113b7ddd71c1e65d0c630acf5d7b0 - CocoaLumberjack: 17fe8581f84914d5d7e6360f7c70022b173c3ae0 - Device: 2b48a78b55e5631a8b1006b325dfefc32f6b8690 - UIColor_Hex_Swift: a66b9d5f6e8fddbd9fe32996504f0b7e9d20d680 - -COCOAPODS: 0.39.0 diff --git a/iOS-Base-Library/Pods/Pods.xcodeproj/project.pbxproj b/iOS-Base-Library/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index e1a7d362..00000000 --- a/iOS-Base-Library/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1168 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 065EEEAAEE109C0C6F5542EAABA0E8A0 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2B426DE82562B017148F258C427B032 /* Request.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 093609D078A154B7E17835F75A487E3C /* DDLogMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A66E621C11A1D4884034380F188478 /* DDLogMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 188670D10B2ECB08D680698B464EED9B /* UIColor_Hex_Swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 09996650DA46E6A0CFBB580ACD6C6AC5 /* UIColor_Hex_Swift-dummy.m */; }; - 19CD84CEB6D468F320546AA090E51D3D /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8BFC0B6B2FEB73CD513B71F6BC2A94D /* Response.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 231F317E789DEA785E1B1D1734EB8C40 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */; }; - 2C5450AC69398958CF6F7539EF7D99E5 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EA370D4506C4448CC7231842EDC50772 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2FD9FC4A682F0F9B090634BA8D5473BD /* DDDispatchQueueLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = DAA5715A9F955E1A1F50DBE2954EACA4 /* DDDispatchQueueLogFormatter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 330CA798FC43DDC6DD2D609365E0D96C /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = E713F5C5215A97E820CE5D1CDE692DB9 /* ResponseSerialization.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 33E8C6EBB3829DDEEC3A97482A2762B3 /* Type.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77B38272DB1133132EED417A771E2A38 /* Type.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 38AEB97731426DA92B56E52CCD850851 /* DDAbstractDatabaseLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 512F06E58EFAA7B8CCB44F8A2718D2AF /* DDAbstractDatabaseLogger.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3BDB4B7804C1CC452FEE68C3A2C5CFBC /* HEXColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 24C8BBB33AC1301F7FD39B813D9843DD /* HEXColor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3DB7862FB83E65375AB21FC76E2DE753 /* DDLog+LOGV.h in Headers */ = {isa = PBXBuildFile; fileRef = 825697F085ABB1E60CDCDC9754B92EE7 /* DDLog+LOGV.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E21DD17EC241A38745ABB4B9075F15D /* UIColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5161D59985C68AF126107827D4722F44 /* UIColorExtension.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3F9228CAF4E9FB25F54FF8B1DEC44048 /* DDContextFilterLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = E0840A130953187807690E96079DA6AA /* DDContextFilterLogFormatter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4286EE732D0965BE0D541ACB6D9A3E20 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */; }; - 4324B4F01709A9B109DA71B2FE5A6D45 /* Pods-iOS-Base-Library-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A3FB93D4215D189B81CC48D7FEC4526 /* Pods-iOS-Base-Library-dummy.m */; }; - 437519A278AE2B3E183F1D2FC2B59828 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 317EE76BCDACFC6FE6F8CC7D68F87ACF /* ServerTrustPolicy.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4661B2C1110AEF944B8A9848080FC2A2 /* DDContextFilterLogFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F8C8E949C874E3B82550D27AB5097C /* DDContextFilterLogFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 48DA8D1B20888A371416D803746B1231 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BE5B77AADDBC53561D571A4F576359A9 /* Alamofire-dummy.m */; }; - 58B4B7CF780F91B3FC5A32C54A4231C9 /* DDASLLogCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 5822F4C8DF698447AAB1520509CE05FB /* DDASLLogCapture.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 59BDD0605A645E7A557CA76076B50603 /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = E94008E244E5B36D8C85DA19FE84A2BA /* Download.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6B3139D42A270E91D109EDE2A1F956CD /* Size.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA483AEB762AAFE10EC744A7A263E5F3 /* Size.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 77567A39064755A7CEB4B1B36CA61A21 /* DDFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FC2E67E1D8D9BCE01E9C9DBBC4B1260 /* DDFileLogger.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 787942EE084A25BA375B03380E60C60A /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF001CF5C92299747F7BC86693984B0C /* Stream.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 78C9ED07C7E2BF3A26D549D72779CC8E /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1CF28DE021BF0712DE5386F04D71C71 /* ParameterEncoding.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7953181FD7F91C0AD76B2390BAAB34BF /* DDMultiFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 545AB26534D5A5E3790DBA380D297C87 /* DDMultiFormatter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7B01E037BD5A310074BCDDDB7C549D0B /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDCBA43453CF25A172ED5C700AF2B55F /* Alamofire.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 83DBBC894A6203F6E4CFCDDA4911C9AF /* DDASLLogCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B0833802D4BBEB1BB00427B5ED2EAFC /* DDASLLogCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8658A2C55C19D001827AE43CCDC7F9E3 /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273FBF6B93F133A87CCE0381124D1511 /* Version.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8E4605D767E337FAEEFA6096E5FEC949 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EA86F7D7E4B54F2CAA1A1140C36E56D /* Error.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 91FDF8A5A1BC96856AC4470759421D6B /* DDAssertMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8C00804682C1BD4EE44F3537EDF363 /* DDAssertMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9630205806FA13CEE278F4E4FA6DA3F0 /* DDLegacyMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = EC3A8E58426CF02381A35ECE862F84A9 /* DDLegacyMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 96791A9A2AC373B3169148CFDFB30329 /* DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A7806CB208EE24DF84A90214DB5530D /* DDTTYLogger.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 96D99D0C2472535A169DED65CB231CD7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */; }; - 9CD2DCC591BB67DFE6B167ABB9D8DFF0 /* CocoaLumberjack-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DA890466957B4B5FA44CEBDBF51F4B91 /* CocoaLumberjack-dummy.m */; }; - A0E60FACEB974D1ADB8D4536E7C01DFD /* Device.swift in Sources */ = {isa = PBXBuildFile; fileRef = B111E8ED917D51DB7CE3ACC020292953 /* Device.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A943CEA0E0E9706EDA7D667E54A41383 /* CocoaLumberjack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AA11C4D3A86CB36B743DDE71E157AFA /* CocoaLumberjack.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AB174639B9F72038835786057E67EA87 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */; }; - ADAB596307334EB253E60C441CB46139 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */; }; - B7213CB986069FD0645BB0A90FC8F2BC /* Device-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E02D0FCF5C5B18842871FAAA747B198C /* Device-dummy.m */; }; - BD687FC56130CEEB1049FEEC1127C5F7 /* DDLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A1766BD92395555BDF83ED7551E1AFA /* DDLog.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BED21B6237708EC89E1CDC9E7E4FCB49 /* DDAbstractDatabaseLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D80B56AA98E315DFC1414D7F5B14BF1 /* DDAbstractDatabaseLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0A0547274B4F3B3A59A0B40554047EB /* DDASLLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = A73B94F12073980ADDBB28CE72D53190 /* DDASLLogger.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C3127BE1CA1F3DB05CA0F59A5935AC72 /* DDLog.m in Sources */ = {isa = PBXBuildFile; fileRef = DE6C82409637A265F9DE802E0BC90A95 /* DDLog.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C82EC1B42BD97B178DA73292055CB680 /* UIColor_Hex_Swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 072873B58F65F37656B5D977937AB93C /* UIColor_Hex_Swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD81315E9E8FD7FD4F3C4D28BAB50C3D /* CocoaLumberjack.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5530931E9E42DA58161A7743DE8C /* CocoaLumberjack.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D2D417A51677012E9EEF8F1297F87231 /* DDMultiFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F03A685250BEAEF39084E19C718964 /* DDMultiFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DDB5B8BA0DA6CED6FD0EA2F48B68B243 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3B7BDF5CE5CB8F095FE12DA55D9A9BB /* UIKit.framework */; }; - E00C777CEC02142B0CFA9992750FB5D0 /* Device-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 478429E004ADB11B75B968A56E1E2EAF /* Device-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E4F54D59E9D71C79C438377663E12E22 /* Pods-iOS-Base-Library-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2835FE74B1F742BEA9A8842948B0C993 /* Pods-iOS-Base-Library-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E6B19C962D16AB1371DADFA122D126DE /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D2FF37940268B2FA7264D2FAFAAF6A7 /* Validation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - ECB58C2372417300030D10FE302FD32E /* DDTTYLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B2B74441105E0EE026F171B8A0C966 /* DDTTYLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EE61F282567EEFBBDC8BA0BE06433C6F /* DDFileLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = EB9C168B6AEBA57A6ECFA67BF08DCA58 /* DDFileLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EFD1A8C17A9631363C4AC6E2BE2F1434 /* DDASLLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B35E633D8E61A04C98775C952A0B2D6 /* DDASLLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F29C88F2442FD681048BF648E922C590 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491781738FD4DA7CDA665DABAF06B589 /* Result.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F5466AB5187F836038F95DA160887D05 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11C02880031033121945A930AB1631AD /* MultipartFormData.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FB73CC220FBF2BD69320CC68B7892CFB /* DDDispatchQueueLogFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F0F5840FE874F60427C2AA935E99ADC /* DDDispatchQueueLogFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FCF136B11A94E05EFE2834F776DB9D76 /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3380853B2458AE5AB98E6E259C52D95E /* Upload.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FD827628BC36F9D907F700BE456BDE21 /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CEC78659BE80EA82CEBC0C39B690D4D /* Manager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 391D652523CFEC772A81327F950D6FD8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55ABC5300F5EF855C57F9B23657FB8F7; - remoteInfo = Device; - }; - 8AD3D26FA2907AFBEBAF233D13832D12 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = D082FD9722F53B9C3A1229257D4008F7; - remoteInfo = CocoaLumberjack; - }; - B259513C473ADB45E459BBBAB50B74F6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = FA0B1520A2ABA619BB133BF7BC949A79; - remoteInfo = UIColor_Hex_Swift; - }; - ED7724717BF123AE39A8919F5C9BC37D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 432ECC54282C84882B482CCB4CF227FC; - remoteInfo = Alamofire; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 072873B58F65F37656B5D977937AB93C /* UIColor_Hex_Swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UIColor_Hex_Swift-umbrella.h"; sourceTree = ""; }; - 07E517B7513E7EAFE7B0EB50C1EF6996 /* Pods-iOS-Base-Library-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-iOS-Base-Library-resources.sh"; sourceTree = ""; }; - 097D329F6E895E4C99E622160C421909 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 09996650DA46E6A0CFBB580ACD6C6AC5 /* UIColor_Hex_Swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UIColor_Hex_Swift-dummy.m"; sourceTree = ""; }; - 0A1766BD92395555BDF83ED7551E1AFA /* DDLog.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDLog.h; path = Classes/DDLog.h; sourceTree = ""; }; - 0A35BC0746EB1C6004BD2F1D211F0B16 /* UIColor_Hex_Swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = UIColor_Hex_Swift.modulemap; sourceTree = ""; }; - 0AA11C4D3A86CB36B743DDE71E157AFA /* CocoaLumberjack.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CocoaLumberjack.swift; path = Classes/CocoaLumberjack.swift; sourceTree = ""; }; - 0EA86F7D7E4B54F2CAA1A1140C36E56D /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Source/Error.swift; sourceTree = ""; }; - 117C430BF44074CD6A1C6DFD9DC5E127 /* Device-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Device-prefix.pch"; sourceTree = ""; }; - 11C02880031033121945A930AB1631AD /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 24C8BBB33AC1301F7FD39B813D9843DD /* HEXColor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HEXColor.h; path = HEXColor/HEXColor.h; sourceTree = ""; }; - 273FBF6B93F133A87CCE0381124D1511 /* Version.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Version.swift; path = Source/Version.swift; sourceTree = ""; }; - 2835FE74B1F742BEA9A8842948B0C993 /* Pods-iOS-Base-Library-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-iOS-Base-Library-umbrella.h"; sourceTree = ""; }; - 28B1753830A76C7E7245E0157093D30E /* UIColor_Hex_Swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIColor_Hex_Swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2A3FB93D4215D189B81CC48D7FEC4526 /* Pods-iOS-Base-Library-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-iOS-Base-Library-dummy.m"; sourceTree = ""; }; - 30F8C8E949C874E3B82550D27AB5097C /* DDContextFilterLogFormatter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDContextFilterLogFormatter.h; path = Classes/Extensions/DDContextFilterLogFormatter.h; sourceTree = ""; }; - 317EE76BCDACFC6FE6F8CC7D68F87ACF /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - 3380853B2458AE5AB98E6E259C52D95E /* Upload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Upload.swift; path = Source/Upload.swift; sourceTree = ""; }; - 35095B5342EE86E9A9D0669A0986D0E8 /* Device.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Device.xcconfig; sourceTree = ""; }; - 3B0833802D4BBEB1BB00427B5ED2EAFC /* DDASLLogCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDASLLogCapture.h; path = Classes/DDASLLogCapture.h; sourceTree = ""; }; - 3C490A98888F096045C9B565DE99354A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3D80B56AA98E315DFC1414D7F5B14BF1 /* DDAbstractDatabaseLogger.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDAbstractDatabaseLogger.h; path = Classes/DDAbstractDatabaseLogger.h; sourceTree = ""; }; - 3E782E60DC9799259C4FD82B29F159F5 /* Pods-iOS-Base-Library-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-iOS-Base-Library-acknowledgements.plist"; sourceTree = ""; }; - 3F0F5840FE874F60427C2AA935E99ADC /* DDDispatchQueueLogFormatter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDDispatchQueueLogFormatter.h; path = Classes/Extensions/DDDispatchQueueLogFormatter.h; sourceTree = ""; }; - 4532A93182170AB94B8A68C4018060A3 /* Pods-iOS-Base-Library.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-iOS-Base-Library.modulemap"; sourceTree = ""; }; - 478429E004ADB11B75B968A56E1E2EAF /* Device-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Device-umbrella.h"; sourceTree = ""; }; - 478FE284C3BD707968B1CCF35BAA7537 /* CocoaLumberjack.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CocoaLumberjack.xcconfig; sourceTree = ""; }; - 491781738FD4DA7CDA665DABAF06B589 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - 512F06E58EFAA7B8CCB44F8A2718D2AF /* DDAbstractDatabaseLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDAbstractDatabaseLogger.m; path = Classes/DDAbstractDatabaseLogger.m; sourceTree = ""; }; - 5161D59985C68AF126107827D4722F44 /* UIColorExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UIColorExtension.swift; path = HEXColor/UIColorExtension.swift; sourceTree = ""; }; - 545AB26534D5A5E3790DBA380D297C87 /* DDMultiFormatter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDMultiFormatter.m; path = Classes/Extensions/DDMultiFormatter.m; sourceTree = ""; }; - 5822F4C8DF698447AAB1520509CE05FB /* DDASLLogCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDASLLogCapture.m; path = Classes/DDASLLogCapture.m; sourceTree = ""; }; - 5BD2B083BEBC6E80936ABF9A059DB5D5 /* UIColor_Hex_Swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UIColor_Hex_Swift-prefix.pch"; sourceTree = ""; }; - 5FC2E67E1D8D9BCE01E9C9DBBC4B1260 /* DDFileLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDFileLogger.m; path = Classes/DDFileLogger.m; sourceTree = ""; }; - 60A691D1A75796961638AAA5F350129E /* Pods-iOS-Base-Library.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iOS-Base-Library.release.xcconfig"; sourceTree = ""; }; - 635FCCDE5A9997E03A21625F78398906 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 65F9A079AD33B2EE98CB230F911545E5 /* CocoaLumberjack.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = CocoaLumberjack.modulemap; sourceTree = ""; }; - 6B35E633D8E61A04C98775C952A0B2D6 /* DDASLLogger.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDASLLogger.h; path = Classes/DDASLLogger.h; sourceTree = ""; }; - 6E7E5AF37923BFA48D6994B9BFC6535F /* 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; }; - 71A66E621C11A1D4884034380F188478 /* DDLogMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDLogMacros.h; path = Classes/DDLogMacros.h; sourceTree = ""; }; - 746DF2316100EF6429124661CEBB5B50 /* Pods-iOS-Base-Library.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iOS-Base-Library.debug.xcconfig"; sourceTree = ""; }; - 77B38272DB1133132EED417A771E2A38 /* Type.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Type.swift; path = Source/Type.swift; sourceTree = ""; }; - 7A7806CB208EE24DF84A90214DB5530D /* DDTTYLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDTTYLogger.m; path = Classes/DDTTYLogger.m; sourceTree = ""; }; - 7B8C00804682C1BD4EE44F3537EDF363 /* DDAssertMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDAssertMacros.h; path = Classes/DDAssertMacros.h; sourceTree = ""; }; - 81B80F646C276525EA6DD822449DCA85 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 825697F085ABB1E60CDCDC9754B92EE7 /* DDLog+LOGV.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "DDLog+LOGV.h"; path = "Classes/DDLog+LOGV.h"; sourceTree = ""; }; - 86F03A685250BEAEF39084E19C718964 /* DDMultiFormatter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDMultiFormatter.h; path = Classes/Extensions/DDMultiFormatter.h; sourceTree = ""; }; - 8B2974687AF6D74CB0622ED1D98742B2 /* Pods-iOS-Base-Library-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-iOS-Base-Library-acknowledgements.markdown"; sourceTree = ""; }; - 8BDC814E30BD417BAAC416D3EAE1B336 /* Device.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Device.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8CDDB6CFFD4B59582B1B305CA18977F5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8CEC78659BE80EA82CEBC0C39B690D4D /* Manager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Manager.swift; path = Source/Manager.swift; sourceTree = ""; }; - 933934C1E2A09F011036CF812399A58F /* Pods_iOS_Base_Library.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOS_Base_Library.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9D2FF37940268B2FA7264D2FAFAAF6A7 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - A73B94F12073980ADDBB28CE72D53190 /* DDASLLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDASLLogger.m; path = Classes/DDASLLogger.m; sourceTree = ""; }; - A9B2B74441105E0EE026F171B8A0C966 /* DDTTYLogger.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDTTYLogger.h; path = Classes/DDTTYLogger.h; sourceTree = ""; }; - AADA5530931E9E42DA58161A7743DE8C /* CocoaLumberjack.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CocoaLumberjack.h; path = Classes/CocoaLumberjack.h; sourceTree = ""; }; - AFA9338C2779D02DA6657B680AA86B22 /* Device.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Device.modulemap; sourceTree = ""; }; - B111E8ED917D51DB7CE3ACC020292953 /* Device.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Device.swift; path = Source/Device.swift; sourceTree = ""; }; - BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - BE5B77AADDBC53561D571A4F576359A9 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - BF001CF5C92299747F7BC86693984B0C /* Stream.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stream.swift; path = Source/Stream.swift; sourceTree = ""; }; - C3B7BDF5CE5CB8F095FE12DA55D9A9BB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - D2B426DE82562B017148F258C427B032 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - D8A2D2BE1A4E08D659D28AE219B4E788 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D8BFC0B6B2FEB73CD513B71F6BC2A94D /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - DA890466957B4B5FA44CEBDBF51F4B91 /* CocoaLumberjack-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CocoaLumberjack-dummy.m"; sourceTree = ""; }; - DAA5715A9F955E1A1F50DBE2954EACA4 /* DDDispatchQueueLogFormatter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDDispatchQueueLogFormatter.m; path = Classes/Extensions/DDDispatchQueueLogFormatter.m; sourceTree = ""; }; - DAFBCB77642AE28D2E1FF556558FAAA5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DB81BBD26D207EC918D551EDE8E51EE7 /* CocoaLumberjack-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CocoaLumberjack-prefix.pch"; sourceTree = ""; }; - DDAE248BDFDB5AAF7E32C07AB2982186 /* Pods-iOS-Base-Library-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-iOS-Base-Library-frameworks.sh"; sourceTree = ""; }; - DE6C82409637A265F9DE802E0BC90A95 /* DDLog.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDLog.m; path = Classes/DDLog.m; sourceTree = ""; }; - DF234FDC759A7D955DE6E80242BACDB4 /* UIColor_Hex_Swift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = UIColor_Hex_Swift.xcconfig; sourceTree = ""; }; - E02D0FCF5C5B18842871FAAA747B198C /* Device-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Device-dummy.m"; sourceTree = ""; }; - E0840A130953187807690E96079DA6AA /* DDContextFilterLogFormatter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DDContextFilterLogFormatter.m; path = Classes/Extensions/DDContextFilterLogFormatter.m; sourceTree = ""; }; - E1CF28DE021BF0712DE5386F04D71C71 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - E713F5C5215A97E820CE5D1CDE692DB9 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - E94008E244E5B36D8C85DA19FE84A2BA /* Download.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Download.swift; path = Source/Download.swift; sourceTree = ""; }; - EA370D4506C4448CC7231842EDC50772 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - EB9C168B6AEBA57A6ECFA67BF08DCA58 /* DDFileLogger.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDFileLogger.h; path = Classes/DDFileLogger.h; sourceTree = ""; }; - EC38A7C30BECF64CC81782C16854E72B /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - EC3A8E58426CF02381A35ECE862F84A9 /* DDLegacyMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DDLegacyMacros.h; path = Classes/DDLegacyMacros.h; sourceTree = ""; }; - EDCBA43453CF25A172ED5C700AF2B55F /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - F040880C90996787094750616AFAC13D /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; - FA483AEB762AAFE10EC744A7A263E5F3 /* Size.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Size.swift; path = Source/Size.swift; sourceTree = ""; }; - FC587193DF6A8E0A6D52B8B7BA854B71 /* CocoaLumberjack.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CocoaLumberjack.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 285EC68FE3B51B22FFED572297219AC7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AB174639B9F72038835786057E67EA87 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4AEC251EB34CAF0A4D7614C38C9534F2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ADAB596307334EB253E60C441CB46139 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 867F1947A3BBF17BA15A9E9ED37993A9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 231F317E789DEA785E1B1D1734EB8C40 /* Foundation.framework in Frameworks */, - DDB5B8BA0DA6CED6FD0EA2F48B68B243 /* UIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A5AE1D340C4A0691EC28EEA8241C9FCD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 96D99D0C2472535A169DED65CB231CD7 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FA146537F81BE20B7055ADA7EC94A468 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4286EE732D0965BE0D541ACB6D9A3E20 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 02370BDC5715D8927E6F0CF07F2B7EA5 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - F5C61BAAB821CEC2E3EDC61749BE8548 /* Pods-iOS-Base-Library */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 18340F12838DEE43507667CC74401EB1 /* iOS */ = { - isa = PBXGroup; - children = ( - 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */, - C3B7BDF5CE5CB8F095FE12DA55D9A9BB /* UIKit.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 1BD0D889F772D20D6804F0474BA156C6 /* Core */ = { - isa = PBXGroup; - children = ( - 3D80B56AA98E315DFC1414D7F5B14BF1 /* DDAbstractDatabaseLogger.h */, - 512F06E58EFAA7B8CCB44F8A2718D2AF /* DDAbstractDatabaseLogger.m */, - 3B0833802D4BBEB1BB00427B5ED2EAFC /* DDASLLogCapture.h */, - 5822F4C8DF698447AAB1520509CE05FB /* DDASLLogCapture.m */, - 6B35E633D8E61A04C98775C952A0B2D6 /* DDASLLogger.h */, - A73B94F12073980ADDBB28CE72D53190 /* DDASLLogger.m */, - 7B8C00804682C1BD4EE44F3537EDF363 /* DDAssertMacros.h */, - EB9C168B6AEBA57A6ECFA67BF08DCA58 /* DDFileLogger.h */, - 5FC2E67E1D8D9BCE01E9C9DBBC4B1260 /* DDFileLogger.m */, - EC3A8E58426CF02381A35ECE862F84A9 /* DDLegacyMacros.h */, - 0A1766BD92395555BDF83ED7551E1AFA /* DDLog.h */, - DE6C82409637A265F9DE802E0BC90A95 /* DDLog.m */, - 825697F085ABB1E60CDCDC9754B92EE7 /* DDLog+LOGV.h */, - 71A66E621C11A1D4884034380F188478 /* DDLogMacros.h */, - A9B2B74441105E0EE026F171B8A0C966 /* DDTTYLogger.h */, - 7A7806CB208EE24DF84A90214DB5530D /* DDTTYLogger.m */, - ); - name = Core; - sourceTree = ""; - }; - 22521AD1154C3602546926151791DA8C /* UIColor_Hex_Swift */ = { - isa = PBXGroup; - children = ( - 24C8BBB33AC1301F7FD39B813D9843DD /* HEXColor.h */, - 5161D59985C68AF126107827D4722F44 /* UIColorExtension.swift */, - 274B1029236786D4370C73CEDABC8A0C /* Support Files */, - ); - path = UIColor_Hex_Swift; - sourceTree = ""; - }; - 23F6063F56FF0F8477B1A33E9A837524 /* Extensions */ = { - isa = PBXGroup; - children = ( - 30F8C8E949C874E3B82550D27AB5097C /* DDContextFilterLogFormatter.h */, - E0840A130953187807690E96079DA6AA /* DDContextFilterLogFormatter.m */, - 3F0F5840FE874F60427C2AA935E99ADC /* DDDispatchQueueLogFormatter.h */, - DAA5715A9F955E1A1F50DBE2954EACA4 /* DDDispatchQueueLogFormatter.m */, - 86F03A685250BEAEF39084E19C718964 /* DDMultiFormatter.h */, - 545AB26534D5A5E3790DBA380D297C87 /* DDMultiFormatter.m */, - ); - name = Extensions; - sourceTree = ""; - }; - 274B1029236786D4370C73CEDABC8A0C /* Support Files */ = { - isa = PBXGroup; - children = ( - 81B80F646C276525EA6DD822449DCA85 /* Info.plist */, - 0A35BC0746EB1C6004BD2F1D211F0B16 /* UIColor_Hex_Swift.modulemap */, - DF234FDC759A7D955DE6E80242BACDB4 /* UIColor_Hex_Swift.xcconfig */, - 09996650DA46E6A0CFBB580ACD6C6AC5 /* UIColor_Hex_Swift-dummy.m */, - 5BD2B083BEBC6E80936ABF9A059DB5D5 /* UIColor_Hex_Swift-prefix.pch */, - 072873B58F65F37656B5D977937AB93C /* UIColor_Hex_Swift-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/UIColor_Hex_Swift"; - sourceTree = ""; - }; - 3B615FFE6FD4EC40AC054F520BB4C162 /* CocoaLumberjack */ = { - isa = PBXGroup; - children = ( - 1BD0D889F772D20D6804F0474BA156C6 /* Core */, - F20E2366983557AE661C28AFB36F62A6 /* Default */, - 23F6063F56FF0F8477B1A33E9A837524 /* Extensions */, - 70D4740387DF73F5CE36CB5DCD75CD6C /* Support Files */, - A0160014E922BACFDAF0B1762C994124 /* Swift */, - ); - path = CocoaLumberjack; - sourceTree = ""; - }; - 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 18340F12838DEE43507667CC74401EB1 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6C9BD76E29DC04DBF7FC6486612C0896 /* Support Files */ = { - isa = PBXGroup; - children = ( - AFA9338C2779D02DA6657B680AA86B22 /* Device.modulemap */, - 35095B5342EE86E9A9D0669A0986D0E8 /* Device.xcconfig */, - E02D0FCF5C5B18842871FAAA747B198C /* Device-dummy.m */, - 117C430BF44074CD6A1C6DFD9DC5E127 /* Device-prefix.pch */, - 478429E004ADB11B75B968A56E1E2EAF /* Device-umbrella.h */, - D8A2D2BE1A4E08D659D28AE219B4E788 /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/Device"; - sourceTree = ""; - }; - 6D7435CEB89295F92DEF9DEB2A6EC3FF /* Pods */ = { - isa = PBXGroup; - children = ( - EBE5BF6AEB269E675A416D7702000D1E /* Alamofire */, - 3B615FFE6FD4EC40AC054F520BB4C162 /* CocoaLumberjack */, - 962E1CA982270FAD933D909F878AEF5F /* Device */, - 22521AD1154C3602546926151791DA8C /* UIColor_Hex_Swift */, - ); - name = Pods; - sourceTree = ""; - }; - 70D4740387DF73F5CE36CB5DCD75CD6C /* Support Files */ = { - isa = PBXGroup; - children = ( - 65F9A079AD33B2EE98CB230F911545E5 /* CocoaLumberjack.modulemap */, - 478FE284C3BD707968B1CCF35BAA7537 /* CocoaLumberjack.xcconfig */, - DA890466957B4B5FA44CEBDBF51F4B91 /* CocoaLumberjack-dummy.m */, - DB81BBD26D207EC918D551EDE8E51EE7 /* CocoaLumberjack-prefix.pch */, - 3C490A98888F096045C9B565DE99354A /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/CocoaLumberjack"; - sourceTree = ""; - }; - 7DB346D0F39D3F0E887471402A8071AB = { - isa = PBXGroup; - children = ( - BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, - 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, - 6D7435CEB89295F92DEF9DEB2A6EC3FF /* Pods */, - AEF7439392BC56411EF5C56B56F0372C /* Products */, - 02370BDC5715D8927E6F0CF07F2B7EA5 /* Targets Support Files */, - ); - sourceTree = ""; - }; - 962E1CA982270FAD933D909F878AEF5F /* Device */ = { - isa = PBXGroup; - children = ( - B111E8ED917D51DB7CE3ACC020292953 /* Device.swift */, - FA483AEB762AAFE10EC744A7A263E5F3 /* Size.swift */, - 77B38272DB1133132EED417A771E2A38 /* Type.swift */, - 273FBF6B93F133A87CCE0381124D1511 /* Version.swift */, - 6C9BD76E29DC04DBF7FC6486612C0896 /* Support Files */, - ); - path = Device; - sourceTree = ""; - }; - A0160014E922BACFDAF0B1762C994124 /* Swift */ = { - isa = PBXGroup; - children = ( - 0AA11C4D3A86CB36B743DDE71E157AFA /* CocoaLumberjack.swift */, - ); - name = Swift; - sourceTree = ""; - }; - AEF7439392BC56411EF5C56B56F0372C /* Products */ = { - isa = PBXGroup; - children = ( - 097D329F6E895E4C99E622160C421909 /* Alamofire.framework */, - FC587193DF6A8E0A6D52B8B7BA854B71 /* CocoaLumberjack.framework */, - 8BDC814E30BD417BAAC416D3EAE1B336 /* Device.framework */, - 933934C1E2A09F011036CF812399A58F /* Pods_iOS_Base_Library.framework */, - 28B1753830A76C7E7245E0157093D30E /* UIColor_Hex_Swift.framework */, - ); - name = Products; - sourceTree = ""; - }; - B244CF543AD38D86E00E407AEC8128F3 /* Support Files */ = { - isa = PBXGroup; - children = ( - F040880C90996787094750616AFAC13D /* Alamofire.modulemap */, - EC38A7C30BECF64CC81782C16854E72B /* Alamofire.xcconfig */, - BE5B77AADDBC53561D571A4F576359A9 /* Alamofire-dummy.m */, - 635FCCDE5A9997E03A21625F78398906 /* Alamofire-prefix.pch */, - EA370D4506C4448CC7231842EDC50772 /* Alamofire-umbrella.h */, - 8CDDB6CFFD4B59582B1B305CA18977F5 /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - EBE5BF6AEB269E675A416D7702000D1E /* Alamofire */ = { - isa = PBXGroup; - children = ( - EDCBA43453CF25A172ED5C700AF2B55F /* Alamofire.swift */, - E94008E244E5B36D8C85DA19FE84A2BA /* Download.swift */, - 0EA86F7D7E4B54F2CAA1A1140C36E56D /* Error.swift */, - 8CEC78659BE80EA82CEBC0C39B690D4D /* Manager.swift */, - 11C02880031033121945A930AB1631AD /* MultipartFormData.swift */, - E1CF28DE021BF0712DE5386F04D71C71 /* ParameterEncoding.swift */, - D2B426DE82562B017148F258C427B032 /* Request.swift */, - D8BFC0B6B2FEB73CD513B71F6BC2A94D /* Response.swift */, - E713F5C5215A97E820CE5D1CDE692DB9 /* ResponseSerialization.swift */, - 491781738FD4DA7CDA665DABAF06B589 /* Result.swift */, - 317EE76BCDACFC6FE6F8CC7D68F87ACF /* ServerTrustPolicy.swift */, - BF001CF5C92299747F7BC86693984B0C /* Stream.swift */, - 3380853B2458AE5AB98E6E259C52D95E /* Upload.swift */, - 9D2FF37940268B2FA7264D2FAFAAF6A7 /* Validation.swift */, - B244CF543AD38D86E00E407AEC8128F3 /* Support Files */, - ); - path = Alamofire; - sourceTree = ""; - }; - F20E2366983557AE661C28AFB36F62A6 /* Default */ = { - isa = PBXGroup; - children = ( - AADA5530931E9E42DA58161A7743DE8C /* CocoaLumberjack.h */, - ); - name = Default; - sourceTree = ""; - }; - F5C61BAAB821CEC2E3EDC61749BE8548 /* Pods-iOS-Base-Library */ = { - isa = PBXGroup; - children = ( - DAFBCB77642AE28D2E1FF556558FAAA5 /* Info.plist */, - 4532A93182170AB94B8A68C4018060A3 /* Pods-iOS-Base-Library.modulemap */, - 8B2974687AF6D74CB0622ED1D98742B2 /* Pods-iOS-Base-Library-acknowledgements.markdown */, - 3E782E60DC9799259C4FD82B29F159F5 /* Pods-iOS-Base-Library-acknowledgements.plist */, - 2A3FB93D4215D189B81CC48D7FEC4526 /* Pods-iOS-Base-Library-dummy.m */, - DDAE248BDFDB5AAF7E32C07AB2982186 /* Pods-iOS-Base-Library-frameworks.sh */, - 07E517B7513E7EAFE7B0EB50C1EF6996 /* Pods-iOS-Base-Library-resources.sh */, - 2835FE74B1F742BEA9A8842948B0C993 /* Pods-iOS-Base-Library-umbrella.h */, - 746DF2316100EF6429124661CEBB5B50 /* Pods-iOS-Base-Library.debug.xcconfig */, - 60A691D1A75796961638AAA5F350129E /* Pods-iOS-Base-Library.release.xcconfig */, - ); - name = "Pods-iOS-Base-Library"; - path = "Target Support Files/Pods-iOS-Base-Library"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 02FDEDD47D1295E2EBFA8ED043064FA7 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BDB4B7804C1CC452FEE68C3A2C5CFBC /* HEXColor.h in Headers */, - C82EC1B42BD97B178DA73292055CB680 /* UIColor_Hex_Swift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2690E3506973120AB8291C4F729B20B4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - E00C777CEC02142B0CFA9992750FB5D0 /* Device-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5F7B61281F714E2A64A51E80A2C9C062 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C5450AC69398958CF6F7539EF7D99E5 /* Alamofire-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8DE70B6FEA54D75875F79FC9124D7154 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - E4F54D59E9D71C79C438377663E12E22 /* Pods-iOS-Base-Library-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F6404F95A0B5D38808B453032F1C1D3F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CD81315E9E8FD7FD4F3C4D28BAB50C3D /* CocoaLumberjack.h in Headers */, - BED21B6237708EC89E1CDC9E7E4FCB49 /* DDAbstractDatabaseLogger.h in Headers */, - 83DBBC894A6203F6E4CFCDDA4911C9AF /* DDASLLogCapture.h in Headers */, - EFD1A8C17A9631363C4AC6E2BE2F1434 /* DDASLLogger.h in Headers */, - 91FDF8A5A1BC96856AC4470759421D6B /* DDAssertMacros.h in Headers */, - 4661B2C1110AEF944B8A9848080FC2A2 /* DDContextFilterLogFormatter.h in Headers */, - FB73CC220FBF2BD69320CC68B7892CFB /* DDDispatchQueueLogFormatter.h in Headers */, - EE61F282567EEFBBDC8BA0BE06433C6F /* DDFileLogger.h in Headers */, - 9630205806FA13CEE278F4E4FA6DA3F0 /* DDLegacyMacros.h in Headers */, - 3DB7862FB83E65375AB21FC76E2DE753 /* DDLog+LOGV.h in Headers */, - BD687FC56130CEEB1049FEEC1127C5F7 /* DDLog.h in Headers */, - 093609D078A154B7E17835F75A487E3C /* DDLogMacros.h in Headers */, - D2D417A51677012E9EEF8F1297F87231 /* DDMultiFormatter.h in Headers */, - ECB58C2372417300030D10FE302FD32E /* DDTTYLogger.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 10972234E1E065852103AB7922663622 /* Pods-iOS-Base-Library */ = { - isa = PBXNativeTarget; - buildConfigurationList = 39D6CB091DABB3485E3E18E35C093A58 /* Build configuration list for PBXNativeTarget "Pods-iOS-Base-Library" */; - buildPhases = ( - E0825BF890ED29E2D8F92C344292A23E /* Sources */, - FA146537F81BE20B7055ADA7EC94A468 /* Frameworks */, - 8DE70B6FEA54D75875F79FC9124D7154 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - D4B80C0D71D32B6209C77E5726AFBAD8 /* PBXTargetDependency */, - 0E1F3D1542D5358EFFAC3365AF583461 /* PBXTargetDependency */, - FA9FB8EE2913980A5D34411E57BD3182 /* PBXTargetDependency */, - 4D1CDAC0DCA88BB3C0D382EFDE1BE9C8 /* PBXTargetDependency */, - ); - name = "Pods-iOS-Base-Library"; - productName = "Pods-iOS-Base-Library"; - productReference = 933934C1E2A09F011036CF812399A58F /* Pods_iOS_Base_Library.framework */; - productType = "com.apple.product-type.framework"; - }; - 432ECC54282C84882B482CCB4CF227FC /* Alamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8B2B2DA2F7F80D41B1FDB5FACFA4B3DE /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - DB4A906CAC9188ECBA8C02843B10E921 /* Sources */, - A5AE1D340C4A0691EC28EEA8241C9FCD /* Frameworks */, - 5F7B61281F714E2A64A51E80A2C9C062 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Alamofire; - productName = Alamofire; - productReference = 097D329F6E895E4C99E622160C421909 /* Alamofire.framework */; - productType = "com.apple.product-type.framework"; - }; - 55ABC5300F5EF855C57F9B23657FB8F7 /* Device */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1054C5AFBFA7A52944A4DF9599FF806C /* Build configuration list for PBXNativeTarget "Device" */; - buildPhases = ( - 4CB7D28E84F471E60B5BC1C526500B6E /* Sources */, - 285EC68FE3B51B22FFED572297219AC7 /* Frameworks */, - 2690E3506973120AB8291C4F729B20B4 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Device; - productName = Device; - productReference = 8BDC814E30BD417BAAC416D3EAE1B336 /* Device.framework */; - productType = "com.apple.product-type.framework"; - }; - D082FD9722F53B9C3A1229257D4008F7 /* CocoaLumberjack */ = { - isa = PBXNativeTarget; - buildConfigurationList = 002F9559682E320A15C01003FF74440A /* Build configuration list for PBXNativeTarget "CocoaLumberjack" */; - buildPhases = ( - 52C14FCAA97F89FBD9CE4212AC647DA7 /* Sources */, - 4AEC251EB34CAF0A4D7614C38C9534F2 /* Frameworks */, - F6404F95A0B5D38808B453032F1C1D3F /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = CocoaLumberjack; - productName = CocoaLumberjack; - productReference = FC587193DF6A8E0A6D52B8B7BA854B71 /* CocoaLumberjack.framework */; - productType = "com.apple.product-type.framework"; - }; - FA0B1520A2ABA619BB133BF7BC949A79 /* UIColor_Hex_Swift */ = { - isa = PBXNativeTarget; - buildConfigurationList = A92D17F2245C14F5DABDC54E6C298A24 /* Build configuration list for PBXNativeTarget "UIColor_Hex_Swift" */; - buildPhases = ( - 1066924BFC57DB70E2F34747E3C72F20 /* Sources */, - 867F1947A3BBF17BA15A9E9ED37993A9 /* Frameworks */, - 02FDEDD47D1295E2EBFA8ED043064FA7 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = UIColor_Hex_Swift; - productName = UIColor_Hex_Swift; - productReference = 28B1753830A76C7E7245E0157093D30E /* UIColor_Hex_Swift.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; - }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = AEF7439392BC56411EF5C56B56F0372C /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 432ECC54282C84882B482CCB4CF227FC /* Alamofire */, - D082FD9722F53B9C3A1229257D4008F7 /* CocoaLumberjack */, - 55ABC5300F5EF855C57F9B23657FB8F7 /* Device */, - 10972234E1E065852103AB7922663622 /* Pods-iOS-Base-Library */, - FA0B1520A2ABA619BB133BF7BC949A79 /* UIColor_Hex_Swift */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 1066924BFC57DB70E2F34747E3C72F20 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 188670D10B2ECB08D680698B464EED9B /* UIColor_Hex_Swift-dummy.m in Sources */, - 3E21DD17EC241A38745ABB4B9075F15D /* UIColorExtension.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4CB7D28E84F471E60B5BC1C526500B6E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B7213CB986069FD0645BB0A90FC8F2BC /* Device-dummy.m in Sources */, - A0E60FACEB974D1ADB8D4536E7C01DFD /* Device.swift in Sources */, - 6B3139D42A270E91D109EDE2A1F956CD /* Size.swift in Sources */, - 33E8C6EBB3829DDEEC3A97482A2762B3 /* Type.swift in Sources */, - 8658A2C55C19D001827AE43CCDC7F9E3 /* Version.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 52C14FCAA97F89FBD9CE4212AC647DA7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CD2DCC591BB67DFE6B167ABB9D8DFF0 /* CocoaLumberjack-dummy.m in Sources */, - A943CEA0E0E9706EDA7D667E54A41383 /* CocoaLumberjack.swift in Sources */, - 38AEB97731426DA92B56E52CCD850851 /* DDAbstractDatabaseLogger.m in Sources */, - 58B4B7CF780F91B3FC5A32C54A4231C9 /* DDASLLogCapture.m in Sources */, - C0A0547274B4F3B3A59A0B40554047EB /* DDASLLogger.m in Sources */, - 3F9228CAF4E9FB25F54FF8B1DEC44048 /* DDContextFilterLogFormatter.m in Sources */, - 2FD9FC4A682F0F9B090634BA8D5473BD /* DDDispatchQueueLogFormatter.m in Sources */, - 77567A39064755A7CEB4B1B36CA61A21 /* DDFileLogger.m in Sources */, - C3127BE1CA1F3DB05CA0F59A5935AC72 /* DDLog.m in Sources */, - 7953181FD7F91C0AD76B2390BAAB34BF /* DDMultiFormatter.m in Sources */, - 96791A9A2AC373B3169148CFDFB30329 /* DDTTYLogger.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DB4A906CAC9188ECBA8C02843B10E921 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 48DA8D1B20888A371416D803746B1231 /* Alamofire-dummy.m in Sources */, - 7B01E037BD5A310074BCDDDB7C549D0B /* Alamofire.swift in Sources */, - 59BDD0605A645E7A557CA76076B50603 /* Download.swift in Sources */, - 8E4605D767E337FAEEFA6096E5FEC949 /* Error.swift in Sources */, - FD827628BC36F9D907F700BE456BDE21 /* Manager.swift in Sources */, - F5466AB5187F836038F95DA160887D05 /* MultipartFormData.swift in Sources */, - 78C9ED07C7E2BF3A26D549D72779CC8E /* ParameterEncoding.swift in Sources */, - 065EEEAAEE109C0C6F5542EAABA0E8A0 /* Request.swift in Sources */, - 19CD84CEB6D468F320546AA090E51D3D /* Response.swift in Sources */, - 330CA798FC43DDC6DD2D609365E0D96C /* ResponseSerialization.swift in Sources */, - F29C88F2442FD681048BF648E922C590 /* Result.swift in Sources */, - 437519A278AE2B3E183F1D2FC2B59828 /* ServerTrustPolicy.swift in Sources */, - 787942EE084A25BA375B03380E60C60A /* Stream.swift in Sources */, - FCF136B11A94E05EFE2834F776DB9D76 /* Upload.swift in Sources */, - E6B19C962D16AB1371DADFA122D126DE /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E0825BF890ED29E2D8F92C344292A23E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4324B4F01709A9B109DA71B2FE5A6D45 /* Pods-iOS-Base-Library-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 0E1F3D1542D5358EFFAC3365AF583461 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = CocoaLumberjack; - target = D082FD9722F53B9C3A1229257D4008F7 /* CocoaLumberjack */; - targetProxy = 8AD3D26FA2907AFBEBAF233D13832D12 /* PBXContainerItemProxy */; - }; - 4D1CDAC0DCA88BB3C0D382EFDE1BE9C8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UIColor_Hex_Swift; - target = FA0B1520A2ABA619BB133BF7BC949A79 /* UIColor_Hex_Swift */; - targetProxy = B259513C473ADB45E459BBBAB50B74F6 /* PBXContainerItemProxy */; - }; - D4B80C0D71D32B6209C77E5726AFBAD8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 432ECC54282C84882B482CCB4CF227FC /* Alamofire */; - targetProxy = ED7724717BF123AE39A8919F5C9BC37D /* PBXContainerItemProxy */; - }; - FA9FB8EE2913980A5D34411E57BD3182 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Device; - target = 55ABC5300F5EF855C57F9B23657FB8F7 /* Device */; - targetProxy = 391D652523CFEC772A81327F950D6FD8 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 070C98FAAF0279CE0355A8DDF1831ADC /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 35095B5342EE86E9A9D0669A0986D0E8 /* Device.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/Device/Device-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Device/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Device/Device.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Device; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 0D12EBEB35AC8FA740B275C8105F9152 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EC38A7C30BECF64CC81782C16854E72B /* Alamofire.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/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 203828FADD064E846C59B3C10C0F6AFA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 478FE284C3BD707968B1CCF35BAA7537 /* CocoaLumberjack.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/CocoaLumberjack/CocoaLumberjack-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CocoaLumberjack/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CocoaLumberjack/CocoaLumberjack.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = CocoaLumberjack; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 208F95C331BE5181CF7A7DE2759A2A44 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DF234FDC759A7D955DE6E80242BACDB4 /* UIColor_Hex_Swift.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/UIColor_Hex_Swift/UIColor_Hex_Swift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/UIColor_Hex_Swift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/UIColor_Hex_Swift/UIColor_Hex_Swift.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = UIColor_Hex_Swift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 28973E73A6075E48EBE277098505D118 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EC38A7C30BECF64CC81782C16854E72B /* Alamofire.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/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 8D1534490D941DCA47C62AC4314182AF /* 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 = 9.2; - ONLY_ACTIVE_ARCH = YES; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 956CCD1AB30DFB350ACC32D5749AE37F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 35095B5342EE86E9A9D0669A0986D0E8 /* Device.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/Device/Device-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Device/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Device/Device.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Device; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B8A2986494449DACE375322F812DCEA4 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 478FE284C3BD707968B1CCF35BAA7537 /* CocoaLumberjack.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/CocoaLumberjack/CocoaLumberjack-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CocoaLumberjack/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CocoaLumberjack/CocoaLumberjack.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = CocoaLumberjack; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - BA453E8A54539286F7B9BA40BBD2A445 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 746DF2316100EF6429124661CEBB5B50 /* Pods-iOS-Base-Library.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-iOS-Base-Library/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods_iOS_Base_Library; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - C5A18280E9321A9268D1C80B7DA43967 /* 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 = 9.2; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - EB73C1ECDA5761B9072831247D7D2038 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DF234FDC759A7D955DE6E80242BACDB4 /* UIColor_Hex_Swift.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/UIColor_Hex_Swift/UIColor_Hex_Swift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/UIColor_Hex_Swift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/UIColor_Hex_Swift/UIColor_Hex_Swift.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = UIColor_Hex_Swift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - FE081D3D4567C63238F845A66C7C2172 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 60A691D1A75796961638AAA5F350129E /* Pods-iOS-Base-Library.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-iOS-Base-Library/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods_iOS_Base_Library; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 002F9559682E320A15C01003FF74440A /* Build configuration list for PBXNativeTarget "CocoaLumberjack" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 203828FADD064E846C59B3C10C0F6AFA /* Debug */, - B8A2986494449DACE375322F812DCEA4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1054C5AFBFA7A52944A4DF9599FF806C /* Build configuration list for PBXNativeTarget "Device" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 070C98FAAF0279CE0355A8DDF1831ADC /* Debug */, - 956CCD1AB30DFB350ACC32D5749AE37F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8D1534490D941DCA47C62AC4314182AF /* Debug */, - C5A18280E9321A9268D1C80B7DA43967 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 39D6CB091DABB3485E3E18E35C093A58 /* Build configuration list for PBXNativeTarget "Pods-iOS-Base-Library" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BA453E8A54539286F7B9BA40BBD2A445 /* Debug */, - FE081D3D4567C63238F845A66C7C2172 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8B2B2DA2F7F80D41B1FDB5FACFA4B3DE /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 28973E73A6075E48EBE277098505D118 /* Debug */, - 0D12EBEB35AC8FA740B275C8105F9152 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A92D17F2245C14F5DABDC54E6C298A24 /* Build configuration list for PBXNativeTarget "UIColor_Hex_Swift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 208F95C331BE5181CF7A7DE2759A2A44 /* Debug */, - EB73C1ECDA5761B9072831247D7D2038 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; -} diff --git a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c45942..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index aa992a4a..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 6b71676a..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125fa..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire.xcconfig deleted file mode 100644 index baea9f3b..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ /dev/null @@ -1,5 +0,0 @@ -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Alamofire" "${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/iOS-Base-Library/Pods/Target Support Files/Alamofire/Info.plist b/iOS-Base-Library/Pods/Target Support Files/Alamofire/Info.plist deleted file mode 100644 index 93987c18..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Alamofire/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 3.1.5 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Info.plist b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Info.plist deleted file mode 100644 index 69745425..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - 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/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-acknowledgements.markdown b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-acknowledgements.markdown deleted file mode 100644 index 32ecbf2e..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-acknowledgements.markdown +++ /dev/null @@ -1,97 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Alamofire - -Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) - -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. - - -## CocoaLumberjack - -Software License Agreement (BSD License) - -Copyright (c) 2010-2015, Deusty, LLC -All rights reserved. - -Redistribution and use of this software in source and binary forms, -with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Neither the name of Deusty nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission of Deusty, LLC. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -## Device - -The MIT License (MIT) - -Copyright (c) 2015 Lucas Ortis - -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. - - - -## UIColor_Hex_Swift - -The MIT License (MIT) - -Copyright (c) 2014 R0CKSTAR - -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/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-acknowledgements.plist b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-acknowledgements.plist deleted file mode 100644 index 9400901d..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-acknowledgements.plist +++ /dev/null @@ -1,139 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) - -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 - Alamofire - Type - PSGroupSpecifier - - - FooterText - Software License Agreement (BSD License) - -Copyright (c) 2010-2015, Deusty, LLC -All rights reserved. - -Redistribution and use of this software in source and binary forms, -with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Neither the name of Deusty nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission of Deusty, LLC. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - Title - CocoaLumberjack - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2015 Lucas Ortis - -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 - Device - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 R0CKSTAR - -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 - UIColor_Hex_Swift - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - http://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-dummy.m b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-dummy.m deleted file mode 100644 index a7449bd3..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_iOS_Base_Library : NSObject -@end -@implementation PodsDummy_Pods_iOS_Base_Library -@end diff --git a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-frameworks.sh b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-frameworks.sh deleted file mode 100755 index 1e420b95..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-frameworks.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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-iOS-Base-Library/Alamofire.framework" - install_framework "Pods-iOS-Base-Library/CocoaLumberjack.framework" - install_framework "Pods-iOS-Base-Library/Device.framework" - install_framework "Pods-iOS-Base-Library/UIColor_Hex_Swift.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "Pods-iOS-Base-Library/Alamofire.framework" - install_framework "Pods-iOS-Base-Library/CocoaLumberjack.framework" - install_framework "Pods-iOS-Base-Library/Device.framework" - install_framework "Pods-iOS-Base-Library/UIColor_Hex_Swift.framework" -fi diff --git a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-resources.sh b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-resources.sh deleted file mode 100755 index 16774fb4..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-resources.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/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/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-umbrella.h b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-umbrella.h deleted file mode 100644 index 43d4685d..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double Pods_iOS_Base_LibraryVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_iOS_Base_LibraryVersionString[]; - diff --git a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.debug.xcconfig b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.debug.xcconfig deleted file mode 100644 index e6e7067d..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.debug.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -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/Alamofire.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/CocoaLumberjack.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/Device.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/UIColor_Hex_Swift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CocoaLumberjack" -framework "Device" -framework "UIColor_Hex_Swift" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-iOS-Base-Library -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.modulemap b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.modulemap deleted file mode 100644 index 12da6d80..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_iOS_Base_Library { - umbrella header "Pods-iOS-Base-Library-umbrella.h" - - export * - module * { export * } -} diff --git a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.release.xcconfig b/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.release.xcconfig deleted file mode 100644 index e6e7067d..00000000 --- a/iOS-Base-Library/Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.release.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -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/Alamofire.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/CocoaLumberjack.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/Device.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/UIColor_Hex_Swift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CocoaLumberjack" -framework "Device" -framework "UIColor_Hex_Swift" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-iOS-Base-Library -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/iOS-Base-Library/iOS-Base-Library.xcodeproj/project.pbxproj b/iOS-Base-Library/iOS-Base-Library.xcodeproj/project.pbxproj deleted file mode 100644 index 796dfba7..00000000 --- a/iOS-Base-Library/iOS-Base-Library.xcodeproj/project.pbxproj +++ /dev/null @@ -1,449 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 883AECBCD1A314157E9F64CD /* Pods_iOS_Base_Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EB91F3F79DF7123CA443731 /* Pods_iOS_Base_Library.framework */; }; - 952A638D1C5408AC00E3572C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 952A638C1C5408AC00E3572C /* AppDelegate.swift */; }; - 952A638F1C5408AC00E3572C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 952A638E1C5408AC00E3572C /* ViewController.swift */; }; - 952A63921C5408AC00E3572C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 952A63901C5408AC00E3572C /* Main.storyboard */; }; - 952A63941C5408AC00E3572C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 952A63931C5408AC00E3572C /* Assets.xcassets */; }; - 952A63971C5408AC00E3572C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 952A63951C5408AC00E3572C /* LaunchScreen.storyboard */; }; - 952A63A51C543CD400E3572C /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 952A63A41C543CD400E3572C /* App.swift */; }; - 952A63A71C54F71500E3572C /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 952A63A61C54F71500E3572C /* Log.swift */; }; - 952A63AB1C54F76400E3572C /* LogFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 952A63AA1C54F76400E3572C /* LogFormatter.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 6EB91F3F79DF7123CA443731 /* Pods_iOS_Base_Library.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOS_Base_Library.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6F5B2B4F5A576568CDD04A2A /* Pods-iOS-Base-Library.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOS-Base-Library.release.xcconfig"; path = "Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.release.xcconfig"; sourceTree = ""; }; - 952A63891C5408AC00E3572C /* iOS-Base-Library.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS-Base-Library.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 952A638C1C5408AC00E3572C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 952A638E1C5408AC00E3572C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 952A63911C5408AC00E3572C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 952A63931C5408AC00E3572C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 952A63961C5408AC00E3572C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 952A63981C5408AC00E3572C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 952A63A41C543CD400E3572C /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = ""; }; - 952A63A61C54F71500E3572C /* Log.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = ""; }; - 952A63AA1C54F76400E3572C /* LogFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogFormatter.swift; sourceTree = ""; }; - DF472984BADA33609A7AA065 /* Pods-iOS-Base-Library.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOS-Base-Library.debug.xcconfig"; path = "Pods/Target Support Files/Pods-iOS-Base-Library/Pods-iOS-Base-Library.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 952A63861C5408AC00E3572C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 883AECBCD1A314157E9F64CD /* Pods_iOS_Base_Library.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 021B6FCB6EB0C1FA00C0F74A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6EB91F3F79DF7123CA443731 /* Pods_iOS_Base_Library.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 952A63801C5408AC00E3572C = { - isa = PBXGroup; - children = ( - 952A638B1C5408AC00E3572C /* iOS-Base-Library */, - 952A638A1C5408AC00E3572C /* Products */, - A4335B72714901204F872B8A /* Pods */, - 021B6FCB6EB0C1FA00C0F74A /* Frameworks */, - ); - sourceTree = ""; - }; - 952A638A1C5408AC00E3572C /* Products */ = { - isa = PBXGroup; - children = ( - 952A63891C5408AC00E3572C /* iOS-Base-Library.app */, - ); - name = Products; - sourceTree = ""; - }; - 952A638B1C5408AC00E3572C /* iOS-Base-Library */ = { - isa = PBXGroup; - children = ( - 952A63AD1C5529EE00E3572C /* Request */, - 952A63A31C543CB100E3572C /* Logger */, - 952A638C1C5408AC00E3572C /* AppDelegate.swift */, - 952A638E1C5408AC00E3572C /* ViewController.swift */, - 952A63A01C54370200E3572C /* SupportingFiles */, - 952A63A21C5437CA00E3572C /* Resourses */, - ); - path = "iOS-Base-Library"; - sourceTree = ""; - }; - 952A63A01C54370200E3572C /* SupportingFiles */ = { - isa = PBXGroup; - children = ( - 952A63981C5408AC00E3572C /* Info.plist */, - ); - name = SupportingFiles; - sourceTree = ""; - }; - 952A63A21C5437CA00E3572C /* Resourses */ = { - isa = PBXGroup; - children = ( - 952A63901C5408AC00E3572C /* Main.storyboard */, - 952A63931C5408AC00E3572C /* Assets.xcassets */, - 952A63951C5408AC00E3572C /* LaunchScreen.storyboard */, - ); - name = Resourses; - sourceTree = ""; - }; - 952A63A31C543CB100E3572C /* Logger */ = { - isa = PBXGroup; - children = ( - 952A63A41C543CD400E3572C /* App.swift */, - 952A63A61C54F71500E3572C /* Log.swift */, - 952A63AA1C54F76400E3572C /* LogFormatter.swift */, - ); - name = Logger; - sourceTree = ""; - }; - 952A63AD1C5529EE00E3572C /* Request */ = { - isa = PBXGroup; - children = ( - ); - name = Request; - sourceTree = ""; - }; - A4335B72714901204F872B8A /* Pods */ = { - isa = PBXGroup; - children = ( - DF472984BADA33609A7AA065 /* Pods-iOS-Base-Library.debug.xcconfig */, - 6F5B2B4F5A576568CDD04A2A /* Pods-iOS-Base-Library.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 952A63881C5408AC00E3572C /* iOS-Base-Library */ = { - isa = PBXNativeTarget; - buildConfigurationList = 952A639B1C5408AC00E3572C /* Build configuration list for PBXNativeTarget "iOS-Base-Library" */; - buildPhases = ( - 4B9157910D31D1B16273AFDE /* Check Pods Manifest.lock */, - 952A63851C5408AC00E3572C /* Sources */, - 952A63861C5408AC00E3572C /* Frameworks */, - 952A63871C5408AC00E3572C /* Resources */, - FCFE4B565A7903B741E3244E /* Embed Pods Frameworks */, - 05526FCA226DE1CD8B67E2DA /* Copy Pods Resources */, - 952A639E1C540E4D00E3572C /* Tailor */, - 952A63AC1C551F1400E3572C /* SwiftLint */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "iOS-Base-Library"; - productName = "iOS-Base-Library"; - productReference = 952A63891C5408AC00E3572C /* iOS-Base-Library.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 952A63811C5408AC00E3572C /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "Touch Instinct"; - TargetAttributes = { - 952A63881C5408AC00E3572C = { - CreatedOnToolsVersion = 7.2; - }; - }; - }; - buildConfigurationList = 952A63841C5408AC00E3572C /* Build configuration list for PBXProject "iOS-Base-Library" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 952A63801C5408AC00E3572C; - productRefGroup = 952A638A1C5408AC00E3572C /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 952A63881C5408AC00E3572C /* iOS-Base-Library */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 952A63871C5408AC00E3572C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 952A63971C5408AC00E3572C /* LaunchScreen.storyboard in Resources */, - 952A63941C5408AC00E3572C /* Assets.xcassets in Resources */, - 952A63921C5408AC00E3572C /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 05526FCA226DE1CD8B67E2DA /* 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-iOS-Base-Library/Pods-iOS-Base-Library-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 4B9157910D31D1B16273AFDE /* 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; - }; - 952A639E1C540E4D00E3572C /* Tailor */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Tailor; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if hash tailor 2>/dev/null; then\n tailor --except=trailing-whitespace,forced-type-cast\nelse\n echo \"warning: Please install Tailor from https://tailor.sh\"\nfi"; - }; - 952A63AC1C551F1400E3572C /* SwiftLint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = SwiftLint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"SwiftLint does not exist, download from https://github.com/realm/SwiftLint\"\nfi"; - }; - FCFE4B565A7903B741E3244E /* 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-iOS-Base-Library/Pods-iOS-Base-Library-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 952A63851C5408AC00E3572C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 952A638F1C5408AC00E3572C /* ViewController.swift in Sources */, - 952A63A71C54F71500E3572C /* Log.swift in Sources */, - 952A63AB1C54F76400E3572C /* LogFormatter.swift in Sources */, - 952A638D1C5408AC00E3572C /* AppDelegate.swift in Sources */, - 952A63A51C543CD400E3572C /* App.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 952A63901C5408AC00E3572C /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 952A63911C5408AC00E3572C /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 952A63951C5408AC00E3572C /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 952A63961C5408AC00E3572C /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 952A63991C5408AC00E3572C /* 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; - 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_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 = 9.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 952A639A1C5408AC00E3572C /* 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 = 9.2; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 952A639C1C5408AC00E3572C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DF472984BADA33609A7AA065 /* Pods-iOS-Base-Library.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - GCC_PREFIX_HEADER = "iOS-Base-Library/iOSBaseLibraryPrefixHeader.pch"; - INFOPLIST_FILE = "iOS-Base-Library/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touchin.iOS-Base-Library"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 952A639D1C5408AC00E3572C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6F5B2B4F5A576568CDD04A2A /* Pods-iOS-Base-Library.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - GCC_PREFIX_HEADER = "iOS-Base-Library/iOSBaseLibraryPrefixHeader.pch"; - INFOPLIST_FILE = "iOS-Base-Library/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touchin.iOS-Base-Library"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 952A63841C5408AC00E3572C /* Build configuration list for PBXProject "iOS-Base-Library" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 952A63991C5408AC00E3572C /* Debug */, - 952A639A1C5408AC00E3572C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 952A639B1C5408AC00E3572C /* Build configuration list for PBXNativeTarget "iOS-Base-Library" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 952A639C1C5408AC00E3572C /* Debug */, - 952A639D1C5408AC00E3572C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 952A63811C5408AC00E3572C /* Project object */; -} diff --git a/iOS-Base-Library/iOS-Base-Library.xcworkspace/contents.xcworkspacedata b/iOS-Base-Library/iOS-Base-Library.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 82245c3d..00000000 --- a/iOS-Base-Library/iOS-Base-Library.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/iOS-Base-Library/iOS-Base-Library/AppDelegate.swift b/iOS-Base-Library/iOS-Base-Library/AppDelegate.swift deleted file mode 100644 index 76c37a5e..00000000 --- a/iOS-Base-Library/iOS-Base-Library/AppDelegate.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// AppDelegate.swift -// iOS-Base-Library -// -// Created by Николай Ашанин on 23.01.16. -// Copyright © 2016 Touch Instinct. All rights reserved. -// - -import UIKit -import CocoaLumberjack - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - var log: Log? - - func application(application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - - self.initLog() - - return true - } - - func initLog() -> Void { - log = Log.init() - DDLogInfo(Log.startMessage()) - } - -} diff --git a/iOS-Base-Library/iOS-Base-Library/Assets.xcassets/AppIcon.appiconset/Contents.json b/iOS-Base-Library/iOS-Base-Library/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index eeea76c2..00000000 --- a/iOS-Base-Library/iOS-Base-Library/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "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" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/iOS-Base-Library/iOS-Base-Library/Base.lproj/LaunchScreen.storyboard b/iOS-Base-Library/iOS-Base-Library/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e18..00000000 --- a/iOS-Base-Library/iOS-Base-Library/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS-Base-Library/iOS-Base-Library/Base.lproj/Main.storyboard b/iOS-Base-Library/iOS-Base-Library/Base.lproj/Main.storyboard deleted file mode 100644 index 65c23088..00000000 --- a/iOS-Base-Library/iOS-Base-Library/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS-Base-Library/iOS-Base-Library/Info.plist b/iOS-Base-Library/iOS-Base-Library/Info.plist deleted file mode 100644 index 40c6215d..00000000 --- a/iOS-Base-Library/iOS-Base-Library/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - 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 - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/iOS-Base-Library/iOS-Base-Library/ViewController.swift b/iOS-Base-Library/iOS-Base-Library/ViewController.swift deleted file mode 100644 index b3bc5faa..00000000 --- a/iOS-Base-Library/iOS-Base-Library/ViewController.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// ViewController.swift -// iOS-Base-Library -// -// Created by Николай Ашанин on 23.01.16. -// Copyright © 2016 Touch Instinct. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -}