├── .gitignore ├── Demo └── SimpleSessionDemo │ ├── Podfile │ ├── Podfile.lock │ ├── Pods │ ├── Local Podspecs │ │ └── SimpleSession.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ ├── SimpleLayout │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ ├── SimpleLayout.swift │ │ │ └── UIView+SimpleLayout.swift │ └── Target Support Files │ │ ├── Pods-SimpleSessionDemo │ │ ├── Info.plist │ │ ├── Pods-SimpleSessionDemo-acknowledgements.markdown │ │ ├── Pods-SimpleSessionDemo-acknowledgements.plist │ │ ├── Pods-SimpleSessionDemo-dummy.m │ │ ├── Pods-SimpleSessionDemo-frameworks.sh │ │ ├── Pods-SimpleSessionDemo-resources.sh │ │ ├── Pods-SimpleSessionDemo-umbrella.h │ │ ├── Pods-SimpleSessionDemo.debug.xcconfig │ │ ├── Pods-SimpleSessionDemo.modulemap │ │ └── Pods-SimpleSessionDemo.release.xcconfig │ │ ├── SimpleLayout │ │ ├── Info.plist │ │ ├── SimpleLayout-dummy.m │ │ ├── SimpleLayout-prefix.pch │ │ ├── SimpleLayout-umbrella.h │ │ ├── SimpleLayout.modulemap │ │ └── SimpleLayout.xcconfig │ │ └── SimpleSession │ │ ├── Info.plist │ │ ├── SimpleSession-dummy.m │ │ ├── SimpleSession-prefix.pch │ │ ├── SimpleSession-umbrella.h │ │ ├── SimpleSession.modulemap │ │ └── SimpleSession.xcconfig │ ├── SimpleSessionDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── SimpleSessionDemo.xcworkspace │ └── contents.xcworkspacedata │ └── SimpleSessionDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── first.imageset │ │ ├── Contents.json │ │ └── first.pdf │ └── second.imageset │ │ ├── Contents.json │ │ └── second.pdf │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── BaseViewController.swift │ ├── FirstViewController.swift │ ├── Info.plist │ └── SecondViewController.swift ├── LICENSE ├── README.md ├── SimpleSession.podspec └── Sources ├── SimpleSession.swift └── UserDefaultsSession.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/screenshots 64 | 65 | 66 | # inherit 67 | 68 | .DS_Store 69 | ## Build generated 70 | build/ 71 | DerivedData/ 72 | 73 | ## Various settings 74 | *.pbxuser 75 | !default.pbxuser 76 | *.mode1v3 77 | !default.mode1v3 78 | *.mode2v3 79 | !default.mode2v3 80 | *.perspectivev3 81 | !default.perspectivev3 82 | xcuserdata/ 83 | 84 | ## Other 85 | *.moved-aside 86 | *.xcuserstate 87 | 88 | ## Obj-C/Swift specific 89 | *.hmap 90 | *.ipa 91 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, "8.0" 2 | use_frameworks! 3 | 4 | target "SimpleSessionDemo" do 5 | 6 | pod "SimpleSession", path: "../../" 7 | pod "SimpleLayout", "0.2.1" 8 | 9 | end 10 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SimpleLayout (0.2.1) 3 | - SimpleSession (0.2.0) 4 | 5 | DEPENDENCIES: 6 | - SimpleLayout (= 0.2.1) 7 | - SimpleSession (from `../../`) 8 | 9 | EXTERNAL SOURCES: 10 | SimpleSession: 11 | :path: ../../ 12 | 13 | SPEC CHECKSUMS: 14 | SimpleLayout: 71971a2175eeac4f82b926662b0cf66ff697103f 15 | SimpleSession: 09c56490342d4a18de14a47d2a9c7de91e43c8b7 16 | 17 | PODFILE CHECKSUM: 1b1c4d10e881294b45b23083a6aa45cb0d79674c 18 | 19 | COCOAPODS: 1.2.0.beta.1 20 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Local Podspecs/SimpleSession.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SimpleSession", 3 | "version": "0.2.0", 4 | "license": { 5 | "type": "MIT", 6 | "file": "LICENSE" 7 | }, 8 | "summary": "Simple session written in Swift", 9 | "homepage": "https://github.com/comodinx/SimpleSession", 10 | "authors": { 11 | "Nicolas Molina": "comodinx@gmail.com" 12 | }, 13 | "platforms": { 14 | "ios": "8.0" 15 | }, 16 | "source": { 17 | "git": "https://github.com/comodinx/SimpleSession.git", 18 | "tag": "0.2.0" 19 | }, 20 | "source_files": "Sources/*.swift" 21 | } 22 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SimpleLayout (0.2.1) 3 | - SimpleSession (0.2.0) 4 | 5 | DEPENDENCIES: 6 | - SimpleLayout (= 0.2.1) 7 | - SimpleSession (from `../../`) 8 | 9 | EXTERNAL SOURCES: 10 | SimpleSession: 11 | :path: ../../ 12 | 13 | SPEC CHECKSUMS: 14 | SimpleLayout: 71971a2175eeac4f82b926662b0cf66ff697103f 15 | SimpleSession: 09c56490342d4a18de14a47d2a9c7de91e43c8b7 16 | 17 | PODFILE CHECKSUM: 1b1c4d10e881294b45b23083a6aa45cb0d79674c 18 | 19 | COCOAPODS: 1.2.0.beta.1 20 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0C1B7B9D4C0F6D5AEB69FBD26A233598 /* Pods-SimpleSessionDemo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF234B61B80EDF6055AE587EC0AC93B /* Pods-SimpleSessionDemo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 0E0F9222E90FC36A9CFB057C01A26CDD /* SimpleLayout-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E8CF0D0D495D3C8936E5CD4741113916 /* SimpleLayout-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 3A7D70434F79398649E492BCB1FEC53B /* SimpleSession-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 50A4C62985DE7DCEF69FC65C4EE89197 /* SimpleSession-dummy.m */; }; 13 | 4E931F95AF902F566FCF0CC9E0118CD7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 14 | 6965D9A2E277BD8432812582DAA6B7F2 /* Pods-SimpleSessionDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 19ADCED6F649A792D54AFC770437E2F8 /* Pods-SimpleSessionDemo-dummy.m */; }; 15 | 7BA9DCEC6A610700BFF56CADC8E639A1 /* SimpleLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCD20961FBCF513617A19BE6CEE9B135 /* SimpleLayout.swift */; }; 16 | 9B0045870686799E251AFEC49C0F1D33 /* SimpleSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83EF02260C185BFDDB8EECAE5E02EB3 /* SimpleSession.swift */; }; 17 | 9B830D50C05FFDA1FDB684909498BB98 /* SimpleLayout-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D51641301A095533C389697E15229CCC /* SimpleLayout-dummy.m */; }; 18 | AF4A257A0E79D3D69033934B5D31CC45 /* UserDefaultsSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = E31BD4BADF75A2EF25FAA59C9BA3819A /* UserDefaultsSession.swift */; }; 19 | B0E8EC863A396FA91C83906ECDC32401 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 20 | D476FD13627FDB985F7B4A4B942E3121 /* SimpleSession-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A4FE06329F663FC2E93499FC5C97007 /* SimpleSession-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21 | F12E5811A96D04C300911148EF0C5811 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 22 | F537668FA75D96AC09BA50B54D828434 /* UIView+SimpleLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1AE05228458BD4A8BFADFC715E882E9 /* UIView+SimpleLayout.swift */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | 2378E4594DE303C1AB775E120163B23E /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = 8ABCE3BE4E4566F9E5951A55C3D5BCEF; 31 | remoteInfo = SimpleLayout; 32 | }; 33 | 9A0CDB62F8177BE527419FC3E515D731 /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = FAAD838F75BE4165C411BA63324015C2; 38 | remoteInfo = SimpleSession; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 08B3BD14FDBDCFD1405DC9722BF1858D /* Pods-SimpleSessionDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SimpleSessionDemo-acknowledgements.markdown"; sourceTree = ""; }; 44 | 0FBAADF5223773E84CDD67C885CEFC94 /* Pods-SimpleSessionDemo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SimpleSessionDemo.modulemap"; sourceTree = ""; }; 45 | 19ADCED6F649A792D54AFC770437E2F8 /* Pods-SimpleSessionDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SimpleSessionDemo-dummy.m"; sourceTree = ""; }; 46 | 1E8C2BEC1094655BC7F3D382563569C6 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | 2F1FDB2BDC13876EF8FE1CD1BF4AE2C8 /* Pods_SimpleSessionDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SimpleSessionDemo.framework; path = "Pods-SimpleSessionDemo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 43D5A602C312E6467BDD1A7193038D81 /* Pods-SimpleSessionDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SimpleSessionDemo.debug.xcconfig"; sourceTree = ""; }; 49 | 4DB6D90DB8DC2F2CF3C8B40A437CF398 /* SimpleLayout.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SimpleLayout.modulemap; sourceTree = ""; }; 50 | 4EF3A4C058D194851AED3A7C8B75FF5A /* Pods-SimpleSessionDemo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SimpleSessionDemo-resources.sh"; sourceTree = ""; }; 51 | 50A4C62985DE7DCEF69FC65C4EE89197 /* SimpleSession-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SimpleSession-dummy.m"; sourceTree = ""; }; 52 | 7A4FE06329F663FC2E93499FC5C97007 /* SimpleSession-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SimpleSession-umbrella.h"; sourceTree = ""; }; 53 | 8E90388900AD21B898A768A9A8AFABEE /* SimpleSession.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SimpleSession.xcconfig; sourceTree = ""; }; 54 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 55 | A467EDFF6151A734287D22E078F093B3 /* Pods-SimpleSessionDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SimpleSessionDemo.release.xcconfig"; sourceTree = ""; }; 56 | A8A76A055DCD29A49911509BAB02AE49 /* SimpleLayout-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SimpleLayout-prefix.pch"; sourceTree = ""; }; 57 | AA88958B26D5E692C6A9261F103373C1 /* SimpleSession.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SimpleSession.modulemap; sourceTree = ""; }; 58 | B38324DCE6CCEF168B4C13A4BAF03990 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | B67316C933D4DDC9790E8D1B668D64FC /* Pods-SimpleSessionDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SimpleSessionDemo-frameworks.sh"; sourceTree = ""; }; 60 | B9FC8A2187E7AB7BCDA126EF7800A22A /* Pods-SimpleSessionDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SimpleSessionDemo-acknowledgements.plist"; sourceTree = ""; }; 61 | BCD20961FBCF513617A19BE6CEE9B135 /* SimpleLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SimpleLayout.swift; path = Sources/SimpleLayout.swift; sourceTree = ""; }; 62 | C83EF02260C185BFDDB8EECAE5E02EB3 /* SimpleSession.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SimpleSession.swift; sourceTree = ""; }; 63 | CAC2ED5E55E837B0CA96F493F5B11AA2 /* SimpleSession-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SimpleSession-prefix.pch"; sourceTree = ""; }; 64 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 65 | CCF0E87C857C06A4FC95427E3FE85FA5 /* SimpleSession.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SimpleSession.framework; path = SimpleSession.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | CE03783A7C4814A8BFEC0A87C8D10E55 /* SimpleLayout.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SimpleLayout.xcconfig; sourceTree = ""; }; 67 | D51641301A095533C389697E15229CCC /* SimpleLayout-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SimpleLayout-dummy.m"; sourceTree = ""; }; 68 | DBD534E21FD02DA52864F00162D0973B /* SimpleLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SimpleLayout.framework; path = SimpleLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | DDF234B61B80EDF6055AE587EC0AC93B /* Pods-SimpleSessionDemo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SimpleSessionDemo-umbrella.h"; sourceTree = ""; }; 70 | E1AE05228458BD4A8BFADFC715E882E9 /* UIView+SimpleLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+SimpleLayout.swift"; path = "Sources/UIView+SimpleLayout.swift"; sourceTree = ""; }; 71 | E31BD4BADF75A2EF25FAA59C9BA3819A /* UserDefaultsSession.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserDefaultsSession.swift; sourceTree = ""; }; 72 | E491C689FB51CEC0629E4FC8CDC14748 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 73 | E8CF0D0D495D3C8936E5CD4741113916 /* SimpleLayout-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SimpleLayout-umbrella.h"; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | 2640EED9998E9C218C47BC71D4FBE72F /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | B0E8EC863A396FA91C83906ECDC32401 /* Foundation.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | 5FC873D9146876A30835FD874FD76AAC /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | F12E5811A96D04C300911148EF0C5811 /* Foundation.framework in Frameworks */, 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | CA1B1E8720751251BAF35A056B8247E2 /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | 4E931F95AF902F566FCF0CC9E0118CD7 /* Foundation.framework in Frameworks */, 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | /* End PBXFrameworksBuildPhase section */ 102 | 103 | /* Begin PBXGroup section */ 104 | 04A028E01A3CC4A6D9E5D8FAE631DD03 /* Sources */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | C83EF02260C185BFDDB8EECAE5E02EB3 /* SimpleSession.swift */, 108 | E31BD4BADF75A2EF25FAA59C9BA3819A /* UserDefaultsSession.swift */, 109 | ); 110 | name = Sources; 111 | path = Sources; 112 | sourceTree = ""; 113 | }; 114 | 4DC2FE1890BF8130E9F472628DDA88A4 /* Support Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 1E8C2BEC1094655BC7F3D382563569C6 /* Info.plist */, 118 | 4DB6D90DB8DC2F2CF3C8B40A437CF398 /* SimpleLayout.modulemap */, 119 | CE03783A7C4814A8BFEC0A87C8D10E55 /* SimpleLayout.xcconfig */, 120 | D51641301A095533C389697E15229CCC /* SimpleLayout-dummy.m */, 121 | A8A76A055DCD29A49911509BAB02AE49 /* SimpleLayout-prefix.pch */, 122 | E8CF0D0D495D3C8936E5CD4741113916 /* SimpleLayout-umbrella.h */, 123 | ); 124 | name = "Support Files"; 125 | path = "../Target Support Files/SimpleLayout"; 126 | sourceTree = ""; 127 | }; 128 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, 132 | ); 133 | name = iOS; 134 | sourceTree = ""; 135 | }; 136 | 79F3131B45B54D692295D7E920012631 /* SimpleSession */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 04A028E01A3CC4A6D9E5D8FAE631DD03 /* Sources */, 140 | D507ED34598BABD7E425F724A6C7DED8 /* Support Files */, 141 | ); 142 | name = SimpleSession; 143 | path = ../../..; 144 | sourceTree = ""; 145 | }; 146 | 7BA1DF96B2CA28561093CEF398BAEBF7 /* Development Pods */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 79F3131B45B54D692295D7E920012631 /* SimpleSession */, 150 | ); 151 | name = "Development Pods"; 152 | sourceTree = ""; 153 | }; 154 | 7D791878A310E9F72C9DD2D461926D8D /* Products */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 2F1FDB2BDC13876EF8FE1CD1BF4AE2C8 /* Pods_SimpleSessionDemo.framework */, 158 | DBD534E21FD02DA52864F00162D0973B /* SimpleLayout.framework */, 159 | CCF0E87C857C06A4FC95427E3FE85FA5 /* SimpleSession.framework */, 160 | ); 161 | name = Products; 162 | sourceTree = ""; 163 | }; 164 | 7DB346D0F39D3F0E887471402A8071AB = { 165 | isa = PBXGroup; 166 | children = ( 167 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 168 | 7BA1DF96B2CA28561093CEF398BAEBF7 /* Development Pods */, 169 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 170 | 9301DCF768274EFE992819B1072DDAAF /* Pods */, 171 | 7D791878A310E9F72C9DD2D461926D8D /* Products */, 172 | B6B3ECA7D12FC2A5E5AE5E932CB2D8C0 /* Targets Support Files */, 173 | ); 174 | sourceTree = ""; 175 | }; 176 | 9301DCF768274EFE992819B1072DDAAF /* Pods */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | BDC3D2365F9B725FBF547B7BF5AC6711 /* SimpleLayout */, 180 | ); 181 | name = Pods; 182 | sourceTree = ""; 183 | }; 184 | B6B3ECA7D12FC2A5E5AE5E932CB2D8C0 /* Targets Support Files */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | FDBA09000D5866C9A734177DE8F060F8 /* Pods-SimpleSessionDemo */, 188 | ); 189 | name = "Targets Support Files"; 190 | sourceTree = ""; 191 | }; 192 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, 196 | ); 197 | name = Frameworks; 198 | sourceTree = ""; 199 | }; 200 | BDC3D2365F9B725FBF547B7BF5AC6711 /* SimpleLayout */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | BCD20961FBCF513617A19BE6CEE9B135 /* SimpleLayout.swift */, 204 | E1AE05228458BD4A8BFADFC715E882E9 /* UIView+SimpleLayout.swift */, 205 | 4DC2FE1890BF8130E9F472628DDA88A4 /* Support Files */, 206 | ); 207 | name = SimpleLayout; 208 | path = SimpleLayout; 209 | sourceTree = ""; 210 | }; 211 | D507ED34598BABD7E425F724A6C7DED8 /* Support Files */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | B38324DCE6CCEF168B4C13A4BAF03990 /* Info.plist */, 215 | AA88958B26D5E692C6A9261F103373C1 /* SimpleSession.modulemap */, 216 | 8E90388900AD21B898A768A9A8AFABEE /* SimpleSession.xcconfig */, 217 | 50A4C62985DE7DCEF69FC65C4EE89197 /* SimpleSession-dummy.m */, 218 | CAC2ED5E55E837B0CA96F493F5B11AA2 /* SimpleSession-prefix.pch */, 219 | 7A4FE06329F663FC2E93499FC5C97007 /* SimpleSession-umbrella.h */, 220 | ); 221 | name = "Support Files"; 222 | path = "Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleSession"; 223 | sourceTree = ""; 224 | }; 225 | FDBA09000D5866C9A734177DE8F060F8 /* Pods-SimpleSessionDemo */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | E491C689FB51CEC0629E4FC8CDC14748 /* Info.plist */, 229 | 0FBAADF5223773E84CDD67C885CEFC94 /* Pods-SimpleSessionDemo.modulemap */, 230 | 08B3BD14FDBDCFD1405DC9722BF1858D /* Pods-SimpleSessionDemo-acknowledgements.markdown */, 231 | B9FC8A2187E7AB7BCDA126EF7800A22A /* Pods-SimpleSessionDemo-acknowledgements.plist */, 232 | 19ADCED6F649A792D54AFC770437E2F8 /* Pods-SimpleSessionDemo-dummy.m */, 233 | B67316C933D4DDC9790E8D1B668D64FC /* Pods-SimpleSessionDemo-frameworks.sh */, 234 | 4EF3A4C058D194851AED3A7C8B75FF5A /* Pods-SimpleSessionDemo-resources.sh */, 235 | DDF234B61B80EDF6055AE587EC0AC93B /* Pods-SimpleSessionDemo-umbrella.h */, 236 | 43D5A602C312E6467BDD1A7193038D81 /* Pods-SimpleSessionDemo.debug.xcconfig */, 237 | A467EDFF6151A734287D22E078F093B3 /* Pods-SimpleSessionDemo.release.xcconfig */, 238 | ); 239 | name = "Pods-SimpleSessionDemo"; 240 | path = "Target Support Files/Pods-SimpleSessionDemo"; 241 | sourceTree = ""; 242 | }; 243 | /* End PBXGroup section */ 244 | 245 | /* Begin PBXHeadersBuildPhase section */ 246 | 5C87D2D664B60C07E4CFDD88743408E2 /* Headers */ = { 247 | isa = PBXHeadersBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | 0E0F9222E90FC36A9CFB057C01A26CDD /* SimpleLayout-umbrella.h in Headers */, 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | 818C25288D110A7B0A45940B895B2EFA /* Headers */ = { 255 | isa = PBXHeadersBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | D476FD13627FDB985F7B4A4B942E3121 /* SimpleSession-umbrella.h in Headers */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | A42B3F1874E0EDABE86B82701FDAC059 /* Headers */ = { 263 | isa = PBXHeadersBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | 0C1B7B9D4C0F6D5AEB69FBD26A233598 /* Pods-SimpleSessionDemo-umbrella.h in Headers */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXHeadersBuildPhase section */ 271 | 272 | /* Begin PBXNativeTarget section */ 273 | 06FC59CBA8DAF53EB0CEB5DCD57F6095 /* Pods-SimpleSessionDemo */ = { 274 | isa = PBXNativeTarget; 275 | buildConfigurationList = D7430A8063A8F6135B6AA0DCA8BE5E57 /* Build configuration list for PBXNativeTarget "Pods-SimpleSessionDemo" */; 276 | buildPhases = ( 277 | 557067CC78501CB5BEE565D94C176DAD /* Sources */, 278 | 2640EED9998E9C218C47BC71D4FBE72F /* Frameworks */, 279 | A42B3F1874E0EDABE86B82701FDAC059 /* Headers */, 280 | ); 281 | buildRules = ( 282 | ); 283 | dependencies = ( 284 | 2EBD4396952077853F20E92E32F872BE /* PBXTargetDependency */, 285 | 44A7EDFAC53EE19EC0EE1FF17C366F5C /* PBXTargetDependency */, 286 | ); 287 | name = "Pods-SimpleSessionDemo"; 288 | productName = "Pods-SimpleSessionDemo"; 289 | productReference = 2F1FDB2BDC13876EF8FE1CD1BF4AE2C8 /* Pods_SimpleSessionDemo.framework */; 290 | productType = "com.apple.product-type.framework"; 291 | }; 292 | 8ABCE3BE4E4566F9E5951A55C3D5BCEF /* SimpleLayout */ = { 293 | isa = PBXNativeTarget; 294 | buildConfigurationList = B8234B5791CFD9631CC92515828C1A6B /* Build configuration list for PBXNativeTarget "SimpleLayout" */; 295 | buildPhases = ( 296 | BFA1BF802DBD1998415E883CC0136F20 /* Sources */, 297 | CA1B1E8720751251BAF35A056B8247E2 /* Frameworks */, 298 | 5C87D2D664B60C07E4CFDD88743408E2 /* Headers */, 299 | ); 300 | buildRules = ( 301 | ); 302 | dependencies = ( 303 | ); 304 | name = SimpleLayout; 305 | productName = SimpleLayout; 306 | productReference = DBD534E21FD02DA52864F00162D0973B /* SimpleLayout.framework */; 307 | productType = "com.apple.product-type.framework"; 308 | }; 309 | FAAD838F75BE4165C411BA63324015C2 /* SimpleSession */ = { 310 | isa = PBXNativeTarget; 311 | buildConfigurationList = CB13B59A4C664669ECE31A75DD73E3E6 /* Build configuration list for PBXNativeTarget "SimpleSession" */; 312 | buildPhases = ( 313 | CAAB9AE3386C22234674FD4CEA243FCF /* Sources */, 314 | 5FC873D9146876A30835FD874FD76AAC /* Frameworks */, 315 | 818C25288D110A7B0A45940B895B2EFA /* Headers */, 316 | ); 317 | buildRules = ( 318 | ); 319 | dependencies = ( 320 | ); 321 | name = SimpleSession; 322 | productName = SimpleSession; 323 | productReference = CCF0E87C857C06A4FC95427E3FE85FA5 /* SimpleSession.framework */; 324 | productType = "com.apple.product-type.framework"; 325 | }; 326 | /* End PBXNativeTarget section */ 327 | 328 | /* Begin PBXProject section */ 329 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 330 | isa = PBXProject; 331 | attributes = { 332 | LastSwiftUpdateCheck = 0730; 333 | LastUpgradeCheck = 0700; 334 | }; 335 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 336 | compatibilityVersion = "Xcode 3.2"; 337 | developmentRegion = English; 338 | hasScannedForEncodings = 0; 339 | knownRegions = ( 340 | en, 341 | ); 342 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 343 | productRefGroup = 7D791878A310E9F72C9DD2D461926D8D /* Products */; 344 | projectDirPath = ""; 345 | projectRoot = ""; 346 | targets = ( 347 | 06FC59CBA8DAF53EB0CEB5DCD57F6095 /* Pods-SimpleSessionDemo */, 348 | 8ABCE3BE4E4566F9E5951A55C3D5BCEF /* SimpleLayout */, 349 | FAAD838F75BE4165C411BA63324015C2 /* SimpleSession */, 350 | ); 351 | }; 352 | /* End PBXProject section */ 353 | 354 | /* Begin PBXSourcesBuildPhase section */ 355 | 557067CC78501CB5BEE565D94C176DAD /* Sources */ = { 356 | isa = PBXSourcesBuildPhase; 357 | buildActionMask = 2147483647; 358 | files = ( 359 | 6965D9A2E277BD8432812582DAA6B7F2 /* Pods-SimpleSessionDemo-dummy.m in Sources */, 360 | ); 361 | runOnlyForDeploymentPostprocessing = 0; 362 | }; 363 | BFA1BF802DBD1998415E883CC0136F20 /* Sources */ = { 364 | isa = PBXSourcesBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | 9B830D50C05FFDA1FDB684909498BB98 /* SimpleLayout-dummy.m in Sources */, 368 | 7BA9DCEC6A610700BFF56CADC8E639A1 /* SimpleLayout.swift in Sources */, 369 | F537668FA75D96AC09BA50B54D828434 /* UIView+SimpleLayout.swift in Sources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | CAAB9AE3386C22234674FD4CEA243FCF /* Sources */ = { 374 | isa = PBXSourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | 3A7D70434F79398649E492BCB1FEC53B /* SimpleSession-dummy.m in Sources */, 378 | 9B0045870686799E251AFEC49C0F1D33 /* SimpleSession.swift in Sources */, 379 | AF4A257A0E79D3D69033934B5D31CC45 /* UserDefaultsSession.swift in Sources */, 380 | ); 381 | runOnlyForDeploymentPostprocessing = 0; 382 | }; 383 | /* End PBXSourcesBuildPhase section */ 384 | 385 | /* Begin PBXTargetDependency section */ 386 | 2EBD4396952077853F20E92E32F872BE /* PBXTargetDependency */ = { 387 | isa = PBXTargetDependency; 388 | name = SimpleLayout; 389 | target = 8ABCE3BE4E4566F9E5951A55C3D5BCEF /* SimpleLayout */; 390 | targetProxy = 2378E4594DE303C1AB775E120163B23E /* PBXContainerItemProxy */; 391 | }; 392 | 44A7EDFAC53EE19EC0EE1FF17C366F5C /* PBXTargetDependency */ = { 393 | isa = PBXTargetDependency; 394 | name = SimpleSession; 395 | target = FAAD838F75BE4165C411BA63324015C2 /* SimpleSession */; 396 | targetProxy = 9A0CDB62F8177BE527419FC3E515D731 /* PBXContainerItemProxy */; 397 | }; 398 | /* End PBXTargetDependency section */ 399 | 400 | /* Begin XCBuildConfiguration section */ 401 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | buildSettings = { 404 | ALWAYS_SEARCH_USER_PATHS = NO; 405 | CLANG_ANALYZER_NONNULL = YES; 406 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 407 | CLANG_CXX_LIBRARY = "libc++"; 408 | CLANG_ENABLE_MODULES = YES; 409 | CLANG_ENABLE_OBJC_ARC = YES; 410 | CLANG_WARN_BOOL_CONVERSION = YES; 411 | CLANG_WARN_CONSTANT_CONVERSION = YES; 412 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 413 | CLANG_WARN_EMPTY_BODY = YES; 414 | CLANG_WARN_ENUM_CONVERSION = YES; 415 | CLANG_WARN_INT_CONVERSION = YES; 416 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 417 | CLANG_WARN_UNREACHABLE_CODE = YES; 418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 419 | CODE_SIGNING_REQUIRED = NO; 420 | COPY_PHASE_STRIP = NO; 421 | ENABLE_TESTABILITY = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_DYNAMIC_NO_PIC = NO; 424 | GCC_OPTIMIZATION_LEVEL = 0; 425 | GCC_PREPROCESSOR_DEFINITIONS = ( 426 | "POD_CONFIGURATION_DEBUG=1", 427 | "DEBUG=1", 428 | "$(inherited)", 429 | ); 430 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 431 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 432 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 433 | GCC_WARN_UNDECLARED_SELECTOR = YES; 434 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 435 | GCC_WARN_UNUSED_FUNCTION = YES; 436 | GCC_WARN_UNUSED_VARIABLE = YES; 437 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 438 | ONLY_ACTIVE_ARCH = YES; 439 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 440 | STRIP_INSTALLED_PRODUCT = NO; 441 | SYMROOT = "${SRCROOT}/../build"; 442 | }; 443 | name = Debug; 444 | }; 445 | 1116F2BEF3EE32A611407936A8D437DF /* Debug */ = { 446 | isa = XCBuildConfiguration; 447 | baseConfigurationReference = CE03783A7C4814A8BFEC0A87C8D10E55 /* SimpleLayout.xcconfig */; 448 | buildSettings = { 449 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 450 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 451 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 452 | CURRENT_PROJECT_VERSION = 1; 453 | DEBUG_INFORMATION_FORMAT = dwarf; 454 | DEFINES_MODULE = YES; 455 | DYLIB_COMPATIBILITY_VERSION = 1; 456 | DYLIB_CURRENT_VERSION = 1; 457 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 458 | ENABLE_STRICT_OBJC_MSGSEND = YES; 459 | GCC_NO_COMMON_BLOCKS = YES; 460 | GCC_PREFIX_HEADER = "Target Support Files/SimpleLayout/SimpleLayout-prefix.pch"; 461 | INFOPLIST_FILE = "Target Support Files/SimpleLayout/Info.plist"; 462 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 463 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 465 | MODULEMAP_FILE = "Target Support Files/SimpleLayout/SimpleLayout.modulemap"; 466 | MTL_ENABLE_DEBUG_INFO = YES; 467 | PRODUCT_NAME = SimpleLayout; 468 | SDKROOT = iphoneos; 469 | SKIP_INSTALL = YES; 470 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 471 | SWIFT_VERSION = 3.0; 472 | TARGETED_DEVICE_FAMILY = "1,2"; 473 | VERSIONING_SYSTEM = "apple-generic"; 474 | VERSION_INFO_PREFIX = ""; 475 | }; 476 | name = Debug; 477 | }; 478 | 1A051E7D81A39D929AF79BE31AC5F2F1 /* Debug */ = { 479 | isa = XCBuildConfiguration; 480 | baseConfigurationReference = 8E90388900AD21B898A768A9A8AFABEE /* SimpleSession.xcconfig */; 481 | buildSettings = { 482 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 484 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 485 | CURRENT_PROJECT_VERSION = 1; 486 | DEBUG_INFORMATION_FORMAT = dwarf; 487 | DEFINES_MODULE = YES; 488 | DYLIB_COMPATIBILITY_VERSION = 1; 489 | DYLIB_CURRENT_VERSION = 1; 490 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 491 | ENABLE_STRICT_OBJC_MSGSEND = YES; 492 | GCC_NO_COMMON_BLOCKS = YES; 493 | GCC_PREFIX_HEADER = "Target Support Files/SimpleSession/SimpleSession-prefix.pch"; 494 | INFOPLIST_FILE = "Target Support Files/SimpleSession/Info.plist"; 495 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 496 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 497 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 498 | MODULEMAP_FILE = "Target Support Files/SimpleSession/SimpleSession.modulemap"; 499 | MTL_ENABLE_DEBUG_INFO = YES; 500 | PRODUCT_NAME = SimpleSession; 501 | SDKROOT = iphoneos; 502 | SKIP_INSTALL = YES; 503 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 504 | SWIFT_VERSION = 3.0; 505 | TARGETED_DEVICE_FAMILY = "1,2"; 506 | VERSIONING_SYSTEM = "apple-generic"; 507 | VERSION_INFO_PREFIX = ""; 508 | }; 509 | name = Debug; 510 | }; 511 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | ALWAYS_SEARCH_USER_PATHS = NO; 515 | CLANG_ANALYZER_NONNULL = YES; 516 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 517 | CLANG_CXX_LIBRARY = "libc++"; 518 | CLANG_ENABLE_MODULES = YES; 519 | CLANG_ENABLE_OBJC_ARC = YES; 520 | CLANG_WARN_BOOL_CONVERSION = YES; 521 | CLANG_WARN_CONSTANT_CONVERSION = YES; 522 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 523 | CLANG_WARN_EMPTY_BODY = YES; 524 | CLANG_WARN_ENUM_CONVERSION = YES; 525 | CLANG_WARN_INT_CONVERSION = YES; 526 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 527 | CLANG_WARN_UNREACHABLE_CODE = YES; 528 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 529 | CODE_SIGNING_REQUIRED = NO; 530 | COPY_PHASE_STRIP = YES; 531 | ENABLE_NS_ASSERTIONS = NO; 532 | GCC_C_LANGUAGE_STANDARD = gnu99; 533 | GCC_PREPROCESSOR_DEFINITIONS = ( 534 | "POD_CONFIGURATION_RELEASE=1", 535 | "$(inherited)", 536 | ); 537 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 538 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 539 | GCC_WARN_UNDECLARED_SELECTOR = YES; 540 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 541 | GCC_WARN_UNUSED_FUNCTION = YES; 542 | GCC_WARN_UNUSED_VARIABLE = YES; 543 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 544 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 545 | STRIP_INSTALLED_PRODUCT = NO; 546 | SYMROOT = "${SRCROOT}/../build"; 547 | VALIDATE_PRODUCT = YES; 548 | }; 549 | name = Release; 550 | }; 551 | 5D637EAE428D8B2549188ED7A155B465 /* Release */ = { 552 | isa = XCBuildConfiguration; 553 | baseConfigurationReference = 8E90388900AD21B898A768A9A8AFABEE /* SimpleSession.xcconfig */; 554 | buildSettings = { 555 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 556 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 557 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 558 | CURRENT_PROJECT_VERSION = 1; 559 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 560 | DEFINES_MODULE = YES; 561 | DYLIB_COMPATIBILITY_VERSION = 1; 562 | DYLIB_CURRENT_VERSION = 1; 563 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 564 | ENABLE_STRICT_OBJC_MSGSEND = YES; 565 | GCC_NO_COMMON_BLOCKS = YES; 566 | GCC_PREFIX_HEADER = "Target Support Files/SimpleSession/SimpleSession-prefix.pch"; 567 | INFOPLIST_FILE = "Target Support Files/SimpleSession/Info.plist"; 568 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 569 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 570 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 571 | MODULEMAP_FILE = "Target Support Files/SimpleSession/SimpleSession.modulemap"; 572 | MTL_ENABLE_DEBUG_INFO = NO; 573 | PRODUCT_NAME = SimpleSession; 574 | SDKROOT = iphoneos; 575 | SKIP_INSTALL = YES; 576 | SWIFT_VERSION = 3.0; 577 | TARGETED_DEVICE_FAMILY = "1,2"; 578 | VERSIONING_SYSTEM = "apple-generic"; 579 | VERSION_INFO_PREFIX = ""; 580 | }; 581 | name = Release; 582 | }; 583 | 66525B25A9EEBC26E4567A5545B257B9 /* Debug */ = { 584 | isa = XCBuildConfiguration; 585 | baseConfigurationReference = 43D5A602C312E6467BDD1A7193038D81 /* Pods-SimpleSessionDemo.debug.xcconfig */; 586 | buildSettings = { 587 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 588 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 589 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 590 | CURRENT_PROJECT_VERSION = 1; 591 | DEBUG_INFORMATION_FORMAT = dwarf; 592 | DEFINES_MODULE = YES; 593 | DYLIB_COMPATIBILITY_VERSION = 1; 594 | DYLIB_CURRENT_VERSION = 1; 595 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 596 | ENABLE_STRICT_OBJC_MSGSEND = YES; 597 | GCC_NO_COMMON_BLOCKS = YES; 598 | INFOPLIST_FILE = "Target Support Files/Pods-SimpleSessionDemo/Info.plist"; 599 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 600 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 601 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 602 | MACH_O_TYPE = staticlib; 603 | MODULEMAP_FILE = "Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo.modulemap"; 604 | MTL_ENABLE_DEBUG_INFO = YES; 605 | OTHER_LDFLAGS = ""; 606 | OTHER_LIBTOOLFLAGS = ""; 607 | PODS_ROOT = "$(SRCROOT)"; 608 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 609 | PRODUCT_NAME = Pods_SimpleSessionDemo; 610 | SDKROOT = iphoneos; 611 | SKIP_INSTALL = YES; 612 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 613 | TARGETED_DEVICE_FAMILY = "1,2"; 614 | VERSIONING_SYSTEM = "apple-generic"; 615 | VERSION_INFO_PREFIX = ""; 616 | }; 617 | name = Debug; 618 | }; 619 | A512B6D6E3EA27CB2F75B3980CDFDB8A /* Release */ = { 620 | isa = XCBuildConfiguration; 621 | baseConfigurationReference = A467EDFF6151A734287D22E078F093B3 /* Pods-SimpleSessionDemo.release.xcconfig */; 622 | buildSettings = { 623 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 624 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 625 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 626 | CURRENT_PROJECT_VERSION = 1; 627 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 628 | DEFINES_MODULE = YES; 629 | DYLIB_COMPATIBILITY_VERSION = 1; 630 | DYLIB_CURRENT_VERSION = 1; 631 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 632 | ENABLE_STRICT_OBJC_MSGSEND = YES; 633 | GCC_NO_COMMON_BLOCKS = YES; 634 | INFOPLIST_FILE = "Target Support Files/Pods-SimpleSessionDemo/Info.plist"; 635 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 636 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 637 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 638 | MACH_O_TYPE = staticlib; 639 | MODULEMAP_FILE = "Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo.modulemap"; 640 | MTL_ENABLE_DEBUG_INFO = NO; 641 | OTHER_LDFLAGS = ""; 642 | OTHER_LIBTOOLFLAGS = ""; 643 | PODS_ROOT = "$(SRCROOT)"; 644 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 645 | PRODUCT_NAME = Pods_SimpleSessionDemo; 646 | SDKROOT = iphoneos; 647 | SKIP_INSTALL = YES; 648 | TARGETED_DEVICE_FAMILY = "1,2"; 649 | VERSIONING_SYSTEM = "apple-generic"; 650 | VERSION_INFO_PREFIX = ""; 651 | }; 652 | name = Release; 653 | }; 654 | AF05BE67C1F51BD0D680B22FA8AFCD04 /* Release */ = { 655 | isa = XCBuildConfiguration; 656 | baseConfigurationReference = CE03783A7C4814A8BFEC0A87C8D10E55 /* SimpleLayout.xcconfig */; 657 | buildSettings = { 658 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 659 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 660 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 661 | CURRENT_PROJECT_VERSION = 1; 662 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 663 | DEFINES_MODULE = YES; 664 | DYLIB_COMPATIBILITY_VERSION = 1; 665 | DYLIB_CURRENT_VERSION = 1; 666 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 667 | ENABLE_STRICT_OBJC_MSGSEND = YES; 668 | GCC_NO_COMMON_BLOCKS = YES; 669 | GCC_PREFIX_HEADER = "Target Support Files/SimpleLayout/SimpleLayout-prefix.pch"; 670 | INFOPLIST_FILE = "Target Support Files/SimpleLayout/Info.plist"; 671 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 672 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 673 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 674 | MODULEMAP_FILE = "Target Support Files/SimpleLayout/SimpleLayout.modulemap"; 675 | MTL_ENABLE_DEBUG_INFO = NO; 676 | PRODUCT_NAME = SimpleLayout; 677 | SDKROOT = iphoneos; 678 | SKIP_INSTALL = YES; 679 | SWIFT_VERSION = 3.0; 680 | TARGETED_DEVICE_FAMILY = "1,2"; 681 | VERSIONING_SYSTEM = "apple-generic"; 682 | VERSION_INFO_PREFIX = ""; 683 | }; 684 | name = Release; 685 | }; 686 | /* End XCBuildConfiguration section */ 687 | 688 | /* Begin XCConfigurationList section */ 689 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 690 | isa = XCConfigurationList; 691 | buildConfigurations = ( 692 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */, 693 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */, 694 | ); 695 | defaultConfigurationIsVisible = 0; 696 | defaultConfigurationName = Release; 697 | }; 698 | B8234B5791CFD9631CC92515828C1A6B /* Build configuration list for PBXNativeTarget "SimpleLayout" */ = { 699 | isa = XCConfigurationList; 700 | buildConfigurations = ( 701 | 1116F2BEF3EE32A611407936A8D437DF /* Debug */, 702 | AF05BE67C1F51BD0D680B22FA8AFCD04 /* Release */, 703 | ); 704 | defaultConfigurationIsVisible = 0; 705 | defaultConfigurationName = Release; 706 | }; 707 | CB13B59A4C664669ECE31A75DD73E3E6 /* Build configuration list for PBXNativeTarget "SimpleSession" */ = { 708 | isa = XCConfigurationList; 709 | buildConfigurations = ( 710 | 1A051E7D81A39D929AF79BE31AC5F2F1 /* Debug */, 711 | 5D637EAE428D8B2549188ED7A155B465 /* Release */, 712 | ); 713 | defaultConfigurationIsVisible = 0; 714 | defaultConfigurationName = Release; 715 | }; 716 | D7430A8063A8F6135B6AA0DCA8BE5E57 /* Build configuration list for PBXNativeTarget "Pods-SimpleSessionDemo" */ = { 717 | isa = XCConfigurationList; 718 | buildConfigurations = ( 719 | 66525B25A9EEBC26E4567A5545B257B9 /* Debug */, 720 | A512B6D6E3EA27CB2F75B3980CDFDB8A /* Release */, 721 | ); 722 | defaultConfigurationIsVisible = 0; 723 | defaultConfigurationName = Release; 724 | }; 725 | /* End XCConfigurationList section */ 726 | }; 727 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 728 | } 729 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/SimpleLayout/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 ecerney 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/SimpleLayout/README.md: -------------------------------------------------------------------------------- 1 | SimpleLayout 2 | ============ 3 | [![Version](http://img.shields.io/cocoapods/v/SimpleLayout.svg?style=flat)](http://cocoapods.org/pods/SimpleLayout) [![Platform](http://img.shields.io/cocoapods/p/SimpleLayout.svg?style=flat)](http://cocoapods.org/pods/SimpleLayout) [![License](http://img.shields.io/cocoapods/l/SimpleLayout.svg?style=flat)](LICENSE) 4 | 5 | 6 | Índice 7 | ------ 8 | 9 | * [Features][features]. 10 | * [Screen Shots][screenshots]. 11 | * [Prerequisites][prerequisites]. 12 | * [Installation][Installation]. 13 | * [How to Use][how_to_use]. 14 | + [Example][how_to_use_example]. 15 | + [API][how_to_use_api]. 16 | + [Margin][how_to_use_api_margin]. 17 | + [Origin][how_to_use_api_origin]. 18 | + [Size][how_to_use_api_size]. 19 | * [License][license]. 20 | 21 | 22 | Features 23 | -------- 24 | * Easy to use 25 | * NSLayoutConstraint shortcuts 26 | 27 | 28 | Screen Shots 29 | ------------ 30 |

31 | 32 | Demo Example 33 | 34 |

35 | 36 | Prerequisites 37 | ------------- 38 | * iOS 8+ 39 | * Xcode 7+ 40 | * Swift 3.0 41 | 42 | 43 | Installation 44 | ------------ 45 | SimpleLayout is available through CocoaPods. To install it, simply add the following line to your Podfile: 46 | ``` 47 | pod "SimpleLayout" 48 | ``` 49 | 50 | 51 | How to Use 52 | ---------- 53 | Check out the demo project for a concrete example. 54 | 55 | #### Example 56 | ``` swift 57 | let background = UIView() 58 | 59 | background.backgroundColor = .greenColor() 60 | view.addSubview(background) 61 | 62 | SimpleLayout.addMarginZero(background, toItem: view) 63 | // OR 64 | // background.sl_addMarginZero(view) 65 | // OR 66 | // background.sl_addMargin(view, constant: 0) 67 | ``` 68 | 69 | #### API 70 | 71 | ##### Margin 72 | 73 | ```swift 74 | let imgProfile = UIImageView() 75 | 76 | imgProfile.image = UIImage(named: "yourimage") 77 | view.addSubview(imgProfile) 78 | 79 | SimpleLayout.addMarginTop(imgProfile, toItem: view, constant: 10) 80 | SimpleLayout.addMarginLeft(imgProfile, toItem: view, constant: 10) 81 | SimpleLayout.addMarginRight(imgProfile, toItem: view, constant: 10) 82 | // OR 83 | // imgProfile.sl_addMarginTop(view, constant: 10) 84 | // imgProfile.sl_addMarginLeft(view, constant: 10) 85 | // imgProfile.sl_addMarginRight(view, constant: 10) 86 | // OR 87 | // imgProfile.sl_addMarginTop(view, constant: 10) 88 | // imgProfile.sl_addMarginLeading(view, constant: 10) 89 | // imgProfile.sl_addMarginTrailing(view, constant: 10) 90 | ``` 91 | 92 | ```swift 93 | let lblFooter = UILabel() 94 | 95 | lblFooter.text = "Copyright © 2016 YourApp. All rights reserved" 96 | view.addSubview(lblFooter) 97 | 98 | SimpleLayout.addMarginBottom(lblFooter, toItem: view, constant: 10) 99 | SimpleLayout.addMarginLeft(lblFooter, toItem: view, constant: 10, relatedBy: .GreaterThanOrEqual) 100 | SimpleLayout.addMarginRight(lblFooter, toItem: view, constant: 10, relatedBy: .GreaterThanOrEqual) 101 | // OR 102 | // lblFooter.sl_addMarginBottom(view, constant: 10) 103 | // lblFooter.sl_addMarginLeft(view, constant: 10, relatedBy: .GreaterThanOrEqual) 104 | // lblFooter.sl_addMarginRight(view, constant: 10, relatedBy: .GreaterThanOrEqual) 105 | // OR 106 | // lblFooter.sl_addMarginBottom(view, constant: 10) 107 | // lblFooter.sl_addMarginLeading(view, constant: 10, relatedBy: .GreaterThanOrEqual) 108 | // lblFooter.sl_addMarginTrailing(view, constant: 10, relatedBy: .GreaterThanOrEqual) 109 | ``` 110 | 111 | ##### Origin 112 | 113 | ```swift 114 | let lblName = UILabel() 115 | 116 | lblName.text = "Pepito" 117 | view.addSubview(lblName) 118 | 119 | SimpleLayout.addCenter(lblName, toItem: view) 120 | // OR 121 | // lblName.sl_addCenter(view) 122 | ``` 123 | 124 | ```swift 125 | let lblFooter = UILabel() 126 | 127 | lblFooter.text = "Copyright © 2016 YourApp. All rights reserved" 128 | view.addSubview(lblFooter) 129 | 130 | SimpleLayout.addCenterX(lblFooter, toItem: view) 131 | SimpleLayout.addMarginBottom(lblFooter, toItem: view, constant: 10) 132 | // OR 133 | // lblFooter.sl_addCenterX(view) 134 | // lblFooter.sl_addMarginBottom(view, constant: 10) 135 | ``` 136 | 137 | ##### Size 138 | 139 | ```swift 140 | let lblDescription = UILabel() 141 | 142 | lblDescription.text = "Description to long..." 143 | lblDescription.lineBreakMode = NSLineBreakMode.ByWordWrapping 144 | lblDescription.numberOfLines = 0 // Infinite 145 | view.addSubview(lblDescription) 146 | 147 | SimpleLayout.addHeight(lblDescription, constant: 21, relatedBy: .GreaterThanOrEqual) 148 | // OR 149 | // lblDescription.sl_addHeight(21, relatedBy: .GreaterThanOrEqual) 150 | ``` 151 | 152 | ```swift 153 | let imgProfile = UIImageView() 154 | 155 | imgProfile.image = UIImage(named: "yourimage") 156 | view.addSubview(imgProfile) 157 | 158 | SimpleLayout.addSize(imgProfile, constant: 175) 159 | SimpleLayout.addCenter(imgProfile, toItem: view) 160 | // OR 161 | // imgProfile.sl_addSize(175) 162 | // imgProfile.sl_addCenter(view) 163 | ``` 164 | 165 | License 166 | ------- 167 | SimpleLayout is available under the MIT license. See the LICENSE file for more info. 168 | 169 | 170 | [features]: #features 171 | [screenshots]: #screen-shots 172 | [prerequisites]: #prerequisites 173 | [installation]: #installation 174 | [how_to_use]: #how-to-use 175 | [how_to_use_example]: #example 176 | [how_to_use_api]: #api 177 | [how_to_use_api_margin]: #margin 178 | [how_to_use_api_origin]: #origin 179 | [how_to_use_api_size]: #size 180 | [license]: #license 181 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/SimpleLayout/Sources/SimpleLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleLayout.swift 3 | // SimpleLayout 4 | // 5 | // Created by Nicolas Molina on 9/22/16. 6 | // Copyright © 2016 SimpleLayout. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class SimpleLayout: NSObject 12 | { 13 | 14 | /** 15 | Add a constraint to be toItem or item and activate. 16 | 17 | - returns: The constraint. 18 | */ 19 | @discardableResult open class func addConstraint( 20 | _ item: UIView, 21 | attribute: NSLayoutAttribute, 22 | toItem: UIView? = nil, 23 | attribute toAttribute: NSLayoutAttribute, 24 | constant: CGFloat = 0.0, 25 | relatedBy: NSLayoutRelation = .equal, 26 | multiplier: CGFloat = 1.0 27 | ) -> NSLayoutConstraint 28 | { 29 | let constraint = NSLayoutConstraint( 30 | item: item, 31 | attribute: attribute, 32 | relatedBy: relatedBy, 33 | toItem: toItem, 34 | attribute: toAttribute, 35 | multiplier: multiplier, 36 | constant: constant 37 | ) 38 | 39 | item.translatesAutoresizingMaskIntoConstraints = false 40 | 41 | NSLayoutConstraint.activate([constraint]) 42 | return constraint 43 | } 44 | 45 | /** 46 | Add a margin top constraint to be toItem or item and activate. 47 | 48 | - returns: The constraint. 49 | */ 50 | @discardableResult open class func addMarginTop( 51 | _ item: UIView, 52 | toItem: UIView, 53 | attribute: NSLayoutAttribute = .top, 54 | constant: CGFloat = 0.0, 55 | relatedBy: NSLayoutRelation = .equal, 56 | multiplier: CGFloat = 1.0 57 | ) -> NSLayoutConstraint 58 | { 59 | return SimpleLayout.addConstraint( 60 | item, 61 | attribute: .top, 62 | toItem: toItem, 63 | attribute: attribute, 64 | constant: constant, 65 | relatedBy: relatedBy, 66 | multiplier: multiplier 67 | ) 68 | } 69 | 70 | /** 71 | Add a margin top 0 (zero) constraint to be toItem or item and activate. 72 | 73 | - returns: The constraint. 74 | */ 75 | @discardableResult open class func addMarginTopZero( 76 | _ item: UIView, 77 | toItem: UIView, 78 | attribute: NSLayoutAttribute = .top, 79 | relatedBy: NSLayoutRelation = .equal, 80 | multiplier: CGFloat = 1.0 81 | ) -> NSLayoutConstraint 82 | { 83 | return SimpleLayout.addMarginTop( 84 | item, 85 | toItem: toItem, 86 | attribute: attribute, 87 | constant: 0.0, 88 | relatedBy: relatedBy, 89 | multiplier: multiplier 90 | ) 91 | } 92 | 93 | /** 94 | Add a margin bottom constraint to be toItem or item and activate. 95 | 96 | - returns: The constraint. 97 | */ 98 | @discardableResult open class func addMarginBottom( 99 | _ item: UIView, 100 | toItem: UIView, 101 | attribute: NSLayoutAttribute = .bottom, 102 | constant: CGFloat = 0.0, 103 | relatedBy: NSLayoutRelation = .equal, 104 | multiplier: CGFloat = 1.0 105 | ) -> NSLayoutConstraint 106 | { 107 | return SimpleLayout.addConstraint( 108 | item, 109 | attribute: .bottom, 110 | toItem: toItem, 111 | attribute: attribute, 112 | constant: -constant, 113 | relatedBy: relatedBy, 114 | multiplier: multiplier 115 | ) 116 | } 117 | 118 | /** 119 | Add a margin bottom 0 (zero) constraint to be toItem or item and activate. 120 | 121 | - returns: The constraint. 122 | */ 123 | @discardableResult open class func addMarginBottomZero( 124 | _ item: UIView, 125 | toItem: UIView, 126 | attribute: NSLayoutAttribute = .bottom, 127 | relatedBy: NSLayoutRelation = .equal, 128 | multiplier: CGFloat = 1.0 129 | ) -> NSLayoutConstraint 130 | { 131 | return SimpleLayout.addMarginBottom( 132 | item, 133 | toItem: toItem, 134 | attribute: attribute, 135 | constant: 0.0, 136 | relatedBy: relatedBy, 137 | multiplier: multiplier 138 | ) 139 | } 140 | 141 | /** 142 | Add a margin left constraint to be toItem or item and activate. 143 | 144 | - returns: The constraint. 145 | */ 146 | @discardableResult open class func addMarginLeft( 147 | _ item: UIView, 148 | toItem: UIView, 149 | attribute: NSLayoutAttribute = .left, 150 | constant: CGFloat = 0.0, 151 | relatedBy: NSLayoutRelation = .equal, 152 | multiplier: CGFloat = 1.0 153 | ) -> NSLayoutConstraint 154 | { 155 | return SimpleLayout.addConstraint( 156 | item, 157 | attribute: .left, 158 | toItem: toItem, 159 | attribute: attribute, 160 | constant: constant, 161 | relatedBy: relatedBy, 162 | multiplier: multiplier 163 | ) 164 | } 165 | 166 | /** 167 | Add a margin left 0 (zero) constraint to be toItem or item and activate. 168 | 169 | - returns: The constraint. 170 | */ 171 | @discardableResult open class func addMarginLeftZero( 172 | _ item: UIView, 173 | toItem: UIView, 174 | attribute: NSLayoutAttribute = .left, 175 | relatedBy: NSLayoutRelation = .equal, 176 | multiplier: CGFloat = 1.0 177 | ) -> NSLayoutConstraint 178 | { 179 | return SimpleLayout.addMarginLeft( 180 | item, 181 | toItem: toItem, 182 | attribute: attribute, 183 | constant: 0.0, 184 | relatedBy: relatedBy, 185 | multiplier: multiplier 186 | ) 187 | } 188 | 189 | /** 190 | Add a margin right constraint to be toItem or item and activate. 191 | 192 | - returns: The constraint. 193 | */ 194 | @discardableResult open class func addMarginRight( 195 | _ item: UIView, 196 | toItem: UIView, 197 | attribute: NSLayoutAttribute = .right, 198 | constant: CGFloat = 0.0, 199 | relatedBy: NSLayoutRelation = .equal, 200 | multiplier: CGFloat = 1.0 201 | ) -> NSLayoutConstraint 202 | { 203 | return SimpleLayout.addConstraint( 204 | item, 205 | attribute: .right, 206 | toItem: toItem, 207 | attribute: attribute, 208 | constant: -constant, 209 | relatedBy: relatedBy, 210 | multiplier: multiplier 211 | ) 212 | } 213 | 214 | /** 215 | Add a margin right 0 (zero) constraint to be toItem or item and activate. 216 | 217 | - returns: The constraint. 218 | */ 219 | @discardableResult open class func addMarginRightZero( 220 | _ item: UIView, 221 | toItem: UIView, 222 | attribute: NSLayoutAttribute = .right, 223 | relatedBy: NSLayoutRelation = .equal, 224 | multiplier: CGFloat = 1.0 225 | ) -> NSLayoutConstraint 226 | { 227 | return SimpleLayout.addMarginRight( 228 | item, 229 | toItem: toItem, 230 | attribute: attribute, 231 | constant: 0.0, 232 | relatedBy: relatedBy, 233 | multiplier: multiplier 234 | ) 235 | } 236 | 237 | /** 238 | Add a margin leading constraint to be toItem or item and activate. 239 | 240 | - returns: The constraint. 241 | */ 242 | @discardableResult open class func addMarginLeading( 243 | _ item: UIView, 244 | toItem: UIView, 245 | attribute: NSLayoutAttribute = .leading, 246 | constant: CGFloat = 0.0, 247 | relatedBy: NSLayoutRelation = .equal, 248 | multiplier: CGFloat = 1.0 249 | ) -> NSLayoutConstraint 250 | { 251 | return SimpleLayout.addConstraint( 252 | item, 253 | attribute: .leading, 254 | toItem: toItem, 255 | attribute: attribute, 256 | constant: constant, 257 | relatedBy: relatedBy, 258 | multiplier: multiplier 259 | ) 260 | } 261 | 262 | /** 263 | Add a margin leading 0 (zero) constraint to be toItem or item and activate. 264 | 265 | - returns: The constraint. 266 | */ 267 | @discardableResult open class func addMarginLeadingZero( 268 | _ item: UIView, 269 | toItem: UIView, 270 | attribute: NSLayoutAttribute = .leading, 271 | relatedBy: NSLayoutRelation = .equal, 272 | multiplier: CGFloat = 1.0 273 | ) -> NSLayoutConstraint 274 | { 275 | return SimpleLayout.addMarginLeading( 276 | item, 277 | toItem: toItem, 278 | attribute: attribute, 279 | constant: 0.0, 280 | relatedBy: relatedBy, 281 | multiplier: multiplier 282 | ) 283 | } 284 | 285 | /** 286 | Add a margin trailing constraint to be toItem or item and activate. 287 | 288 | - returns: The constraint. 289 | */ 290 | @discardableResult open class func addMarginTrailing( 291 | _ item: UIView, 292 | toItem: UIView, 293 | attribute: NSLayoutAttribute = .trailing, 294 | constant: CGFloat = 0.0, 295 | relatedBy: NSLayoutRelation = .equal, 296 | multiplier: CGFloat = 1.0 297 | ) -> NSLayoutConstraint 298 | { 299 | return SimpleLayout.addConstraint( 300 | item, 301 | attribute: .trailing, 302 | toItem: toItem, 303 | attribute: attribute, 304 | constant: -constant, 305 | relatedBy: relatedBy, 306 | multiplier: multiplier 307 | ) 308 | } 309 | 310 | /** 311 | Add a margin trailing 0 (zero) constraint to be toItem or item and activate. 312 | 313 | - returns: The constraint. 314 | */ 315 | @discardableResult open class func addMarginTrailingZero( 316 | _ item: UIView, 317 | toItem: UIView, 318 | attribute: NSLayoutAttribute = .trailing, 319 | relatedBy: NSLayoutRelation = .equal, 320 | multiplier: CGFloat = 1.0 321 | ) -> NSLayoutConstraint 322 | { 323 | return SimpleLayout.addMarginTrailing( 324 | item, 325 | toItem: toItem, 326 | attribute: attribute, 327 | constant: 0.0, 328 | relatedBy: relatedBy, 329 | multiplier: multiplier 330 | ) 331 | } 332 | 333 | /** 334 | Add margins top, bottom, left and right to be toItem or item and activate. 335 | 336 | - returns: The constraints [top, bottom, left, right]. 337 | */ 338 | @discardableResult open class func addMargin( 339 | _ item: UIView, 340 | toItem: UIView, 341 | constant: CGFloat = 0.0, 342 | relatedBy: NSLayoutRelation = .equal, 343 | multiplier: CGFloat = 1.0 344 | ) -> [NSLayoutConstraint] 345 | { 346 | let constraintTop = SimpleLayout.addMarginTop( 347 | item, 348 | toItem: toItem, 349 | constant: constant, 350 | relatedBy: relatedBy, 351 | multiplier: multiplier 352 | ) 353 | let constraintBottom = SimpleLayout.addMarginBottom( 354 | item, 355 | toItem: toItem, 356 | constant: -constant, 357 | relatedBy: relatedBy, 358 | multiplier: multiplier 359 | ) 360 | let constraintLeft = SimpleLayout.addMarginLeft( 361 | item, 362 | toItem: toItem, 363 | constant: constant, 364 | relatedBy: relatedBy, 365 | multiplier: multiplier 366 | ) 367 | let constraintRight = SimpleLayout.addMarginRight( 368 | item, 369 | toItem: toItem, 370 | constant: -constant, 371 | relatedBy: relatedBy, 372 | multiplier: multiplier 373 | ) 374 | 375 | return [constraintTop, constraintBottom, constraintLeft, constraintRight] 376 | } 377 | 378 | /** 379 | Add margins top, bottom, left and right in 0 (zero) to be toItem or item and activate. 380 | 381 | - returns: The constraints [top, bottom, left, right]. 382 | */ 383 | @discardableResult open class func addMarginZero( 384 | _ item: UIView, 385 | toItem: UIView, 386 | relatedBy: NSLayoutRelation = .equal, 387 | multiplier: CGFloat = 1.0 388 | ) -> [NSLayoutConstraint] 389 | { 390 | return SimpleLayout.addMargin( 391 | item, 392 | toItem: toItem, 393 | constant: 0.0, 394 | relatedBy: relatedBy, 395 | multiplier: multiplier 396 | ) 397 | } 398 | 399 | /** 400 | Add a horizontal align (X) constraint to be toItem or item and activate. 401 | 402 | - returns: The constraint. 403 | */ 404 | @discardableResult open class func addCenterX( 405 | _ item: UIView, 406 | toItem: UIView, 407 | constant: CGFloat = 0.0, 408 | relatedBy: NSLayoutRelation = .equal, 409 | multiplier: CGFloat = 1.0 410 | ) -> NSLayoutConstraint 411 | { 412 | return SimpleLayout.addConstraint( 413 | item, 414 | attribute: .centerX, 415 | toItem: toItem, 416 | attribute: .centerX, 417 | constant: constant, 418 | relatedBy: relatedBy, 419 | multiplier: multiplier 420 | ) 421 | } 422 | 423 | /** 424 | Add a vertical align (Y) constraint to be toItem or item and activate. 425 | 426 | - returns: The constraint. 427 | */ 428 | @discardableResult open class func addCenterY( 429 | _ item: UIView, 430 | toItem: UIView, 431 | constant: CGFloat = 0.0, 432 | relatedBy: NSLayoutRelation = .equal, 433 | multiplier: CGFloat = 1.0 434 | ) -> NSLayoutConstraint 435 | { 436 | return SimpleLayout.addConstraint( 437 | item, 438 | attribute: .centerY, 439 | toItem: toItem, 440 | attribute: .centerY, 441 | constant: constant, 442 | relatedBy: relatedBy, 443 | multiplier: multiplier 444 | ) 445 | } 446 | 447 | /** 448 | Add horizontal and vertical align (X and Y) to be toItem or item and activate. 449 | 450 | - returns: The constraints [x, y]. 451 | */ 452 | @discardableResult open class func addCenter( 453 | _ item: UIView, 454 | toItem: UIView, 455 | constant: CGFloat = 0.0, 456 | relatedBy: NSLayoutRelation = .equal, 457 | multiplier: CGFloat = 1.0 458 | ) -> [NSLayoutConstraint] 459 | { 460 | let constraintX = SimpleLayout.addCenterX( 461 | item, 462 | toItem: toItem, 463 | constant: constant, 464 | relatedBy: relatedBy, 465 | multiplier: multiplier 466 | ) 467 | let constraintY = SimpleLayout.addCenterY( 468 | item, 469 | toItem: toItem, 470 | constant: constant, 471 | relatedBy: relatedBy, 472 | multiplier: multiplier 473 | ) 474 | 475 | return [constraintX, constraintY] 476 | } 477 | 478 | /** 479 | Add a width constraint to be toItem or item and activate. 480 | 481 | - returns: The constraint. 482 | */ 483 | @discardableResult open class func addWidth( 484 | _ item: UIView, 485 | constant: CGFloat = 0.0, 486 | toItem: UIView? = nil, 487 | relatedBy: NSLayoutRelation = .equal, 488 | multiplier: CGFloat = 1.0 489 | ) -> NSLayoutConstraint 490 | { 491 | return SimpleLayout.addConstraint( 492 | item, 493 | attribute: .width, 494 | toItem: toItem, 495 | attribute: .width, 496 | constant: constant, 497 | relatedBy: relatedBy, 498 | multiplier: multiplier 499 | ) 500 | } 501 | 502 | /** 503 | Add a height constraint to be toItem or item and activate. 504 | 505 | - returns: The constraint. 506 | */ 507 | @discardableResult open class func addHeight( 508 | _ item: UIView, 509 | constant: CGFloat = 0.0, 510 | toItem: UIView? = nil, 511 | relatedBy: NSLayoutRelation = .equal, 512 | multiplier: CGFloat = 1.0 513 | ) -> NSLayoutConstraint 514 | { 515 | return SimpleLayout.addConstraint( 516 | item, 517 | attribute: .height, 518 | toItem: toItem, 519 | attribute: .height, 520 | constant: constant, 521 | relatedBy: relatedBy, 522 | multiplier: multiplier 523 | ) 524 | } 525 | 526 | /** 527 | Add width and height constraints to be toItem or item and activate. 528 | 529 | - returns: The constraints [width, height]. 530 | */ 531 | @discardableResult open class func addSize( 532 | _ item: UIView, 533 | constant: CGFloat = 0.0, 534 | toItem: UIView? = nil, 535 | relatedBy: NSLayoutRelation = .equal, 536 | multiplier: CGFloat = 1.0 537 | ) -> [NSLayoutConstraint] 538 | { 539 | let constraintWidth = SimpleLayout.addWidth( 540 | item, 541 | constant: constant, 542 | toItem: toItem, 543 | relatedBy: relatedBy, 544 | multiplier: multiplier 545 | ) 546 | let constraintHeight = SimpleLayout.addHeight( 547 | item, 548 | constant: constant, 549 | toItem: toItem, 550 | relatedBy: relatedBy, 551 | multiplier: multiplier 552 | ) 553 | 554 | return [constraintWidth, constraintHeight] 555 | } 556 | 557 | } 558 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/SimpleLayout/Sources/UIView+SimpleLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+SimpleLayout.swift 3 | // SimpleLayout 4 | // 5 | // Created by Nicolas Molina on 9/22/16. 6 | // Copyright © 2016 SimpleLayout. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension UIView 12 | { 13 | 14 | /** 15 | Add a constraint to be toItem or item and activate. 16 | 17 | - returns: The constraint. 18 | */ 19 | @discardableResult public func sl_addConstraint( 20 | _ attribute: NSLayoutAttribute, 21 | toItem: UIView? = nil, 22 | attribute toAttribute: NSLayoutAttribute, 23 | constant: CGFloat = 0.0, 24 | relatedBy: NSLayoutRelation = .equal, 25 | multiplier: CGFloat = 1.0 26 | ) -> NSLayoutConstraint 27 | { 28 | return SimpleLayout.addConstraint( 29 | self, 30 | attribute: attribute, 31 | toItem: toItem, 32 | attribute: toAttribute, 33 | constant: constant, 34 | relatedBy: relatedBy, 35 | multiplier: multiplier 36 | ) 37 | } 38 | 39 | /** 40 | Add a margin top constraint to be toItem or item and activate. 41 | 42 | - returns: The constraint. 43 | */ 44 | @discardableResult public func sl_addMarginTop( 45 | _ toItem: UIView, 46 | attribute: NSLayoutAttribute = .top, 47 | constant: CGFloat = 0.0, 48 | relatedBy: NSLayoutRelation = .equal, 49 | multiplier: CGFloat = 1.0 50 | ) -> NSLayoutConstraint 51 | { 52 | return self.sl_addConstraint( 53 | .top, 54 | toItem: toItem, 55 | attribute: attribute, 56 | constant: constant, 57 | relatedBy: relatedBy, 58 | multiplier: multiplier 59 | ) 60 | } 61 | 62 | /** 63 | Add a margin top 0 (zero) constraint to be toItem or item and activate. 64 | 65 | - returns: The constraint. 66 | */ 67 | @discardableResult public func sl_addMarginTopZero( 68 | _ toItem: UIView, 69 | attribute: NSLayoutAttribute = .top, 70 | relatedBy: NSLayoutRelation = .equal, 71 | multiplier: CGFloat = 1.0 72 | ) -> NSLayoutConstraint 73 | { 74 | return self.sl_addMarginTop( 75 | toItem, 76 | attribute: attribute, 77 | constant: 0.0, 78 | relatedBy: relatedBy, 79 | multiplier: multiplier 80 | ) 81 | } 82 | 83 | /** 84 | Add a margin bottom constraint to be toItem or item and activate. 85 | 86 | - returns: The constraint. 87 | */ 88 | @discardableResult public func sl_addMarginBottom( 89 | _ toItem: UIView, 90 | attribute: NSLayoutAttribute = .bottom, 91 | constant: CGFloat = 0.0, 92 | relatedBy: NSLayoutRelation = .equal, 93 | multiplier: CGFloat = 1.0 94 | ) -> NSLayoutConstraint 95 | { 96 | return self.sl_addConstraint( 97 | .bottom, 98 | toItem: toItem, 99 | attribute: attribute, 100 | constant: -constant, 101 | relatedBy: relatedBy, 102 | multiplier: multiplier 103 | ) 104 | } 105 | 106 | /** 107 | Add a margin bottom 0 (zero) constraint to be toItem or item and activate. 108 | 109 | - returns: The constraint. 110 | */ 111 | @discardableResult public func sl_addMarginBottomZero( 112 | _ toItem: UIView, 113 | attribute: NSLayoutAttribute = .bottom, 114 | relatedBy: NSLayoutRelation = .equal, 115 | multiplier: CGFloat = 1.0 116 | ) -> NSLayoutConstraint 117 | { 118 | return self.sl_addMarginBottom( 119 | toItem, 120 | attribute: attribute, 121 | constant: 0.0, 122 | relatedBy: relatedBy, 123 | multiplier: multiplier 124 | ) 125 | } 126 | 127 | /** 128 | Add a margin left constraint to be toItem or item and activate. 129 | 130 | - returns: The constraint. 131 | */ 132 | @discardableResult public func sl_addMarginLeft( 133 | _ toItem: UIView, 134 | attribute: NSLayoutAttribute = .left, 135 | constant: CGFloat = 0.0, 136 | relatedBy: NSLayoutRelation = .equal, 137 | multiplier: CGFloat = 1.0 138 | ) -> NSLayoutConstraint 139 | { 140 | return self.sl_addConstraint( 141 | .left, 142 | toItem: toItem, 143 | attribute: attribute, 144 | constant: constant, 145 | relatedBy: relatedBy, 146 | multiplier: multiplier 147 | ) 148 | } 149 | 150 | /** 151 | Add a margin left 0 (zero) constraint to be toItem or item and activate. 152 | 153 | - returns: The constraint. 154 | */ 155 | @discardableResult public func sl_addMarginLeftZero( 156 | _ toItem: UIView, 157 | attribute: NSLayoutAttribute = .left, 158 | relatedBy: NSLayoutRelation = .equal, 159 | multiplier: CGFloat = 1.0 160 | ) -> NSLayoutConstraint 161 | { 162 | return self.sl_addMarginLeft( 163 | toItem, 164 | attribute: attribute, 165 | constant: 0.0, 166 | relatedBy: relatedBy, 167 | multiplier: multiplier 168 | ) 169 | } 170 | 171 | /** 172 | Add a margin right constraint to be toItem or item and activate. 173 | 174 | - returns: The constraint. 175 | */ 176 | @discardableResult public func sl_addMarginRight( 177 | _ toItem: UIView, 178 | attribute: NSLayoutAttribute = .right, 179 | constant: CGFloat = 0.0, 180 | relatedBy: NSLayoutRelation = .equal, 181 | multiplier: CGFloat = 1.0 182 | ) -> NSLayoutConstraint 183 | { 184 | return self.sl_addConstraint( 185 | .right, 186 | toItem: toItem, 187 | attribute: attribute, 188 | constant: -constant, 189 | relatedBy: relatedBy, 190 | multiplier: multiplier 191 | ) 192 | } 193 | 194 | /** 195 | Add a margin right 0 (zero) constraint to be toItem or item and activate. 196 | 197 | - returns: The constraint. 198 | */ 199 | @discardableResult public func sl_addMarginRightZero( 200 | _ toItem: UIView, 201 | attribute: NSLayoutAttribute = .right, 202 | relatedBy: NSLayoutRelation = .equal, 203 | multiplier: CGFloat = 1.0 204 | ) -> NSLayoutConstraint 205 | { 206 | return self.sl_addMarginRight( 207 | toItem, 208 | attribute: attribute, 209 | constant: 0.0, 210 | relatedBy: relatedBy, 211 | multiplier: multiplier 212 | ) 213 | } 214 | 215 | /** 216 | Add a margin leading constraint to be toItem or item and activate. 217 | 218 | - returns: The constraint. 219 | */ 220 | @discardableResult public func sl_addMarginLeading( 221 | _ toItem: UIView, 222 | attribute: NSLayoutAttribute = .leading, 223 | constant: CGFloat = 0.0, 224 | relatedBy: NSLayoutRelation = .equal, 225 | multiplier: CGFloat = 1.0 226 | ) -> NSLayoutConstraint 227 | { 228 | return self.sl_addConstraint( 229 | .leading, 230 | toItem: toItem, 231 | attribute: attribute, 232 | constant: constant, 233 | relatedBy: relatedBy, 234 | multiplier: multiplier 235 | ) 236 | } 237 | 238 | /** 239 | Add a margin leading 0 (zero) constraint to be toItem or item and activate. 240 | 241 | - returns: The constraint. 242 | */ 243 | @discardableResult public func sl_addMarginLeadingZero( 244 | _ toItem: UIView, 245 | attribute: NSLayoutAttribute = .leading, 246 | relatedBy: NSLayoutRelation = .equal, 247 | multiplier: CGFloat = 1.0 248 | ) -> NSLayoutConstraint 249 | { 250 | return self.sl_addMarginLeading( 251 | toItem, 252 | attribute: attribute, 253 | constant: 0.0, 254 | relatedBy: relatedBy, 255 | multiplier: multiplier 256 | ) 257 | } 258 | 259 | /** 260 | Add a margin trailing constraint to be toItem or item and activate. 261 | 262 | - returns: The constraint. 263 | */ 264 | @discardableResult public func sl_addMarginTrailing( 265 | _ toItem: UIView, 266 | attribute: NSLayoutAttribute = .trailing, 267 | constant: CGFloat = 0.0, 268 | relatedBy: NSLayoutRelation = .equal, 269 | multiplier: CGFloat = 1.0 270 | ) -> NSLayoutConstraint 271 | { 272 | return self.sl_addConstraint( 273 | .trailing, 274 | toItem: toItem, 275 | attribute: attribute, 276 | constant: -constant, 277 | relatedBy: relatedBy, 278 | multiplier: multiplier 279 | ) 280 | } 281 | 282 | /** 283 | Add a margin trailing 0 (zero) constraint to be toItem or item and activate. 284 | 285 | - returns: The constraint. 286 | */ 287 | @discardableResult public func sl_addMarginTrailingZero( 288 | _ toItem: UIView, 289 | attribute: NSLayoutAttribute = .trailing, 290 | relatedBy: NSLayoutRelation = .equal, 291 | multiplier: CGFloat = 1.0 292 | ) -> NSLayoutConstraint 293 | { 294 | return self.sl_addMarginTrailing( 295 | toItem, 296 | attribute: attribute, 297 | constant: 0.0, 298 | relatedBy: relatedBy, 299 | multiplier: multiplier 300 | ) 301 | } 302 | 303 | /** 304 | Add margins top, bottom, left and right to be toItem or item and activate. 305 | 306 | - returns: The constraints [top, bottom, left, right]. 307 | */ 308 | @discardableResult public func sl_addMargin( 309 | _ toItem: UIView, 310 | constant: CGFloat = 0.0, 311 | relatedBy: NSLayoutRelation = .equal, 312 | multiplier: CGFloat = 1.0 313 | ) -> [NSLayoutConstraint] 314 | { 315 | return SimpleLayout.addMargin( 316 | self, 317 | toItem: toItem, 318 | constant: constant, 319 | relatedBy: relatedBy, 320 | multiplier: multiplier 321 | ) 322 | } 323 | 324 | /** 325 | Add margins top, bottom, left and right in 0 (zero) to be toItem or item and activate. 326 | 327 | - returns: The constraints [top, bottom, left, right]. 328 | */ 329 | @discardableResult public func sl_addMarginZero( 330 | _ toItem: UIView, 331 | relatedBy: NSLayoutRelation = .equal, 332 | multiplier: CGFloat = 1.0 333 | ) -> [NSLayoutConstraint] 334 | { 335 | return self.sl_addMargin( 336 | toItem, 337 | constant: 0.0, 338 | relatedBy: relatedBy, 339 | multiplier: multiplier 340 | ) 341 | } 342 | 343 | /** 344 | Add a horizontal align (X) constraint to be toItem or item and activate. 345 | 346 | - returns: The constraint. 347 | */ 348 | @discardableResult public func sl_addCenterX( 349 | _ toItem: UIView, 350 | constant: CGFloat = 0.0, 351 | relatedBy: NSLayoutRelation = .equal, 352 | multiplier: CGFloat = 1.0 353 | ) -> NSLayoutConstraint 354 | { 355 | return self.sl_addConstraint( 356 | .centerX, 357 | toItem: toItem, 358 | attribute: .centerX, 359 | constant: constant, 360 | relatedBy: relatedBy, 361 | multiplier: multiplier 362 | ) 363 | } 364 | 365 | /** 366 | Add a vertical align (Y) constraint to be toItem or item and activate. 367 | 368 | - returns: The constraint. 369 | */ 370 | @discardableResult public func sl_addCenterY( 371 | _ toItem: UIView, 372 | constant: CGFloat = 0.0, 373 | relatedBy: NSLayoutRelation = .equal, 374 | multiplier: CGFloat = 1.0 375 | ) -> NSLayoutConstraint 376 | { 377 | return self.sl_addConstraint( 378 | .centerY, 379 | toItem: toItem, 380 | attribute: .centerY, 381 | constant: constant, 382 | relatedBy: relatedBy, 383 | multiplier: multiplier 384 | ) 385 | } 386 | 387 | /** 388 | Add horizontal and vertical align (X and Y) to be toItem or item and activate. 389 | 390 | - returns: The constraints [x, y]. 391 | */ 392 | @discardableResult public func sl_addCenter( 393 | _ toItem: UIView, 394 | constant: CGFloat = 0.0, 395 | relatedBy: NSLayoutRelation = .equal, 396 | multiplier: CGFloat = 1.0 397 | ) -> [NSLayoutConstraint] 398 | { 399 | return SimpleLayout.addCenter( 400 | self, 401 | toItem: toItem, 402 | constant: constant, 403 | relatedBy: relatedBy, 404 | multiplier: multiplier 405 | ) 406 | } 407 | 408 | /** 409 | Add a width constraint to be toItem or item and activate. 410 | 411 | - returns: The constraint. 412 | */ 413 | @discardableResult public func sl_addWidth( 414 | _ constant: CGFloat = 0.0, 415 | toItem: UIView? = nil, 416 | relatedBy: NSLayoutRelation = .equal, 417 | multiplier: CGFloat = 1.0 418 | ) -> NSLayoutConstraint 419 | { 420 | return self.sl_addConstraint( 421 | .width, 422 | toItem: toItem, 423 | attribute: .width, 424 | constant: constant, 425 | relatedBy: relatedBy, 426 | multiplier: multiplier 427 | ) 428 | } 429 | 430 | /** 431 | Add a height constraint to be toItem or item and activate. 432 | 433 | - returns: The constraint. 434 | */ 435 | @discardableResult public func sl_addHeight( 436 | _ constant: CGFloat = 0.0, 437 | toItem: UIView? = nil, 438 | relatedBy: NSLayoutRelation = .equal, 439 | multiplier: CGFloat = 1.0 440 | ) -> NSLayoutConstraint 441 | { 442 | return self.sl_addConstraint( 443 | .height, 444 | toItem: toItem, 445 | attribute: .height, 446 | constant: constant, 447 | relatedBy: relatedBy, 448 | multiplier: multiplier 449 | ) 450 | } 451 | 452 | /** 453 | Add width and height constraints to be toItem or item and activate. 454 | 455 | - returns: The constraints [width, height]. 456 | */ 457 | @discardableResult public func sl_addSize( 458 | _ constant: CGFloat = 0.0, 459 | toItem: UIView? = nil, 460 | relatedBy: NSLayoutRelation = .equal, 461 | multiplier: CGFloat = 1.0 462 | ) -> [NSLayoutConstraint] 463 | { 464 | return SimpleLayout.addSize( 465 | self, 466 | constant: constant, 467 | toItem: toItem, 468 | relatedBy: relatedBy, 469 | multiplier: multiplier 470 | ) 471 | } 472 | 473 | } 474 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SimpleLayout 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2014 ecerney 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | ## SimpleSession 29 | 30 | The MIT License (MIT) 31 | 32 | Copyright (c) 2014 ecerney 33 | 34 | Permission is hereby granted, free of charge, to any person obtaining a copy 35 | of this software and associated documentation files (the "Software"), to deal 36 | in the Software without restriction, including without limitation the rights 37 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 38 | copies of the Software, and to permit persons to whom the Software is 39 | furnished to do so, subject to the following conditions: 40 | 41 | The above copyright notice and this permission notice shall be included in all 42 | copies or substantial portions of the Software. 43 | 44 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 45 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 46 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 47 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 48 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 49 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 50 | SOFTWARE. 51 | Generated by CocoaPods - https://cocoapods.org 52 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2014 ecerney 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | License 39 | MIT 40 | Title 41 | SimpleLayout 42 | Type 43 | PSGroupSpecifier 44 | 45 | 46 | FooterText 47 | The MIT License (MIT) 48 | 49 | Copyright (c) 2014 ecerney 50 | 51 | Permission is hereby granted, free of charge, to any person obtaining a copy 52 | of this software and associated documentation files (the "Software"), to deal 53 | in the Software without restriction, including without limitation the rights 54 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 55 | copies of the Software, and to permit persons to whom the Software is 56 | furnished to do so, subject to the following conditions: 57 | 58 | The above copyright notice and this permission notice shall be included in all 59 | copies or substantial portions of the Software. 60 | 61 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 62 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 63 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 64 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 65 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 66 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 67 | SOFTWARE. 68 | License 69 | MIT 70 | Title 71 | SimpleSession 72 | Type 73 | PSGroupSpecifier 74 | 75 | 76 | FooterText 77 | Generated by CocoaPods - https://cocoapods.org 78 | Title 79 | 80 | Type 81 | PSGroupSpecifier 82 | 83 | 84 | StringsTable 85 | Acknowledgements 86 | Title 87 | Acknowledgements 88 | 89 | 90 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SimpleSessionDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SimpleSessionDemo 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/SimpleLayout/SimpleLayout.framework" 93 | install_framework "$BUILT_PRODUCTS_DIR/SimpleSession/SimpleSession.framework" 94 | fi 95 | if [[ "$CONFIGURATION" == "Release" ]]; then 96 | install_framework "$BUILT_PRODUCTS_DIR/SimpleLayout/SimpleLayout.framework" 97 | install_framework "$BUILT_PRODUCTS_DIR/SimpleSession/SimpleSession.framework" 98 | fi 99 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 100 | wait 101 | fi 102 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_SimpleSessionDemoVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SimpleSessionDemoVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SimpleLayout" "$PODS_CONFIGURATION_BUILD_DIR/SimpleSession" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SimpleLayout/SimpleLayout.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SimpleSession/SimpleSession.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "SimpleLayout" -framework "SimpleSession" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SimpleSessionDemo { 2 | umbrella header "Pods-SimpleSessionDemo-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SimpleLayout" "$PODS_CONFIGURATION_BUILD_DIR/SimpleSession" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SimpleLayout/SimpleLayout.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SimpleSession/SimpleSession.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "SimpleLayout" -framework "SimpleSession" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleLayout/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.2.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleLayout/SimpleLayout-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SimpleLayout : NSObject 3 | @end 4 | @implementation PodsDummy_SimpleLayout 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleLayout/SimpleLayout-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleLayout/SimpleLayout-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SimpleLayoutVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SimpleLayoutVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleLayout/SimpleLayout.modulemap: -------------------------------------------------------------------------------- 1 | framework module SimpleLayout { 2 | umbrella header "SimpleLayout-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleLayout/SimpleLayout.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SimpleLayout 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SimpleLayout 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleSession/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleSession/SimpleSession-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SimpleSession : NSObject 3 | @end 4 | @implementation PodsDummy_SimpleSession 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleSession/SimpleSession-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleSession/SimpleSession-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SimpleSessionVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SimpleSessionVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleSession/SimpleSession.modulemap: -------------------------------------------------------------------------------- 1 | framework module SimpleSession { 2 | umbrella header "SimpleSession-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/Pods/Target Support Files/SimpleSession/SimpleSession.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SimpleSession 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 756A96DB8F680C45424EBEBA /* Pods_SimpleSessionDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C14B9F023DF3F62B2BE304A /* Pods_SimpleSessionDemo.framework */; }; 11 | 9E1127851DA596EA003C1A59 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E1127841DA596EA003C1A59 /* AppDelegate.swift */; }; 12 | 9E1127871DA596EA003C1A59 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E1127861DA596EA003C1A59 /* FirstViewController.swift */; }; 13 | 9E1127891DA596EA003C1A59 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E1127881DA596EA003C1A59 /* SecondViewController.swift */; }; 14 | 9E11278C1DA596EA003C1A59 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9E11278A1DA596EA003C1A59 /* Main.storyboard */; }; 15 | 9E11278E1DA596EA003C1A59 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9E11278D1DA596EA003C1A59 /* Assets.xcassets */; }; 16 | 9E1127911DA596EA003C1A59 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9E11278F1DA596EA003C1A59 /* LaunchScreen.storyboard */; }; 17 | 9E1127991DA597E5003C1A59 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E1127981DA597E5003C1A59 /* BaseViewController.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 1CE5871270E95DD2572FC6D1 /* Pods-SimpleSessionDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleSessionDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo.release.xcconfig"; sourceTree = ""; }; 22 | 3665C35B956EBB5762C25A70 /* Pods-SimpleSessionDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleSessionDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo.debug.xcconfig"; sourceTree = ""; }; 23 | 6C14B9F023DF3F62B2BE304A /* Pods_SimpleSessionDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SimpleSessionDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 9E1127811DA596EA003C1A59 /* SimpleSessionDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleSessionDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | 9E1127841DA596EA003C1A59 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 26 | 9E1127861DA596EA003C1A59 /* FirstViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = ""; }; 27 | 9E1127881DA596EA003C1A59 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; 28 | 9E11278B1DA596EA003C1A59 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 29 | 9E11278D1DA596EA003C1A59 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 30 | 9E1127901DA596EA003C1A59 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 31 | 9E1127921DA596EA003C1A59 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 9E1127981DA597E5003C1A59 /* BaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | 9E11277E1DA596EA003C1A59 /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | 756A96DB8F680C45424EBEBA /* Pods_SimpleSessionDemo.framework in Frameworks */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | 30DA2CBE6DE7CDA2EF92D2A2 /* Pods */ = { 48 | isa = PBXGroup; 49 | children = ( 50 | 3665C35B956EBB5762C25A70 /* Pods-SimpleSessionDemo.debug.xcconfig */, 51 | 1CE5871270E95DD2572FC6D1 /* Pods-SimpleSessionDemo.release.xcconfig */, 52 | ); 53 | name = Pods; 54 | sourceTree = ""; 55 | }; 56 | 71CB1CC78F37E32AAC653D4A /* Frameworks */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 6C14B9F023DF3F62B2BE304A /* Pods_SimpleSessionDemo.framework */, 60 | ); 61 | name = Frameworks; 62 | sourceTree = ""; 63 | }; 64 | 9E1127781DA596EA003C1A59 = { 65 | isa = PBXGroup; 66 | children = ( 67 | 9E1127831DA596EA003C1A59 /* SimpleSessionDemo */, 68 | 9E1127821DA596EA003C1A59 /* Products */, 69 | 30DA2CBE6DE7CDA2EF92D2A2 /* Pods */, 70 | 71CB1CC78F37E32AAC653D4A /* Frameworks */, 71 | ); 72 | sourceTree = ""; 73 | }; 74 | 9E1127821DA596EA003C1A59 /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 9E1127811DA596EA003C1A59 /* SimpleSessionDemo.app */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | 9E1127831DA596EA003C1A59 /* SimpleSessionDemo */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9E1127841DA596EA003C1A59 /* AppDelegate.swift */, 86 | 9E1127981DA597E5003C1A59 /* BaseViewController.swift */, 87 | 9E1127861DA596EA003C1A59 /* FirstViewController.swift */, 88 | 9E1127881DA596EA003C1A59 /* SecondViewController.swift */, 89 | 9E11278A1DA596EA003C1A59 /* Main.storyboard */, 90 | 9E11278D1DA596EA003C1A59 /* Assets.xcassets */, 91 | 9E11278F1DA596EA003C1A59 /* LaunchScreen.storyboard */, 92 | 9E1127921DA596EA003C1A59 /* Info.plist */, 93 | ); 94 | path = SimpleSessionDemo; 95 | sourceTree = ""; 96 | }; 97 | /* End PBXGroup section */ 98 | 99 | /* Begin PBXNativeTarget section */ 100 | 9E1127801DA596EA003C1A59 /* SimpleSessionDemo */ = { 101 | isa = PBXNativeTarget; 102 | buildConfigurationList = 9E1127951DA596EA003C1A59 /* Build configuration list for PBXNativeTarget "SimpleSessionDemo" */; 103 | buildPhases = ( 104 | 88412E5D2C666B6763E2030F /* [CP] Check Pods Manifest.lock */, 105 | 9E11277D1DA596EA003C1A59 /* Sources */, 106 | 9E11277E1DA596EA003C1A59 /* Frameworks */, 107 | 9E11277F1DA596EA003C1A59 /* Resources */, 108 | 8F32AD4B2B77E08EFDDCF9D3 /* [CP] Embed Pods Frameworks */, 109 | 1A5AF782F1E18A82FC513F10 /* [CP] Copy Pods Resources */, 110 | ); 111 | buildRules = ( 112 | ); 113 | dependencies = ( 114 | ); 115 | name = SimpleSessionDemo; 116 | productName = SimpleSessionDemo; 117 | productReference = 9E1127811DA596EA003C1A59 /* SimpleSessionDemo.app */; 118 | productType = "com.apple.product-type.application"; 119 | }; 120 | /* End PBXNativeTarget section */ 121 | 122 | /* Begin PBXProject section */ 123 | 9E1127791DA596EA003C1A59 /* Project object */ = { 124 | isa = PBXProject; 125 | attributes = { 126 | LastSwiftUpdateCheck = 0730; 127 | LastUpgradeCheck = 0810; 128 | ORGANIZATIONNAME = "Nicolas Molina"; 129 | TargetAttributes = { 130 | 9E1127801DA596EA003C1A59 = { 131 | CreatedOnToolsVersion = 7.3.1; 132 | DevelopmentTeam = BXZBCZCX48; 133 | LastSwiftMigration = 0810; 134 | }; 135 | }; 136 | }; 137 | buildConfigurationList = 9E11277C1DA596EA003C1A59 /* Build configuration list for PBXProject "SimpleSessionDemo" */; 138 | compatibilityVersion = "Xcode 3.2"; 139 | developmentRegion = English; 140 | hasScannedForEncodings = 0; 141 | knownRegions = ( 142 | en, 143 | Base, 144 | ); 145 | mainGroup = 9E1127781DA596EA003C1A59; 146 | productRefGroup = 9E1127821DA596EA003C1A59 /* Products */; 147 | projectDirPath = ""; 148 | projectRoot = ""; 149 | targets = ( 150 | 9E1127801DA596EA003C1A59 /* SimpleSessionDemo */, 151 | ); 152 | }; 153 | /* End PBXProject section */ 154 | 155 | /* Begin PBXResourcesBuildPhase section */ 156 | 9E11277F1DA596EA003C1A59 /* Resources */ = { 157 | isa = PBXResourcesBuildPhase; 158 | buildActionMask = 2147483647; 159 | files = ( 160 | 9E1127911DA596EA003C1A59 /* LaunchScreen.storyboard in Resources */, 161 | 9E11278E1DA596EA003C1A59 /* Assets.xcassets in Resources */, 162 | 9E11278C1DA596EA003C1A59 /* Main.storyboard in Resources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXResourcesBuildPhase section */ 167 | 168 | /* Begin PBXShellScriptBuildPhase section */ 169 | 1A5AF782F1E18A82FC513F10 /* [CP] Copy Pods Resources */ = { 170 | isa = PBXShellScriptBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | ); 174 | inputPaths = ( 175 | ); 176 | name = "[CP] Copy Pods Resources"; 177 | outputPaths = ( 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | shellPath = /bin/sh; 181 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-resources.sh\"\n"; 182 | showEnvVarsInLog = 0; 183 | }; 184 | 88412E5D2C666B6763E2030F /* [CP] Check Pods Manifest.lock */ = { 185 | isa = PBXShellScriptBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | ); 189 | inputPaths = ( 190 | ); 191 | name = "[CP] Check Pods Manifest.lock"; 192 | outputPaths = ( 193 | ); 194 | runOnlyForDeploymentPostprocessing = 0; 195 | shellPath = /bin/sh; 196 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 197 | showEnvVarsInLog = 0; 198 | }; 199 | 8F32AD4B2B77E08EFDDCF9D3 /* [CP] Embed Pods Frameworks */ = { 200 | isa = PBXShellScriptBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | ); 204 | inputPaths = ( 205 | ); 206 | name = "[CP] Embed Pods Frameworks"; 207 | outputPaths = ( 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | shellPath = /bin/sh; 211 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SimpleSessionDemo/Pods-SimpleSessionDemo-frameworks.sh\"\n"; 212 | showEnvVarsInLog = 0; 213 | }; 214 | /* End PBXShellScriptBuildPhase section */ 215 | 216 | /* Begin PBXSourcesBuildPhase section */ 217 | 9E11277D1DA596EA003C1A59 /* Sources */ = { 218 | isa = PBXSourcesBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | 9E1127891DA596EA003C1A59 /* SecondViewController.swift in Sources */, 222 | 9E1127991DA597E5003C1A59 /* BaseViewController.swift in Sources */, 223 | 9E1127851DA596EA003C1A59 /* AppDelegate.swift in Sources */, 224 | 9E1127871DA596EA003C1A59 /* FirstViewController.swift in Sources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | /* End PBXSourcesBuildPhase section */ 229 | 230 | /* Begin PBXVariantGroup section */ 231 | 9E11278A1DA596EA003C1A59 /* Main.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 9E11278B1DA596EA003C1A59 /* Base */, 235 | ); 236 | name = Main.storyboard; 237 | sourceTree = ""; 238 | }; 239 | 9E11278F1DA596EA003C1A59 /* LaunchScreen.storyboard */ = { 240 | isa = PBXVariantGroup; 241 | children = ( 242 | 9E1127901DA596EA003C1A59 /* Base */, 243 | ); 244 | name = LaunchScreen.storyboard; 245 | sourceTree = ""; 246 | }; 247 | /* End PBXVariantGroup section */ 248 | 249 | /* Begin XCBuildConfiguration section */ 250 | 9E1127931DA596EA003C1A59 /* Debug */ = { 251 | isa = XCBuildConfiguration; 252 | buildSettings = { 253 | ALWAYS_SEARCH_USER_PATHS = NO; 254 | CLANG_ANALYZER_NONNULL = YES; 255 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 256 | CLANG_CXX_LIBRARY = "libc++"; 257 | CLANG_ENABLE_MODULES = YES; 258 | CLANG_ENABLE_OBJC_ARC = YES; 259 | CLANG_WARN_BOOL_CONVERSION = YES; 260 | CLANG_WARN_CONSTANT_CONVERSION = YES; 261 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 262 | CLANG_WARN_EMPTY_BODY = YES; 263 | CLANG_WARN_ENUM_CONVERSION = YES; 264 | CLANG_WARN_INFINITE_RECURSION = YES; 265 | CLANG_WARN_INT_CONVERSION = YES; 266 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 267 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 268 | CLANG_WARN_UNREACHABLE_CODE = YES; 269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 270 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 271 | COPY_PHASE_STRIP = NO; 272 | DEBUG_INFORMATION_FORMAT = dwarf; 273 | ENABLE_STRICT_OBJC_MSGSEND = YES; 274 | ENABLE_TESTABILITY = YES; 275 | GCC_C_LANGUAGE_STANDARD = gnu99; 276 | GCC_DYNAMIC_NO_PIC = NO; 277 | GCC_NO_COMMON_BLOCKS = YES; 278 | GCC_OPTIMIZATION_LEVEL = 0; 279 | GCC_PREPROCESSOR_DEFINITIONS = ( 280 | "DEBUG=1", 281 | "$(inherited)", 282 | ); 283 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 284 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 285 | GCC_WARN_UNDECLARED_SELECTOR = YES; 286 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 287 | GCC_WARN_UNUSED_FUNCTION = YES; 288 | GCC_WARN_UNUSED_VARIABLE = YES; 289 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 290 | MTL_ENABLE_DEBUG_INFO = YES; 291 | ONLY_ACTIVE_ARCH = YES; 292 | SDKROOT = iphoneos; 293 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 294 | TARGETED_DEVICE_FAMILY = "1,2"; 295 | }; 296 | name = Debug; 297 | }; 298 | 9E1127941DA596EA003C1A59 /* Release */ = { 299 | isa = XCBuildConfiguration; 300 | buildSettings = { 301 | ALWAYS_SEARCH_USER_PATHS = NO; 302 | CLANG_ANALYZER_NONNULL = YES; 303 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 304 | CLANG_CXX_LIBRARY = "libc++"; 305 | CLANG_ENABLE_MODULES = YES; 306 | CLANG_ENABLE_OBJC_ARC = YES; 307 | CLANG_WARN_BOOL_CONVERSION = YES; 308 | CLANG_WARN_CONSTANT_CONVERSION = YES; 309 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 310 | CLANG_WARN_EMPTY_BODY = YES; 311 | CLANG_WARN_ENUM_CONVERSION = YES; 312 | CLANG_WARN_INFINITE_RECURSION = YES; 313 | CLANG_WARN_INT_CONVERSION = YES; 314 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 315 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 316 | CLANG_WARN_UNREACHABLE_CODE = YES; 317 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 318 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 319 | COPY_PHASE_STRIP = NO; 320 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 321 | ENABLE_NS_ASSERTIONS = NO; 322 | ENABLE_STRICT_OBJC_MSGSEND = YES; 323 | GCC_C_LANGUAGE_STANDARD = gnu99; 324 | GCC_NO_COMMON_BLOCKS = YES; 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 327 | GCC_WARN_UNDECLARED_SELECTOR = YES; 328 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 329 | GCC_WARN_UNUSED_FUNCTION = YES; 330 | GCC_WARN_UNUSED_VARIABLE = YES; 331 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 332 | MTL_ENABLE_DEBUG_INFO = NO; 333 | SDKROOT = iphoneos; 334 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 335 | TARGETED_DEVICE_FAMILY = "1,2"; 336 | VALIDATE_PRODUCT = YES; 337 | }; 338 | name = Release; 339 | }; 340 | 9E1127961DA596EA003C1A59 /* Debug */ = { 341 | isa = XCBuildConfiguration; 342 | baseConfigurationReference = 3665C35B956EBB5762C25A70 /* Pods-SimpleSessionDemo.debug.xcconfig */; 343 | buildSettings = { 344 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 345 | DEVELOPMENT_TEAM = BXZBCZCX48; 346 | INFOPLIST_FILE = SimpleSessionDemo/Info.plist; 347 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 348 | PRODUCT_BUNDLE_IDENTIFIER = com.comodinx.SimpleSessionDemo; 349 | PRODUCT_NAME = "$(TARGET_NAME)"; 350 | SWIFT_VERSION = 3.0; 351 | }; 352 | name = Debug; 353 | }; 354 | 9E1127971DA596EA003C1A59 /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | baseConfigurationReference = 1CE5871270E95DD2572FC6D1 /* Pods-SimpleSessionDemo.release.xcconfig */; 357 | buildSettings = { 358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 | DEVELOPMENT_TEAM = BXZBCZCX48; 360 | INFOPLIST_FILE = SimpleSessionDemo/Info.plist; 361 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 362 | PRODUCT_BUNDLE_IDENTIFIER = com.comodinx.SimpleSessionDemo; 363 | PRODUCT_NAME = "$(TARGET_NAME)"; 364 | SWIFT_VERSION = 3.0; 365 | }; 366 | name = Release; 367 | }; 368 | /* End XCBuildConfiguration section */ 369 | 370 | /* Begin XCConfigurationList section */ 371 | 9E11277C1DA596EA003C1A59 /* Build configuration list for PBXProject "SimpleSessionDemo" */ = { 372 | isa = XCConfigurationList; 373 | buildConfigurations = ( 374 | 9E1127931DA596EA003C1A59 /* Debug */, 375 | 9E1127941DA596EA003C1A59 /* Release */, 376 | ); 377 | defaultConfigurationIsVisible = 0; 378 | defaultConfigurationName = Release; 379 | }; 380 | 9E1127951DA596EA003C1A59 /* Build configuration list for PBXNativeTarget "SimpleSessionDemo" */ = { 381 | isa = XCConfigurationList; 382 | buildConfigurations = ( 383 | 9E1127961DA596EA003C1A59 /* Debug */, 384 | 9E1127971DA596EA003C1A59 /* Release */, 385 | ); 386 | defaultConfigurationIsVisible = 0; 387 | defaultConfigurationName = Release; 388 | }; 389 | /* End XCConfigurationList section */ 390 | }; 391 | rootObject = 9E1127791DA596EA003C1A59 /* Project object */; 392 | } 393 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SimpleSessionDemo 4 | // 5 | // Created by Nicolas Molina on 10/5/16. 6 | // Copyright © 2016 Nicolas Molina. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Assets.xcassets/first.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "first.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Assets.xcassets/first.imageset/first.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/comodinx/SimpleSession/f715fa0ff5d86be76dc2b69780c18d7a1c0fbf90/Demo/SimpleSessionDemo/SimpleSessionDemo/Assets.xcassets/first.imageset/first.pdf -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Assets.xcassets/second.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "second.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Assets.xcassets/second.imageset/second.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/comodinx/SimpleSession/f715fa0ff5d86be76dc2b69780c18d7a1c0fbf90/Demo/SimpleSessionDemo/SimpleSessionDemo/Assets.xcassets/second.imageset/second.pdf -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.swift 3 | // SimpleSessionDemo 4 | // 5 | // Created by Nicolas Molina on 9/30/16. 6 | // Copyright © 2016 Nicolas Molina. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SimpleLayout 11 | 12 | class BaseViewController: UIViewController 13 | { 14 | 15 | var lastLabel: UILabel? 16 | 17 | override func viewDidLoad() 18 | { 19 | super.viewDidLoad() 20 | // Do any additional setup after loading the view, typically from a nib. 21 | setup() 22 | } 23 | 24 | override func didReceiveMemoryWarning() 25 | { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | func setup() 31 | { 32 | } 33 | 34 | func log(_ message: String) 35 | { 36 | let label = UILabel() 37 | 38 | label.text = message 39 | label.textColor = .black 40 | label.font = UIFont.systemFont(ofSize: 15.0) 41 | label.numberOfLines = 0 42 | view.addSubview(label) 43 | label.sl_addHeight(21, relatedBy: .greaterThanOrEqual) 44 | label.sl_addMarginLeft(view, constant: 10.0) 45 | label.sl_addMarginRight(view, constant: 10.0) 46 | 47 | if lastLabel == nil { 48 | label.sl_addMarginTop(view, constant: 64.0) 49 | 50 | } else { 51 | label.sl_addMarginTop(lastLabel!, attribute: .bottom, constant: 10.0) 52 | } 53 | 54 | lastLabel = label 55 | } 56 | 57 | func delay(_ delay: Double, closure: @escaping () -> Void) 58 | { 59 | DispatchQueue.main.asyncAfter( 60 | deadline: DispatchTime.now() + Double(Int64(delay * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), 61 | execute: closure 62 | ) 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/FirstViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.swift 3 | // SimpleSessionDemo 4 | // 5 | // Created by Nicolas Molina on 9/30/16. 6 | // Copyright © 2016 Nicolas Molina. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SimpleSession 11 | import SimpleLayout 12 | 13 | class FirstViewController: BaseViewController 14 | { 15 | 16 | override func setup() 17 | { 18 | super.setup() 19 | 20 | log("Default Session") 21 | log("------------------------------") 22 | 23 | // String 24 | SimpleSession.put("string", value: "This is a string") 25 | log("Key: string\nValue: \(SimpleSession.get("string") as! String)") 26 | 27 | // Double 28 | SimpleSession.put("number", value: Double(20.3)) 29 | log("Key: number\nValue: \(SimpleSession.get("number") as! Double)") 30 | 31 | // Array 32 | SimpleSession.put("array", value: ["Hello", "Array"]) 33 | log("Key: array\nValue: \(SimpleSession.get("array") as! [String])") 34 | 35 | // JSON 36 | SimpleSession.put("json", value: ["key": "value"]) 37 | log("Key: json\nValue: \(SimpleSession.get("json") as! [String : String])") 38 | 39 | // NSData 40 | SimpleSession.put("data", value: Data(bytes: UnsafePointer([0xFF, 0xD9] as [UInt8]), count: 2)) 41 | log("Key: data\nValue: \(SimpleSession.get("data") as! Data)") 42 | 43 | log("------------------------------") 44 | 45 | // Remove an object from the Session 46 | SimpleSession.remove("string") 47 | log("Remove Key: string\nValue: \(SimpleSession.get("string") as? String)") 48 | 49 | log("------------------------------") 50 | 51 | // Clean the Session 52 | // SimpleSession.clear() 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 0.2.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarTintParameters 34 | 35 | UINavigationBar 36 | 37 | Style 38 | UIBarStyleDefault 39 | Translucent 40 | 41 | 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UISupportedInterfaceOrientations~ipad 50 | 51 | UIInterfaceOrientationPortrait 52 | UIInterfaceOrientationPortraitUpsideDown 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Demo/SimpleSessionDemo/SimpleSessionDemo/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // SimpleSessionDemo 4 | // 5 | // Created by Nicolas Molina on 9/30/16. 6 | // Copyright © 2016 Nicolas Molina. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SimpleSession 11 | import SimpleLayout 12 | 13 | open class MySession: SimpleSessionProtocol 14 | { 15 | 16 | fileprivate var Session: [String : Any] = [:] 17 | 18 | open func dictionaryRepresentation() -> [String : Any] { 19 | return Session 20 | } 21 | 22 | open func get(_ key: String, defaultValue: Any? = nil) -> Any? { 23 | return Session[key] 24 | } 25 | 26 | open func put(_ key: String, value: Any?) { 27 | Session[key] = value 28 | } 29 | 30 | open func has(_ key: String) -> Bool { 31 | return get(key) != nil 32 | } 33 | 34 | @discardableResult open func remove(_ key: String) -> Any? { 35 | return Session.removeValue(forKey: key) 36 | } 37 | 38 | } 39 | 40 | class SecondViewController: BaseViewController 41 | { 42 | 43 | override func setup() 44 | { 45 | super.setup() 46 | 47 | log("Personalized Session") 48 | 49 | SimpleSession.SESSION_PROTOCOL = MySession() 50 | 51 | log("------------------------------") 52 | 53 | // String 54 | SimpleSession.put("string", value: "This is a string") 55 | log("Key: string\nValue: \(SimpleSession.get("string") as! String)") 56 | 57 | // Double 58 | SimpleSession.put("number", value: Double(20.3)) 59 | log("Key: number\nValue: \(SimpleSession.get("number") as! Double)") 60 | 61 | // Array 62 | SimpleSession.put("array", value: ["Hello", "Array"]) 63 | log("Key: array\nValue: \(SimpleSession.get("array") as! [String])") 64 | 65 | // JSON 66 | SimpleSession.put("json", value: ["key": "value"]) 67 | log("Key: json\nValue: \(SimpleSession.get("json") as! [String : String])") 68 | 69 | // NSData 70 | SimpleSession.put("data", value: Data(bytes: UnsafePointer([0xFF, 0xD9] as [UInt8]), count: 2)) 71 | log("Key: data\nValue: \(SimpleSession.get("data") as! Data)") 72 | 73 | log("------------------------------") 74 | 75 | // Remove an object from the Session 76 | SimpleSession.remove("string") 77 | log("Remove Key: string\nValue: \(SimpleSession.get("string") as? String)") 78 | 79 | log("------------------------------") 80 | 81 | // Clean the Session 82 | // SimpleSession.clear() 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 ecerney 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SimpleSession 2 | ============= 3 | [![Version](http://img.shields.io/cocoapods/v/SimpleSession.svg?style=flat)](http://cocoapods.org/pods/SimpleSession) [![Platform](http://img.shields.io/cocoapods/p/SimpleSession.svg?style=flat)](http://cocoapods.org/pods/SimpleSession) [![License](http://img.shields.io/cocoapods/l/SimpleSession.svg?style=flat)](LICENSE) 4 | 5 | 6 | Índice 7 | ------ 8 | 9 | * [Features][features]. 10 | * [Prerequisites][prerequisites]. 11 | * [Installation][Installation]. 12 | * [How to Use][how_to_use]. 13 | + [Example][how_to_use_example]. 14 | + [API][how_to_use_api]. 15 | + [Default values][how_to_use_api_default_values]. 16 | + [get][how_to_use_api_get]. 17 | + [put][how_to_use_api_put]. 18 | + [has][how_to_use_api_has]. 19 | + [remove][how_to_use_api_remove]. 20 | + [clear][how_to_use_api_clear]. 21 | + [Personalize][how_to_use_personalize]. 22 | * [License][license]. 23 | 24 | 25 | Features 26 | -------- 27 | * Easy to use 28 | * Personalize session protocol 29 | * Default session protocol use user defaults 30 | 31 | 32 | Prerequisites 33 | ------------- 34 | * iOS 8+ 35 | * Xcode 7+ 36 | * Swift 3.0 37 | 38 | 39 | Installation 40 | ------------ 41 | SimpleSession is available through CocoaPods. To install it, simply add the following line to your Podfile: 42 | ``` 43 | pod "SimpleSession" 44 | ``` 45 | 46 | 47 | How to Use 48 | ---------- 49 | Check out the demo project for a concrete example. 50 | 51 | #### Example 52 | ``` swift 53 | // String 54 | SimpleSession.put("string", value: "This is a string") 55 | print("Key: string\nValue: \(SimpleSession.get("string"))") 56 | 57 | // Number 58 | SimpleSession.put("number", value: 20.3) 59 | print("Key: number\nValue: \(SimpleSession.get("number"))") 60 | 61 | // JSON 62 | SimpleSession.put("json", value: ["key": "value"]) 63 | print("Key: json\nValue: \(SimpleSession.get("json"))") 64 | 65 | // NSData 66 | SimpleSession.put("data", value: NSData(bytes: [0xFF, 0xD9] as [UInt8], length: 2)) 67 | print("Key: data\nValue: \(SimpleSession.get("data"))") 68 | 69 | print("------------------------------") 70 | 71 | // Remove an object from the session 72 | SimpleSession.remove("string") 73 | print("Remove Key: string\nValue: \(SimpleSession.get("string"))") 74 | 75 | print("------------------------------") 76 | 77 | // Clean the session 78 | SimpleSession.clear() 79 | ``` 80 | 81 | #### API 82 | 83 | ##### Default values 84 | 85 | Session protocol. Default use user defaults 86 | 87 | ```swift 88 | SimpleSession.SESSION_PROTOCOL: SimpleSessionProtocol = UserDefaultsSession.sharedInstance // Default session use user defaults 89 | 90 | // Configure other session 91 | SimpleSession.SESSION_PROTOCOL = MySession() 92 | ``` 93 | 94 | ##### get 95 | 96 | ```swift 97 | SimpleSession.get(key: String, defaultValue: Any? = nil) 98 | ``` 99 | 100 | Return value for `key` in session. If not has `key` in session return `defaultValue`. 101 | 102 | ```swift 103 | SimpleSession.get("exist.key") // return value for "exist.key" 104 | SimpleSession.get("not.exist.key") // return nil, because "not.exist.key" not exist in session 105 | SimpleSession.get("not.exist.key2", defaultValue: 10) // return 10, because "not.exist.key" not exist in session, but defaultValue is set 106 | ``` 107 | 108 | ##### put 109 | 110 | ```swift 111 | SimpleSession.put(key: String, value: Any?) 112 | ``` 113 | 114 | Put `value` for `key` in session. Expired in `seconds`. 115 | 116 | ```swift 117 | SimpleSession.put("a.key", value: 10) 118 | ``` 119 | 120 | ##### has 121 | 122 | ```swift 123 | SimpleSession.has(key: String) 124 | ``` 125 | 126 | Return `true` if has value for `key` in session, else `false`. 127 | 128 | ```swift 129 | SimpleSession.has("exist.key") // return true 130 | SimpleSession.has("not.exist.key") // return false 131 | ``` 132 | 133 | ##### remove 134 | 135 | ```swift 136 | SimpleSession.remove(key: String) 137 | ``` 138 | 139 | Return value for `key` in session if exist, and remove this key in session. 140 | 141 | ```swift 142 | SimpleSession.remove("exist.key") // return value for "exist.key" 143 | SimpleSession.remove("not.exist.key") // return nil, because "not.exist.key" not exist in session 144 | ``` 145 | 146 | ##### clear 147 | 148 | Return remove all keys in session. 149 | 150 | ```swift 151 | SimpleSession.clear() 152 | ``` 153 | 154 | #### Personalize 155 | 156 | ```swift 157 | import SimpleSession 158 | 159 | open class MySession: SimpleSessionProtocol 160 | { 161 | 162 | fileprivate var session: [String : Any] = [:] 163 | 164 | open func get(_ key: String, defaultValue: Any? = nil) -> Any? { 165 | if let value = session[key] { 166 | return value 167 | } 168 | return defaultValue 169 | } 170 | 171 | open func put(_ key: String, value: Any?) { 172 | session[key] = value 173 | } 174 | 175 | open func has(_ key: String) -> Bool { 176 | return get(key) != nil 177 | } 178 | 179 | @discardableResult open func remove(_ key: String) -> Any? { 180 | return session.removeValueForKey(key) 181 | } 182 | 183 | } 184 | 185 | // Configure in AppDelegate.swift 186 | class AppDelegate: UIResponder, UIApplicationDelegate { 187 | 188 | // ... 189 | 190 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 191 | // Override point for customization after application launch. 192 | 193 | // Configure session 194 | SimpleSession.SESSION_PROTOCOL = MySession() 195 | 196 | return true 197 | } 198 | 199 | // ... 200 | 201 | } 202 | ``` 203 | 204 | 205 | License 206 | ------- 207 | SimpleSession is available under the MIT license. See the LICENSE file for more info. 208 | 209 | 210 | [features]: #features 211 | [screenshots]: #screen-shots 212 | [prerequisites]: #prerequisites 213 | [installation]: #installation 214 | [how_to_use]: #how-to-use 215 | [how_to_use_example]: #example 216 | [how_to_use_api]: #api 217 | [how_to_use_api_default_values]: #default-values 218 | [how_to_use_api_get]: #get 219 | [how_to_use_api_put]: #put 220 | [how_to_use_api_has]: #has 221 | [how_to_use_api_remove]: #remove 222 | [how_to_use_api_clear]: #clear 223 | [how_to_use_api_clean_expirated]: #cleanexpirated 224 | [how_to_use_api_is_expirated]: #isexpirated 225 | [how_to_use_personalize]: #personalize 226 | [license]: #license 227 | -------------------------------------------------------------------------------- /SimpleSession.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "SimpleSession" 4 | s.version = "0.2.2" 5 | s.license = { :type => "MIT", :file => "LICENSE" } 6 | s.summary = "Simple session written in Swift" 7 | s.homepage = "https://github.com/comodinx/SimpleSession" 8 | s.authors = { "Nicolas Molina" => "comodinx@gmail.com" } 9 | s.platform = :ios, "8.0" 10 | s.source = { :git => "https://github.com/comodinx/SimpleSession.git", :tag => s.version } 11 | 12 | s.source_files = "Sources/*.swift" 13 | 14 | end 15 | -------------------------------------------------------------------------------- /Sources/SimpleSession.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleSession.swift 3 | // SimpleSession 4 | // 5 | // Created by Nicolas Molina on 8/8/16. 6 | // Copyright © 2016 SimpleSession. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol SimpleSessionProtocol 12 | { 13 | 14 | func dictionaryRepresentation() -> [String : Any] 15 | func get(_ key: String, defaultValue: Any?) -> Any? 16 | func put(_ key: String, value: Any?) 17 | func has(_ key: String) -> Bool 18 | @discardableResult func remove(_ key: String) -> Any? 19 | 20 | } 21 | 22 | open class SimpleSession: NSObject 23 | { 24 | 25 | fileprivate static let DEFAULT_SESSION_PREFIX = "simple.session." 26 | 27 | open static var SESSION_PROTOCOL: SimpleSessionProtocol = UserDefaultsSession.sharedInstance 28 | 29 | open class func get(_ key: String, defaultValue: Any? = nil) -> Any? 30 | { 31 | return SESSION_PROTOCOL.get(getKey(key), defaultValue: defaultValue) 32 | } 33 | 34 | open class func put(_ key: String, value: Any?) 35 | { 36 | SESSION_PROTOCOL.put(getKey(key), value: value) 37 | } 38 | 39 | open class func has(_ key: String) -> Bool 40 | { 41 | return get(key) != nil 42 | } 43 | 44 | @discardableResult open class func remove(_ key: String) -> Any? 45 | { 46 | return SESSION_PROTOCOL.remove(getKey(key)) 47 | } 48 | 49 | open class func clear() 50 | { 51 | let session = SESSION_PROTOCOL.dictionaryRepresentation() 52 | 53 | for sessionKey in session.keys { 54 | if sessionKey.hasPrefix(DEFAULT_SESSION_PREFIX) { 55 | _ = SESSION_PROTOCOL.remove(sessionKey) 56 | } 57 | } 58 | } 59 | 60 | fileprivate class func getKey(_ key: String) -> String 61 | { 62 | return DEFAULT_SESSION_PREFIX + key 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /Sources/UserDefaultsSession.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserDefaultsSession.swift 3 | // SimpleSession 4 | // 5 | // Created by Nicolas Molina on 8/8/16. 6 | // Copyright © 2016 SimpleSession. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class UserDefaultsSession: SimpleSessionProtocol 12 | { 13 | 14 | static let sharedInstance = UserDefaultsSession() 15 | 16 | open func dictionaryRepresentation() -> [String : Any] 17 | { 18 | return UserDefaults.standard.dictionaryRepresentation() as [String : Any] 19 | } 20 | 21 | open func get(_ key: String, defaultValue: Any? = nil) -> Any? 22 | { 23 | let defaults = UserDefaults.standard 24 | 25 | if let value = defaults.object(forKey: key) { 26 | return value as Any? 27 | } 28 | return defaultValue 29 | } 30 | 31 | open func put(_ key: String, value: Any?) 32 | { 33 | if value == nil { 34 | remove(key) 35 | 36 | } else { 37 | let defaults = UserDefaults.standard 38 | 39 | defaults.set(value, forKey: key) 40 | defaults.synchronize() 41 | } 42 | } 43 | 44 | open func has(_ key: String) -> Bool 45 | { 46 | return get(key) != nil 47 | } 48 | 49 | @discardableResult open func remove(_ key: String) -> Any? 50 | { 51 | let defaults = UserDefaults.standard 52 | let value = get(key) 53 | 54 | defaults.removeObject(forKey: key) 55 | defaults.synchronize() 56 | 57 | return value 58 | } 59 | 60 | } 61 | --------------------------------------------------------------------------------