├── .gitignore ├── Podfile ├── Podfile.lock ├── Pods ├── FormatterKit │ ├── FormatterKit │ │ ├── TTTTimeIntervalFormatter.h │ │ └── TTTTimeIntervalFormatter.m │ ├── LICENSE │ ├── Localizations │ │ ├── ar.lproj │ │ │ └── FormatterKit.strings │ │ ├── ca.lproj │ │ │ └── FormatterKit.strings │ │ ├── cs.lproj │ │ │ └── FormatterKit.strings │ │ ├── da.lproj │ │ │ └── FormatterKit.strings │ │ ├── de.lproj │ │ │ └── FormatterKit.strings │ │ ├── el.lproj │ │ │ └── FormatterKit.strings │ │ ├── en.lproj │ │ │ └── FormatterKit.strings │ │ ├── es.lproj │ │ │ └── FormatterKit.strings │ │ ├── fr.lproj │ │ │ └── FormatterKit.strings │ │ ├── he.lproj │ │ │ └── FormatterKit.strings │ │ ├── hu.lproj │ │ │ └── FormatterKit.strings │ │ ├── id.lproj │ │ │ └── FormatterKit.strings │ │ ├── it.lproj │ │ │ └── FormatterKit.strings │ │ ├── ja.lproj │ │ │ └── FormatterKit.strings │ │ ├── ko.lproj │ │ │ └── FormatterKit.strings │ │ ├── ms.lproj │ │ │ └── FormatterKit.strings │ │ ├── nb.lproj │ │ │ └── FormatterKit.strings │ │ ├── nl.lproj │ │ │ └── FormatterKit.strings │ │ ├── nn.lproj │ │ │ └── FormatterKit.strings │ │ ├── pl.lproj │ │ │ └── FormatterKit.strings │ │ ├── pt.lproj │ │ │ └── FormatterKit.strings │ │ ├── pt_BR.lproj │ │ │ └── FormatterKit.strings │ │ ├── ro.lproj │ │ │ └── FormatterKit.strings │ │ ├── ru.lproj │ │ │ └── FormatterKit.strings │ │ ├── sv.lproj │ │ │ └── FormatterKit.strings │ │ ├── th.lproj │ │ │ └── FormatterKit.strings │ │ ├── tr.lproj │ │ │ └── FormatterKit.strings │ │ ├── uk.lproj │ │ │ └── FormatterKit.strings │ │ ├── vi.lproj │ │ │ └── FormatterKit.strings │ │ ├── zh-Hans.lproj │ │ │ └── FormatterKit.strings │ │ └── zh-Hant.lproj │ │ │ └── FormatterKit.strings │ └── README.md ├── Manifest.lock ├── Masonry │ ├── LICENSE │ ├── Masonry │ │ ├── MASCompositeConstraint.h │ │ ├── MASCompositeConstraint.m │ │ ├── MASConstraint+Private.h │ │ ├── MASConstraint.h │ │ ├── MASConstraint.m │ │ ├── MASConstraintMaker.h │ │ ├── MASConstraintMaker.m │ │ ├── MASLayoutConstraint.h │ │ ├── MASLayoutConstraint.m │ │ ├── MASUtilities.h │ │ ├── MASViewAttribute.h │ │ ├── MASViewAttribute.m │ │ ├── MASViewConstraint.h │ │ ├── MASViewConstraint.m │ │ ├── Masonry.h │ │ ├── NSArray+MASAdditions.h │ │ ├── NSArray+MASAdditions.m │ │ ├── NSArray+MASShorthandAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.m │ │ ├── View+MASAdditions.h │ │ ├── View+MASAdditions.m │ │ ├── View+MASShorthandAdditions.h │ │ ├── ViewController+MASAdditions.h │ │ └── ViewController+MASAdditions.m │ └── README.md ├── Pods.xcodeproj │ └── project.pbxproj └── Target Support Files │ ├── FormatterKit │ ├── FormatterKit-dummy.m │ ├── FormatterKit-prefix.pch │ ├── FormatterKit-umbrella.h │ ├── FormatterKit.modulemap │ ├── FormatterKit.xcconfig │ └── Info.plist │ ├── Masonry │ ├── Info.plist │ ├── Masonry-dummy.m │ ├── Masonry-prefix.pch │ ├── Masonry-umbrella.h │ ├── Masonry.modulemap │ └── Masonry.xcconfig │ ├── Pods-SCFilterControlProvider │ ├── Info.plist │ ├── Pods-SCFilterControlProvider-acknowledgements.markdown │ ├── Pods-SCFilterControlProvider-acknowledgements.plist │ ├── Pods-SCFilterControlProvider-dummy.m │ ├── Pods-SCFilterControlProvider-resources.sh │ ├── Pods-SCFilterControlProvider-umbrella.h │ ├── Pods-SCFilterControlProvider.debug.xcconfig │ ├── Pods-SCFilterControlProvider.modulemap │ └── Pods-SCFilterControlProvider.release.xcconfig │ ├── Pods-SCFilterDataProvider │ ├── Info.plist │ ├── Pods-SCFilterDataProvider-acknowledgements.markdown │ ├── Pods-SCFilterDataProvider-acknowledgements.plist │ ├── Pods-SCFilterDataProvider-dummy.m │ ├── Pods-SCFilterDataProvider-resources.sh │ ├── Pods-SCFilterDataProvider-umbrella.h │ ├── Pods-SCFilterDataProvider.debug.xcconfig │ ├── Pods-SCFilterDataProvider.modulemap │ └── Pods-SCFilterDataProvider.release.xcconfig │ ├── Pods-SelfControlIOS │ ├── Info.plist │ ├── Pods-SelfControlIOS-acknowledgements.markdown │ ├── Pods-SelfControlIOS-acknowledgements.plist │ ├── Pods-SelfControlIOS-dummy.m │ ├── Pods-SelfControlIOS-frameworks.sh │ ├── Pods-SelfControlIOS-resources.sh │ ├── Pods-SelfControlIOS-umbrella.h │ ├── Pods-SelfControlIOS.debug.xcconfig │ ├── Pods-SelfControlIOS.modulemap │ └── Pods-SelfControlIOS.release.xcconfig │ ├── Pods-SelfControlIOSTests │ ├── Info.plist │ ├── Pods-SelfControlIOSTests-acknowledgements.markdown │ ├── Pods-SelfControlIOSTests-acknowledgements.plist │ ├── Pods-SelfControlIOSTests-dummy.m │ ├── Pods-SelfControlIOSTests-frameworks.sh │ ├── Pods-SelfControlIOSTests-resources.sh │ ├── Pods-SelfControlIOSTests-umbrella.h │ ├── Pods-SelfControlIOSTests.debug.xcconfig │ ├── Pods-SelfControlIOSTests.modulemap │ └── Pods-SelfControlIOSTests.release.xcconfig │ └── Pods-SelfControlIOSUITests │ ├── Info.plist │ ├── Pods-SelfControlIOSUITests-acknowledgements.markdown │ ├── Pods-SelfControlIOSUITests-acknowledgements.plist │ ├── Pods-SelfControlIOSUITests-dummy.m │ ├── Pods-SelfControlIOSUITests-frameworks.sh │ ├── Pods-SelfControlIOSUITests-resources.sh │ ├── Pods-SelfControlIOSUITests-umbrella.h │ ├── Pods-SelfControlIOSUITests.debug.xcconfig │ ├── Pods-SelfControlIOSUITests.modulemap │ └── Pods-SelfControlIOSUITests.release.xcconfig ├── README.md ├── SCFilterControlProvider ├── ControlExtension.swift ├── ControlFilterExtension.entitlements ├── Info.plist └── SCFilterControlProvider.entitlements ├── SCFilterDataProvider ├── DataExtension.swift ├── DataFilterExtension.entitlements ├── Info.plist └── SCFilterDataProvider.entitlements ├── SCUtils.h ├── SCUtils.m ├── SelfControlIOS.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── charlie.xcuserdatad │ └── xcschemes │ ├── SelfControlIOS.xcscheme │ └── xcschememanagement.plist ├── SelfControlIOS.xcworkspace └── contents.xcworkspacedata ├── SelfControlIOS ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-57x57@1x.png │ │ ├── Icon-App-57x57@2x.png │ │ ├── Icon-App-60x60@1x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-72x72@1x.png │ │ ├── Icon-App-72x72@2x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Icon-App-76x76@3x.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ ├── Icon-Small-50x50@1x.png │ │ └── Icon-Small-50x50@2x.png │ ├── Contents.json │ ├── first.imageset │ │ ├── Contents.json │ │ └── first.pdf │ ├── logo.imageset │ │ ├── Contents.json │ │ └── logo.png │ └── second.imageset │ │ ├── Contents.json │ │ └── second.pdf ├── Base.lproj │ └── LaunchScreen.storyboard ├── FilterUtilities.swift ├── Info.plist ├── Localizable.strings ├── Localizable.stringsdict ├── SCAlertFactory.h ├── SCAlertFactory.m ├── SCAppDelegate.h ├── SCAppDelegate.m ├── SCAppSelectorDelegate.h ├── SCAppSelectorViewController.h ├── SCAppSelectorViewController.m ├── SCBlockListViewController.h ├── SCBlockListViewController.m ├── SCBlockManager.h ├── SCBlockManager.m ├── SCBlockRule.h ├── SCBlockRule.m ├── SCBlockRuleTableViewCell.h ├── SCBlockRuleTableViewCell.m ├── SCImportSitesViewController.h ├── SCImportSitesViewController.m ├── SCMainViewController.h ├── SCMainViewController.m ├── SCStartViewController.h ├── SCStartViewController.m ├── SCTimeIntervalFormatter.h ├── SCTimeIntervalFormatter.m ├── SCTimerViewController.h ├── SCTimerViewController.m ├── SCUtils+SCViewUtils.h ├── SCUtils+SCViewUtils.m ├── SCUtils.h ├── SCUtils.m ├── SelfControlIOS-Bridging-Header.h ├── SelfControlIOS.entitlements ├── UIButton+SCButtons.h ├── UIButton+SCButtons.m └── main.m ├── SelfControlIOSTests ├── Info.plist └── SelfControlIOSTests.swift └── SelfControlIOSUITests ├── Info.plist └── SelfControlIOSUITests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | tignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 2 | 3 | ## Build generated 4 | build/ 5 | DerivedData/ 6 | 7 | ## Various settings 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata/ 17 | 18 | ## Other 19 | *.moved-aside 20 | *.xccheckout 21 | *.xcscmblueprint 22 | 23 | ## Obj-C/Swift specific 24 | *.hmap 25 | *.ipa 26 | *.dSYM.zip 27 | *.dSYM 28 | 29 | # CocoaPods 30 | # 31 | # We recommend against adding the Pods directory to your .gitignore. However 32 | # you should judge for yourself, the pros and cons are mentioned at: 33 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 34 | # 35 | # Pods/ 36 | 37 | # Carthage 38 | # 39 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 40 | # Carthage/Checkouts 41 | 42 | Carthage/Build 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 50 | 51 | fastlane/report.xml 52 | fastlane/Preview.html 53 | fastlane/screenshots 54 | fastlane/test_output 55 | 56 | # Code Injection 57 | # 58 | # After new code Injection tools there's a generated folder /iOSInjectionProject 59 | # https://github.com/johnno1962/injectionforxcode 60 | 61 | iOSInjectionProject/ 62 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'SCFilterControlProvider' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for SCFilterControlProvider 9 | 10 | end 11 | 12 | target 'SCFilterDataProvider' do 13 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 14 | use_frameworks! 15 | 16 | # Pods for SCFilterDataProvider 17 | 18 | end 19 | 20 | target 'SelfControlIOS' do 21 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 22 | use_frameworks! 23 | 24 | # Pods for SelfControlIOS 25 | pod 'Masonry', '~> 1.0.2' 26 | pod 'FormatterKit/TimeIntervalFormatter', '~> 1.7' 27 | 28 | target 'SelfControlIOSTests' do 29 | inherit! :search_paths 30 | # Pods for testing 31 | end 32 | 33 | target 'SelfControlIOSUITests' do 34 | inherit! :search_paths 35 | # Pods for testing 36 | end 37 | 38 | end 39 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FormatterKit/Resources (1.8.1) 3 | - FormatterKit/TimeIntervalFormatter (1.8.1): 4 | - FormatterKit/Resources 5 | - Masonry (1.0.2) 6 | 7 | DEPENDENCIES: 8 | - FormatterKit/TimeIntervalFormatter (~> 1.7) 9 | - Masonry (~> 1.0.2) 10 | 11 | SPEC CHECKSUMS: 12 | FormatterKit: 11ad17b983200629246a5a466f6f1bfa2df823cb 13 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 14 | 15 | PODFILE CHECKSUM: 0ae327b172afc30412e7770516159c887e1b731c 16 | 17 | COCOAPODS: 1.2.0 18 | -------------------------------------------------------------------------------- /Pods/FormatterKit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011–2015 Mattt Thompson (http://mattt.me/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/ar.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/ar.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/cs.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/cs.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/da.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/da.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/de.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- 1 | /* List separator */ 2 | " " = " "; 3 | 4 | /* List delimiter */ 5 | "," = ","; 6 | 7 | /* Coordinate format */ 8 | "(%@, %@)" = "(%1$@, %2$@)"; 9 | 10 | /* No comment provided by engineer. */ 11 | "&" = "&"; 12 | 13 | /* #{Dimensional Quantity} #{Direction} 14 | #{Distance} #{Unit} 15 | #{Speed} #{Unit} 16 | Deictic Expression Format (#{Time} #{Ago/From Now} */ 17 | "%@ %@" = "%2$@ %1$@"; 18 | 19 | /* Approximate Qualifier Format */ 20 | "about %@" = "%@"; 21 | 22 | /* Past Deictic Expression */ 23 | "ago" = "vor"; 24 | 25 | /* Deictic Expression Format (#{Time} #{Ago/From Now} */ 26 | "Deictic Expression Format String" = "%2$@ %1$@"; 27 | 28 | /* List conjunction */ 29 | "and" = "und"; 30 | 31 | /* Day Unit (Singular) 32 | Day Unit (Singular, Abbreviated) */ 33 | "day" = "T."; 34 | 35 | /* Day Unit (Plural) 36 | Day Unit (Plural, Abbreviated) */ 37 | "days" = "T."; 38 | 39 | /* East Direction Abbreviation */ 40 | "E" = "O"; 41 | 42 | /* East Direction */ 43 | "East" = "Ost"; 44 | 45 | /* Future Deictic Expression */ 46 | "from now" = "in"; 47 | 48 | /* Feet Unit */ 49 | "ft" = "ft"; 50 | 51 | /* Hour Unit (Singular) */ 52 | "hour" = "Stunde"; 53 | 54 | /* Hour Unit (Plural) */ 55 | "hours" = "Stunden"; 56 | 57 | /* Hour Unit (Singular, Abbreviated) */ 58 | "hr" = "Std."; 59 | 60 | /* Hour Unit (Plural, Abbreviated) */ 61 | "hrs" = "Stdn."; 62 | 63 | /* Present Deictic Expression */ 64 | "just now" = "Gerade eben"; 65 | 66 | /* Minute Unit (Singular, Abbreviated) */ 67 | "min" = "Min."; 68 | 69 | /* Minute Unit (Plural, Abbreviated) */ 70 | "mins" = "Min."; 71 | 72 | /* Minute Unit (Singular) */ 73 | "minute" = "Minute"; 74 | 75 | /* Minute Unit (Plural) */ 76 | "minutes" = "Minuten"; 77 | 78 | /* Month Unit (Singular, Abbreviated) */ 79 | "mo" = "M."; 80 | 81 | /* Month Unit (Singular) */ 82 | "month" = "Monat"; 83 | 84 | /* Month Unit (Plural) */ 85 | "months" = "Monaten"; 86 | 87 | /* Month Unit (Plural, Abbreviated) */ 88 | "mos" = "M."; 89 | 90 | /* Miles Per Hour Unit */ 91 | "mph" = "mph"; 92 | 93 | /* North Direction Abbreviation */ 94 | "N" = "N"; 95 | 96 | /* Northeast Direction Abbreviation */ 97 | "NE" = "NO"; 98 | 99 | /* North Direction */ 100 | "North" = "Nord"; 101 | 102 | /* Northeast Direction */ 103 | "Northeast" = "Nordost"; 104 | 105 | /* Northwest Direction */ 106 | "Northwest" = "Nordwest"; 107 | 108 | /* Northwest Direction Abbreviation */ 109 | "NW" = "NW"; 110 | 111 | /* Second Unit (Plural, Abbreviated) 112 | Second Unit (Singular, Abbreviated) */ 113 | "s" = "Sek."; 114 | 115 | /* South Direction Abbreviation */ 116 | "S" = "S"; 117 | 118 | /* Southeast Direction Abbreviation */ 119 | "SE" = "SO"; 120 | 121 | /* Second Unit (Singular) */ 122 | "second" = "Sekunde"; 123 | 124 | /* Second Unit (Plural) */ 125 | "seconds" = "Sekunden"; 126 | 127 | /* South Direction */ 128 | "South" = "Süd"; 129 | 130 | /* Southeast Direction */ 131 | "Southeast" = "Südost"; 132 | 133 | /* Southwest Direction */ 134 | "Southwest" = "Südwest"; 135 | 136 | /* Southwest Direction Abbreviation */ 137 | "SW" = "SW"; 138 | 139 | /* #{Value} #{Unit} */ 140 | "Unit of Information Format String" = "%1$@ %2$@"; 141 | 142 | /* West Direction Abbreviation */ 143 | "W" = "W"; 144 | 145 | /* Week Unit (Singular) */ 146 | "week" = "Woche"; 147 | 148 | /* Week Unit (Plural) */ 149 | "weeks" = "Wochen"; 150 | 151 | /* West Direction */ 152 | "West" = "West"; 153 | 154 | /* Week Unit (Singular, Abbreviated) */ 155 | "wk" = "Wo."; 156 | 157 | /* Week Unit (Plural, Abbreviated) */ 158 | "wks" = "Wo."; 159 | 160 | /* Yard Unit */ 161 | "yds" = "yds"; 162 | 163 | /* Year Unit (Singular) */ 164 | "year" = "Jahr"; 165 | 166 | /* Year Unit (Plural) */ 167 | "years" = "Jahre"; 168 | 169 | /* Year Unit (Singular, Abbreviated) */ 170 | "yr" = "J."; 171 | 172 | /* Year Unit (Plural, Abbreviated) */ 173 | "yrs" = "J."; 174 | 175 | -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/el.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/el.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/en.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/en.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/he.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/he.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/id.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/id.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/it.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/it.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/ja.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/ja.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/ko.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/ko.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/ms.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/ms.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/nb.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings - Norwegian Bokmål 3 | 4 | 5 | Created by André Bonkowski on 07.03.13. 6 | 7 | */ 8 | 9 | "ago" = "siden"; 10 | "just now" = "Akkurat nå"; 11 | "from now" = "fra nå"; 12 | 13 | "%@ %@" = "%1$@ %2$@"; 14 | "about %@" = "om %@"; 15 | 16 | "yr." = "år"; 17 | "yrs." = "år"; 18 | 19 | "mo." = "mnd"; 20 | "mos." = "mnd"; 21 | "wk." = "u"; 22 | "wks." = "u"; 23 | "day" = "d"; 24 | "days" = "d"; 25 | "hr" = "t"; 26 | "hrs." = "t"; 27 | "min." = "m"; 28 | "mins." = "m"; 29 | "s." = "s"; 30 | "s." = "s"; 31 | 32 | "year" = "år"; 33 | "years" = "år"; 34 | "month" = "måned"; 35 | "months" = "måneder"; 36 | "week" = "uke"; 37 | "weeks" = "uker"; 38 | "day" = "dag"; 39 | "days" = "dager"; 40 | "hour" = "time"; 41 | "hours" = "timer"; 42 | "minute" = "minutt"; 43 | "minutes" = "minutter"; 44 | "second" = "sekund"; 45 | "seconds" = "sekunder"; -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/nl.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- 1 | /* List separator */ 2 | " " = " "; 3 | 4 | /* List delimiter */ 5 | "," = ","; 6 | 7 | /* Coordinate format */ 8 | "(%@, %@)" = "(%1$@, %2$@)"; 9 | 10 | /* No comment provided by engineer. */ 11 | "&" = "&"; 12 | 13 | /* #{Dimensional Quantity} #{Direction} 14 | #{Distance} #{Unit} 15 | #{Speed} #{Unit} 16 | Deictic Expression Format (#{Time} #{Ago/From Now} */ 17 | "%@ %@" = "%1$@ %2$@"; 18 | 19 | /* Approximate Qualifier Format */ 20 | "about %@" = "ongeveer %@"; 21 | 22 | /* Past Deictic Expression */ 23 | "ago" = "geleden"; 24 | 25 | /* List conjunction */ 26 | "and" = "en"; 27 | 28 | /* Error converting to NSArray */ 29 | "Couldn’t convert to NSArray" = "Converteren naar NSArray mislukt"; 30 | 31 | /* Day Unit (Singular) 32 | Day Unit (Singular, Abbreviated) */ 33 | "day" = "dag"; 34 | 35 | /* Day Unit (Plural) 36 | Day Unit (Plural, Abbreviated) */ 37 | "days" = "dagen"; 38 | 39 | /* East Direction Abbreviation */ 40 | "E" = "O"; 41 | 42 | /* East Direction */ 43 | "East" = "Oost"; 44 | 45 | /* Future Deictic Expression */ 46 | "from now" = "vanaf nu"; 47 | 48 | /* Feet Unit */ 49 | "ft" = "ft"; 50 | 51 | /* Hour Unit (Singular) */ 52 | "hour" = "uur"; 53 | 54 | /* Hour Unit (Plural) */ 55 | "hours" = "uur"; 56 | 57 | /* Hour Unit (Singular, Abbreviated) */ 58 | "hr" = "u"; 59 | 60 | /* Hour Unit (Plural, Abbreviated) */ 61 | "hrs" = "u"; 62 | 63 | /* Present Deictic Expression */ 64 | "just now" = "zojuist"; 65 | 66 | /* No comment provided by engineer. */ 67 | "Method Not Implemented" = "Methode niet geïmplementeerd"; 68 | 69 | /* Mile Unit (Singular) */ 70 | "mile" = "mijl"; 71 | 72 | /* Mile Unit (Plural) */ 73 | "miles" = "mijlen"; 74 | 75 | /* Minute Unit (Singular, Abbreviated) */ 76 | "min" = "min."; 77 | 78 | /* Minute Unit (Plural, Abbreviated) */ 79 | "mins" = "min."; 80 | 81 | /* Minute Unit (Singular) */ 82 | "minute" = "minuut"; 83 | 84 | /* Minute Unit (Plural) */ 85 | "minutes" = "minuten"; 86 | 87 | /* Month Unit (Singular, Abbreviated) */ 88 | "mo" = "mnd."; 89 | 90 | /* Month Unit (Singular) */ 91 | "month" = "maand"; 92 | 93 | /* Month Unit (Plural) */ 94 | "months" = "maanden"; 95 | 96 | /* Month Unit (Plural, Abbreviated) */ 97 | "mos" = "mnd."; 98 | 99 | /* Miles Per Hour Unit */ 100 | "mph" = "mph"; 101 | 102 | /* North Direction Abbreviation */ 103 | "N" = "N"; 104 | 105 | /* Northeast Direction Abbreviation */ 106 | "NE" = "NO"; 107 | 108 | /* North Direction */ 109 | "North" = "Noord"; 110 | 111 | /* Northeast Direction */ 112 | "Northeast" = "Noordoost"; 113 | 114 | /* Northwest Direction */ 115 | "Northwest" = "Noordwest"; 116 | 117 | /* Northwest Direction Abbreviation */ 118 | "NW" = "NW"; 119 | 120 | /* Second Unit (Plural, Abbreviated) 121 | Second Unit (Singular, Abbreviated) */ 122 | "s" = "s"; 123 | 124 | /* South Direction Abbreviation */ 125 | "S" = "Z"; 126 | 127 | /* Southeast Direction Abbreviation */ 128 | "SE" = "ZO"; 129 | 130 | /* Second Unit (Singular) */ 131 | "second" = "seconde"; 132 | 133 | /* Second Unit (Plural) */ 134 | "seconds" = "seconden"; 135 | 136 | /* South Direction */ 137 | "South" = "Zuid"; 138 | 139 | /* Southeast Direction */ 140 | "Southeast" = "Zuidoost"; 141 | 142 | /* Southwest Direction */ 143 | "Southwest" = "Zuidwest"; 144 | 145 | /* Southwest Direction Abbreviation */ 146 | "SW" = "ZW"; 147 | 148 | /* #{Value} #{Unit} */ 149 | "Unit of Information Format String" = "%1$@ %2$@"; 150 | 151 | /* West Direction Abbreviation */ 152 | "W" = "W"; 153 | 154 | /* Week Unit (Singular) */ 155 | "week" = "week"; 156 | 157 | /* Week Unit (Plural) */ 158 | "weeks" = "weken"; 159 | 160 | /* West Direction */ 161 | "West" = "West"; 162 | 163 | /* Week Unit (Singular, Abbreviated) */ 164 | "wk" = "wk,"; 165 | 166 | /* Week Unit (Plural, Abbreviated) */ 167 | "wks" = "wkn."; 168 | 169 | /* Yard Unit */ 170 | "yds" = "yds"; 171 | 172 | /* Year Unit (Singular) */ 173 | "year" = "jaar"; 174 | 175 | /* Year Unit (Plural) */ 176 | "years" = "jaren"; 177 | 178 | /* Year Unit (Singular, Abbreviated) */ 179 | "yr" = "jr."; 180 | 181 | /* Year Unit (Plural, Abbreviated) */ 182 | "yrs" = "jr."; 183 | 184 | -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/nn.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings - Norwegian Nynorsk 3 | 4 | 5 | Created by André Bonkowski on 07.03.13. 6 | 7 | */ 8 | 9 | "ago" = "sidan"; 10 | "just now" = "Akkurat no"; 11 | "from now" = "frå no"; 12 | 13 | "%@ %@" = "%1$@ %2$@"; 14 | "about %@" = "om %@"; 15 | 16 | "yr." = "år"; 17 | "yrs." = "år"; 18 | 19 | "mo." = "mnd"; 20 | "mos." = "mnd"; 21 | "wk." = "u"; 22 | "wks." = "u"; 23 | "day" = "d"; 24 | "days" = "d"; 25 | "hr" = "t"; 26 | "hrs." = "t"; 27 | "min." = "m"; 28 | "mins." = "m"; 29 | "s." = "s"; 30 | "s." = "s"; 31 | 32 | "year" = "år"; 33 | "years" = "år"; 34 | "month" = "månad"; 35 | "months" = "månader"; 36 | "week" = "veke"; 37 | "weeks" = "veker"; 38 | "day" = "dag"; 39 | "days" = "dagar"; 40 | "hour" = "time"; 41 | "hours" = "timar"; 42 | "minute" = "minutt"; 43 | "minutes" = "minuttar"; 44 | "second" = "sekund"; 45 | "seconds" = "sekundar"; 46 | 47 | -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/pl.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/pl.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/ro.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/ro.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/uk.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/uk.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/FormatterKit/Localizations/vi.lproj/FormatterKit.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/Pods/FormatterKit/Localizations/vi.lproj/FormatterKit.strings -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FormatterKit/Resources (1.8.1) 3 | - FormatterKit/TimeIntervalFormatter (1.8.1): 4 | - FormatterKit/Resources 5 | - Masonry (1.0.2) 6 | 7 | DEPENDENCIES: 8 | - FormatterKit/TimeIntervalFormatter (~> 1.7) 9 | - Masonry (~> 1.0.2) 10 | 11 | SPEC CHECKSUMS: 12 | FormatterKit: 11ad17b983200629246a5a466f6f1bfa2df823cb 13 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 14 | 15 | PODFILE CHECKSUM: 0ae327b172afc30412e7770516159c887e1b731c 16 | 17 | COCOAPODS: 1.2.0 18 | -------------------------------------------------------------------------------- /Pods/Masonry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASCompositeConstraint.h" 10 | #import "MASConstraint+Private.h" 11 | 12 | @interface MASCompositeConstraint () 13 | 14 | @property (nonatomic, strong) id mas_key; 15 | @property (nonatomic, strong) NSMutableArray *childConstraints; 16 | 17 | @end 18 | 19 | @implementation MASCompositeConstraint 20 | 21 | - (id)initWithChildren:(NSArray *)children { 22 | self = [super init]; 23 | if (!self) return nil; 24 | 25 | _childConstraints = [children mutableCopy]; 26 | for (MASConstraint *constraint in _childConstraints) { 27 | constraint.delegate = self; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | #pragma mark - MASConstraintDelegate 34 | 35 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { 36 | NSUInteger index = [self.childConstraints indexOfObject:constraint]; 37 | NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); 38 | [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; 39 | } 40 | 41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 42 | id strongDelegate = self.delegate; 43 | MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 44 | newConstraint.delegate = self; 45 | [self.childConstraints addObject:newConstraint]; 46 | return newConstraint; 47 | } 48 | 49 | #pragma mark - NSLayoutConstraint multiplier proxies 50 | 51 | - (MASConstraint * (^)(CGFloat))multipliedBy { 52 | return ^id(CGFloat multiplier) { 53 | for (MASConstraint *constraint in self.childConstraints) { 54 | constraint.multipliedBy(multiplier); 55 | } 56 | return self; 57 | }; 58 | } 59 | 60 | - (MASConstraint * (^)(CGFloat))dividedBy { 61 | return ^id(CGFloat divider) { 62 | for (MASConstraint *constraint in self.childConstraints) { 63 | constraint.dividedBy(divider); 64 | } 65 | return self; 66 | }; 67 | } 68 | 69 | #pragma mark - MASLayoutPriority proxy 70 | 71 | - (MASConstraint * (^)(MASLayoutPriority))priority { 72 | return ^id(MASLayoutPriority priority) { 73 | for (MASConstraint *constraint in self.childConstraints) { 74 | constraint.priority(priority); 75 | } 76 | return self; 77 | }; 78 | } 79 | 80 | #pragma mark - NSLayoutRelation proxy 81 | 82 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { 83 | return ^id(id attr, NSLayoutRelation relation) { 84 | for (MASConstraint *constraint in self.childConstraints.copy) { 85 | constraint.equalToWithRelation(attr, relation); 86 | } 87 | return self; 88 | }; 89 | } 90 | 91 | #pragma mark - attribute chaining 92 | 93 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 94 | [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 95 | return self; 96 | } 97 | 98 | #pragma mark - Animator proxy 99 | 100 | #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) 101 | 102 | - (MASConstraint *)animator { 103 | for (MASConstraint *constraint in self.childConstraints) { 104 | [constraint animator]; 105 | } 106 | return self; 107 | } 108 | 109 | #endif 110 | 111 | #pragma mark - debug helpers 112 | 113 | - (MASConstraint * (^)(id))key { 114 | return ^id(id key) { 115 | self.mas_key = key; 116 | int i = 0; 117 | for (MASConstraint *constraint in self.childConstraints) { 118 | constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); 119 | } 120 | return self; 121 | }; 122 | } 123 | 124 | #pragma mark - NSLayoutConstraint constant setters 125 | 126 | - (void)setInsets:(MASEdgeInsets)insets { 127 | for (MASConstraint *constraint in self.childConstraints) { 128 | constraint.insets = insets; 129 | } 130 | } 131 | 132 | - (void)setOffset:(CGFloat)offset { 133 | for (MASConstraint *constraint in self.childConstraints) { 134 | constraint.offset = offset; 135 | } 136 | } 137 | 138 | - (void)setSizeOffset:(CGSize)sizeOffset { 139 | for (MASConstraint *constraint in self.childConstraints) { 140 | constraint.sizeOffset = sizeOffset; 141 | } 142 | } 143 | 144 | - (void)setCenterOffset:(CGPoint)centerOffset { 145 | for (MASConstraint *constraint in self.childConstraints) { 146 | constraint.centerOffset = centerOffset; 147 | } 148 | } 149 | 150 | #pragma mark - MASConstraint 151 | 152 | - (void)activate { 153 | for (MASConstraint *constraint in self.childConstraints) { 154 | [constraint activate]; 155 | } 156 | } 157 | 158 | - (void)deactivate { 159 | for (MASConstraint *constraint in self.childConstraints) { 160 | [constraint deactivate]; 161 | } 162 | } 163 | 164 | - (void)install { 165 | for (MASConstraint *constraint in self.childConstraints) { 166 | constraint.updateExisting = self.updateExisting; 167 | [constraint install]; 168 | } 169 | } 170 | 171 | - (void)uninstall { 172 | for (MASConstraint *constraint in self.childConstraints) { 173 | [constraint uninstall]; 174 | } 175 | } 176 | 177 | @end 178 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint+Private.h 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 29/04/14. 6 | // Copyright (c) 2014 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | 11 | @protocol MASConstraintDelegate; 12 | 13 | 14 | @interface MASConstraint () 15 | 16 | /** 17 | * Whether or not to check for an existing constraint instead of adding constraint 18 | */ 19 | @property (nonatomic, assign) BOOL updateExisting; 20 | 21 | /** 22 | * Usually MASConstraintMaker but could be a parent MASConstraint 23 | */ 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /** 27 | * Based on a provided value type, is equal to calling: 28 | * NSNumber - setOffset: 29 | * NSValue with CGPoint - setPointOffset: 30 | * NSValue with CGSize - setSizeOffset: 31 | * NSValue with MASEdgeInsets - setInsets: 32 | */ 33 | - (void)setLayoutConstantWithValue:(NSValue *)value; 34 | 35 | @end 36 | 37 | 38 | @interface MASConstraint (Abstract) 39 | 40 | /** 41 | * Sets the constraint relation to given NSLayoutRelation 42 | * returns a block which accepts one of the following: 43 | * MASViewAttribute, UIView, NSValue, NSArray 44 | * see readme for more details. 45 | */ 46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; 47 | 48 | /** 49 | * Override to set a custom chaining behaviour 50 | */ 51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 52 | 53 | @end 54 | 55 | 56 | @protocol MASConstraintDelegate 57 | 58 | /** 59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example 60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks 61 | */ 62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; 63 | 64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraintBuilder.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | typedef NS_OPTIONS(NSInteger, MASAttribute) { 13 | MASAttributeLeft = 1 << NSLayoutAttributeLeft, 14 | MASAttributeRight = 1 << NSLayoutAttributeRight, 15 | MASAttributeTop = 1 << NSLayoutAttributeTop, 16 | MASAttributeBottom = 1 << NSLayoutAttributeBottom, 17 | MASAttributeLeading = 1 << NSLayoutAttributeLeading, 18 | MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, 19 | MASAttributeWidth = 1 << NSLayoutAttributeWidth, 20 | MASAttributeHeight = 1 << NSLayoutAttributeHeight, 21 | MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, 22 | MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, 23 | MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, 24 | 25 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 26 | 27 | MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, 28 | MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, 29 | 30 | #endif 31 | 32 | #if TARGET_OS_IPHONE || TARGET_OS_TV 33 | 34 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, 35 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, 36 | MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, 37 | MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, 38 | MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, 39 | MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, 40 | MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, 41 | MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, 42 | 43 | #endif 44 | 45 | }; 46 | 47 | /** 48 | * Provides factory methods for creating MASConstraints. 49 | * Constraints are collected until they are ready to be installed 50 | * 51 | */ 52 | @interface MASConstraintMaker : NSObject 53 | 54 | /** 55 | * The following properties return a new MASViewConstraint 56 | * with the first item set to the makers associated view and the appropriate MASViewAttribute 57 | */ 58 | @property (nonatomic, strong, readonly) MASConstraint *left; 59 | @property (nonatomic, strong, readonly) MASConstraint *top; 60 | @property (nonatomic, strong, readonly) MASConstraint *right; 61 | @property (nonatomic, strong, readonly) MASConstraint *bottom; 62 | @property (nonatomic, strong, readonly) MASConstraint *leading; 63 | @property (nonatomic, strong, readonly) MASConstraint *trailing; 64 | @property (nonatomic, strong, readonly) MASConstraint *width; 65 | @property (nonatomic, strong, readonly) MASConstraint *height; 66 | @property (nonatomic, strong, readonly) MASConstraint *centerX; 67 | @property (nonatomic, strong, readonly) MASConstraint *centerY; 68 | @property (nonatomic, strong, readonly) MASConstraint *baseline; 69 | 70 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 71 | 72 | @property (nonatomic, strong, readonly) MASConstraint *firstBaseline; 73 | @property (nonatomic, strong, readonly) MASConstraint *lastBaseline; 74 | 75 | #endif 76 | 77 | #if TARGET_OS_IPHONE || TARGET_OS_TV 78 | 79 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; 80 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; 81 | @property (nonatomic, strong, readonly) MASConstraint *topMargin; 82 | @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; 83 | @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; 84 | @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; 85 | @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; 86 | @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; 87 | 88 | #endif 89 | 90 | /** 91 | * Returns a block which creates a new MASCompositeConstraint with the first item set 92 | * to the makers associated view and children corresponding to the set bits in the 93 | * MASAttribute parameter. Combine multiple attributes via binary-or. 94 | */ 95 | @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); 96 | 97 | /** 98 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges 99 | * which generates the appropriate MASViewConstraint children (top, left, bottom, right) 100 | * with the first item set to the makers associated view 101 | */ 102 | @property (nonatomic, strong, readonly) MASConstraint *edges; 103 | 104 | /** 105 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize 106 | * which generates the appropriate MASViewConstraint children (width, height) 107 | * with the first item set to the makers associated view 108 | */ 109 | @property (nonatomic, strong, readonly) MASConstraint *size; 110 | 111 | /** 112 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter 113 | * which generates the appropriate MASViewConstraint children (centerX, centerY) 114 | * with the first item set to the makers associated view 115 | */ 116 | @property (nonatomic, strong, readonly) MASConstraint *center; 117 | 118 | /** 119 | * Whether or not to check for an existing constraint instead of adding constraint 120 | */ 121 | @property (nonatomic, assign) BOOL updateExisting; 122 | 123 | /** 124 | * Whether or not to remove existing constraints prior to installing 125 | */ 126 | @property (nonatomic, assign) BOOL removeExisting; 127 | 128 | /** 129 | * initialises the maker with a default view 130 | * 131 | * @param view any MASConstrait are created with this view as the first item 132 | * 133 | * @return a new MASConstraintMaker 134 | */ 135 | - (id)initWithView:(MAS_VIEW *)view; 136 | 137 | /** 138 | * Calls install method on any MASConstraints which have been created by this maker 139 | * 140 | * @return an array of all the installed MASConstraints 141 | */ 142 | - (NSArray *)install; 143 | 144 | - (MASConstraint * (^)(dispatch_block_t))group; 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | #import "MASUtilities.h" 13 | 14 | /** 15 | * A single constraint. 16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view 17 | */ 18 | @interface MASViewConstraint : MASConstraint 19 | 20 | /** 21 | * First item/view and first attribute of the NSLayoutConstraint 22 | */ 23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; 24 | 25 | /** 26 | * Second item/view and second attribute of the NSLayoutConstraint 27 | */ 28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; 29 | 30 | /** 31 | * initialises the MASViewConstraint with the first part of the equation 32 | * 33 | * @param firstViewAttribute view.mas_left, view.mas_width etc. 34 | * 35 | * @return a new view constraint 36 | */ 37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; 38 | 39 | /** 40 | * Returns all MASViewConstraints installed with this view as a first item. 41 | * 42 | * @param view A view to retrieve constraints for. 43 | * 44 | * @return An array of MASViewConstraints. 45 | */ 46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.h 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | typedef NS_ENUM(NSUInteger, MASAxisType) { 14 | MASAxisTypeHorizontal, 15 | MASAxisTypeVertical 16 | }; 17 | 18 | @interface NSArray (MASAdditions) 19 | 20 | /** 21 | * Creates a MASConstraintMaker with each view in the callee. 22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view 23 | * 24 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 25 | * 26 | * @return Array of created MASConstraints 27 | */ 28 | - (NSArray *)mas_makeConstraints:(void (^)(MASConstraintMaker *make))block; 29 | 30 | /** 31 | * Creates a MASConstraintMaker with each view in the callee. 32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 33 | * If an existing constraint exists then it will be updated instead. 34 | * 35 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 36 | * 37 | * @return Array of created/updated MASConstraints 38 | */ 39 | - (NSArray *)mas_updateConstraints:(void (^)(MASConstraintMaker *make))block; 40 | 41 | /** 42 | * Creates a MASConstraintMaker with each view in the callee. 43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 44 | * All constraints previously installed for the views will be removed. 45 | * 46 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 47 | * 48 | * @return Array of created/updated MASConstraints 49 | */ 50 | - (NSArray *)mas_remakeConstraints:(void (^)(MASConstraintMaker *make))block; 51 | 52 | /** 53 | * distribute with fixed spacing 54 | * 55 | * @param axisType which axis to distribute items along 56 | * @param fixedSpacing the spacing between each item 57 | * @param leadSpacing the spacing before the first item and the container 58 | * @param tailSpacing the spacing after the last item and the container 59 | */ 60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 61 | 62 | /** 63 | * distribute with fixed item size 64 | * 65 | * @param axisType which axis to distribute items along 66 | * @param fixedItemLength the fixed length of each item 67 | * @param leadSpacing the spacing before the first item and the container 68 | * @param tailSpacing the spacing after the last item and the container 69 | */ 70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | /** 14 | * Provides constraint maker block 15 | * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs 16 | */ 17 | @interface MAS_VIEW (MASAdditions) 18 | 19 | /** 20 | * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute 21 | */ 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; 31 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; 32 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; 33 | @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); 34 | 35 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 36 | 37 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; 38 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; 39 | 40 | #endif 41 | 42 | #if TARGET_OS_IPHONE || TARGET_OS_TV 43 | 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; 49 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; 50 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; 51 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; 52 | 53 | #endif 54 | 55 | /** 56 | * a key to associate with this view 57 | */ 58 | @property (nonatomic, strong) id mas_key; 59 | 60 | /** 61 | * Finds the closest common superview between this view and another view 62 | * 63 | * @param view other view 64 | * 65 | * @return returns nil if common superview could not be found 66 | */ 67 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; 68 | 69 | /** 70 | * Creates a MASConstraintMaker with the callee view. 71 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing 72 | * 73 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 74 | * 75 | * @return Array of created MASConstraints 76 | */ 77 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block; 78 | 79 | /** 80 | * Creates a MASConstraintMaker with the callee view. 81 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 82 | * If an existing constraint exists then it will be updated instead. 83 | * 84 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 85 | * 86 | * @return Array of created/updated MASConstraints 87 | */ 88 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block; 89 | 90 | /** 91 | * Creates a MASConstraintMaker with the callee view. 92 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 93 | * All constraints previously installed for the view will be removed. 94 | * 95 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 96 | * 97 | * @return Array of created/updated MASConstraints 98 | */ 99 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block; 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | #import 11 | 12 | @implementation MAS_VIEW (MASAdditions) 13 | 14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { 15 | self.translatesAutoresizingMaskIntoConstraints = NO; 16 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 17 | block(constraintMaker); 18 | return [constraintMaker install]; 19 | } 20 | 21 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block { 22 | self.translatesAutoresizingMaskIntoConstraints = NO; 23 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 24 | constraintMaker.updateExisting = YES; 25 | block(constraintMaker); 26 | return [constraintMaker install]; 27 | } 28 | 29 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { 30 | self.translatesAutoresizingMaskIntoConstraints = NO; 31 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 32 | constraintMaker.removeExisting = YES; 33 | block(constraintMaker); 34 | return [constraintMaker install]; 35 | } 36 | 37 | #pragma mark - NSLayoutAttribute properties 38 | 39 | - (MASViewAttribute *)mas_left { 40 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft]; 41 | } 42 | 43 | - (MASViewAttribute *)mas_top { 44 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop]; 45 | } 46 | 47 | - (MASViewAttribute *)mas_right { 48 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight]; 49 | } 50 | 51 | - (MASViewAttribute *)mas_bottom { 52 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom]; 53 | } 54 | 55 | - (MASViewAttribute *)mas_leading { 56 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading]; 57 | } 58 | 59 | - (MASViewAttribute *)mas_trailing { 60 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing]; 61 | } 62 | 63 | - (MASViewAttribute *)mas_width { 64 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth]; 65 | } 66 | 67 | - (MASViewAttribute *)mas_height { 68 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight]; 69 | } 70 | 71 | - (MASViewAttribute *)mas_centerX { 72 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX]; 73 | } 74 | 75 | - (MASViewAttribute *)mas_centerY { 76 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY]; 77 | } 78 | 79 | - (MASViewAttribute *)mas_baseline { 80 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline]; 81 | } 82 | 83 | - (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute 84 | { 85 | return ^(NSLayoutAttribute attr) { 86 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr]; 87 | }; 88 | } 89 | 90 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 91 | 92 | - (MASViewAttribute *)mas_firstBaseline { 93 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline]; 94 | } 95 | - (MASViewAttribute *)mas_lastBaseline { 96 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline]; 97 | } 98 | 99 | #endif 100 | 101 | #if TARGET_OS_IPHONE || TARGET_OS_TV 102 | 103 | - (MASViewAttribute *)mas_leftMargin { 104 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; 105 | } 106 | 107 | - (MASViewAttribute *)mas_rightMargin { 108 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin]; 109 | } 110 | 111 | - (MASViewAttribute *)mas_topMargin { 112 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin]; 113 | } 114 | 115 | - (MASViewAttribute *)mas_bottomMargin { 116 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin]; 117 | } 118 | 119 | - (MASViewAttribute *)mas_leadingMargin { 120 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin]; 121 | } 122 | 123 | - (MASViewAttribute *)mas_trailingMargin { 124 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin]; 125 | } 126 | 127 | - (MASViewAttribute *)mas_centerXWithinMargins { 128 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins]; 129 | } 130 | 131 | - (MASViewAttribute *)mas_centerYWithinMargins { 132 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins]; 133 | } 134 | 135 | #endif 136 | 137 | #pragma mark - associated properties 138 | 139 | - (id)mas_key { 140 | return objc_getAssociatedObject(self, @selector(mas_key)); 141 | } 142 | 143 | - (void)setMas_key:(id)key { 144 | objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 145 | } 146 | 147 | #pragma mark - heirachy 148 | 149 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view { 150 | MAS_VIEW *closestCommonSuperview = nil; 151 | 152 | MAS_VIEW *secondViewSuperview = view; 153 | while (!closestCommonSuperview && secondViewSuperview) { 154 | MAS_VIEW *firstViewSuperview = self; 155 | while (!closestCommonSuperview && firstViewSuperview) { 156 | if (secondViewSuperview == firstViewSuperview) { 157 | closestCommonSuperview = secondViewSuperview; 158 | } 159 | firstViewSuperview = firstViewSuperview.superview; 160 | } 161 | secondViewSuperview = secondViewSuperview.superview; 162 | } 163 | return closestCommonSuperview; 164 | } 165 | 166 | @end 167 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand view additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface MAS_VIEW (MASShorthandAdditions) 18 | 19 | @property (nonatomic, strong, readonly) MASViewAttribute *left; 20 | @property (nonatomic, strong, readonly) MASViewAttribute *top; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *right; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *width; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *height; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 33 | 34 | @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; 35 | @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; 36 | 37 | #endif 38 | 39 | #if TARGET_OS_IPHONE || TARGET_OS_TV 40 | 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; 43 | @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; 44 | @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; 49 | 50 | #endif 51 | 52 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 53 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 54 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 55 | 56 | @end 57 | 58 | #define MAS_ATTR_FORWARD(attr) \ 59 | - (MASViewAttribute *)attr { \ 60 | return [self mas_##attr]; \ 61 | } 62 | 63 | @implementation MAS_VIEW (MASShorthandAdditions) 64 | 65 | MAS_ATTR_FORWARD(top); 66 | MAS_ATTR_FORWARD(left); 67 | MAS_ATTR_FORWARD(bottom); 68 | MAS_ATTR_FORWARD(right); 69 | MAS_ATTR_FORWARD(leading); 70 | MAS_ATTR_FORWARD(trailing); 71 | MAS_ATTR_FORWARD(width); 72 | MAS_ATTR_FORWARD(height); 73 | MAS_ATTR_FORWARD(centerX); 74 | MAS_ATTR_FORWARD(centerY); 75 | MAS_ATTR_FORWARD(baseline); 76 | 77 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 78 | 79 | MAS_ATTR_FORWARD(firstBaseline); 80 | MAS_ATTR_FORWARD(lastBaseline); 81 | 82 | #endif 83 | 84 | #if TARGET_OS_IPHONE || TARGET_OS_TV 85 | 86 | MAS_ATTR_FORWARD(leftMargin); 87 | MAS_ATTR_FORWARD(rightMargin); 88 | MAS_ATTR_FORWARD(topMargin); 89 | MAS_ATTR_FORWARD(bottomMargin); 90 | MAS_ATTR_FORWARD(leadingMargin); 91 | MAS_ATTR_FORWARD(trailingMargin); 92 | MAS_ATTR_FORWARD(centerXWithinMargins); 93 | MAS_ATTR_FORWARD(centerYWithinMargins); 94 | 95 | #endif 96 | 97 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { 98 | return [self mas_attribute]; 99 | } 100 | 101 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 102 | return [self mas_makeConstraints:block]; 103 | } 104 | 105 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 106 | return [self mas_updateConstraints:block]; 107 | } 108 | 109 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 110 | return [self mas_remakeConstraints:block]; 111 | } 112 | 113 | @end 114 | 115 | #endif 116 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; 26 | 27 | 28 | @end 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "ViewController+MASAdditions.h" 10 | 11 | #ifdef MAS_VIEW_CONTROLLER 12 | 13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions) 14 | 15 | - (MASViewAttribute *)mas_topLayoutGuide { 16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 17 | } 18 | - (MASViewAttribute *)mas_topLayoutGuideTop { 19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 20 | } 21 | - (MASViewAttribute *)mas_topLayoutGuideBottom { 22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 23 | } 24 | 25 | - (MASViewAttribute *)mas_bottomLayoutGuide { 26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 27 | } 28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop { 29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 30 | } 31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom { 32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 33 | } 34 | 35 | 36 | 37 | @end 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Pods/Target Support Files/FormatterKit/FormatterKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FormatterKit : NSObject 3 | @end 4 | @implementation PodsDummy_FormatterKit 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/FormatterKit/FormatterKit-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/FormatterKit/FormatterKit-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 | #import "TTTTimeIntervalFormatter.h" 14 | 15 | FOUNDATION_EXPORT double FormatterKitVersionNumber; 16 | FOUNDATION_EXPORT const unsigned char FormatterKitVersionString[]; 17 | 18 | -------------------------------------------------------------------------------- /Pods/Target Support Files/FormatterKit/FormatterKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module FormatterKit { 2 | umbrella header "FormatterKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/FormatterKit/FormatterKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FormatterKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/FormatterKit 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/FormatterKit/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.8.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/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.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-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 | #import "MASCompositeConstraint.h" 14 | #import "MASConstraint+Private.h" 15 | #import "MASConstraint.h" 16 | #import "MASConstraintMaker.h" 17 | #import "MASLayoutConstraint.h" 18 | #import "Masonry.h" 19 | #import "MASUtilities.h" 20 | #import "MASViewAttribute.h" 21 | #import "MASViewConstraint.h" 22 | #import "NSArray+MASAdditions.h" 23 | #import "NSArray+MASShorthandAdditions.h" 24 | #import "NSLayoutConstraint+MASDebugAdditions.h" 25 | #import "View+MASAdditions.h" 26 | #import "View+MASShorthandAdditions.h" 27 | #import "ViewController+MASAdditions.h" 28 | 29 | FOUNDATION_EXPORT double MasonryVersionNumber; 30 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 31 | 32 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry.modulemap: -------------------------------------------------------------------------------- 1 | framework module Masonry { 2 | umbrella header "Masonry-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 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}/Masonry 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SCFilterControlProvider : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SCFilterControlProvider 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider-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_SCFilterControlProviderVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SCFilterControlProviderVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 3 | PODS_BUILD_DIR = $BUILD_DIR 4 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SCFilterControlProvider { 2 | umbrella header "Pods-SCFilterControlProvider-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterControlProvider/Pods-SCFilterControlProvider.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 3 | PODS_BUILD_DIR = $BUILD_DIR 4 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SCFilterDataProvider : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SCFilterDataProvider 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider-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_SCFilterDataProviderVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SCFilterDataProviderVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 3 | PODS_BUILD_DIR = $BUILD_DIR 4 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SCFilterDataProvider { 2 | umbrella header "Pods-SCFilterDataProvider-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SCFilterDataProvider/Pods-SCFilterDataProvider.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 3 | PODS_BUILD_DIR = $BUILD_DIR 4 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## FormatterKit 5 | 6 | Copyright (c) 2011–2015 Mattt Thompson (http://mattt.me/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## Masonry 28 | 29 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | Generated by CocoaPods - https://cocoapods.org 49 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS-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 | Copyright (c) 2011–2015 Mattt Thompson (http://mattt.me/) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | FormatterKit 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a copy 49 | of this software and associated documentation files (the "Software"), to deal 50 | in the Software without restriction, including without limitation the rights 51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 52 | copies of the Software, and to permit persons to whom the Software is 53 | furnished to do so, subject to the following conditions: 54 | 55 | The above copyright notice and this permission notice shall be included in 56 | all copies or substantial portions of the Software. 57 | 58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 64 | THE SOFTWARE. 65 | License 66 | MIT 67 | Title 68 | Masonry 69 | Type 70 | PSGroupSpecifier 71 | 72 | 73 | FooterText 74 | Generated by CocoaPods - https://cocoapods.org 75 | Title 76 | 77 | Type 78 | PSGroupSpecifier 79 | 80 | 81 | StringsTable 82 | Acknowledgements 83 | Title 84 | Acknowledgements 85 | 86 | 87 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SelfControlIOS : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SelfControlIOS 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS-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/FormatterKit/FormatterKit.framework" 93 | install_framework "$BUILT_PRODUCTS_DIR/Masonry/Masonry.framework" 94 | fi 95 | if [[ "$CONFIGURATION" == "Release" ]]; then 96 | install_framework "$BUILT_PRODUCTS_DIR/FormatterKit/FormatterKit.framework" 97 | install_framework "$BUILT_PRODUCTS_DIR/Masonry/Masonry.framework" 98 | fi 99 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 100 | wait 101 | fi 102 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS-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_SelfControlIOSVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SelfControlIOSVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit/FormatterKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "FormatterKit" -framework "Masonry" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SelfControlIOS { 2 | umbrella header "Pods-SelfControlIOS-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOS/Pods-SelfControlIOS.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit/FormatterKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "FormatterKit" -framework "Masonry" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SelfControlIOSTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SelfControlIOSTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests-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 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests-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_SelfControlIOSTestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SelfControlIOSTestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit/FormatterKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SelfControlIOSTests { 2 | umbrella header "Pods-SelfControlIOSTests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSTests/Pods-SelfControlIOSTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit/FormatterKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SelfControlIOSUITests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SelfControlIOSUITests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests-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 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests-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_SelfControlIOSUITestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SelfControlIOSUITestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit/FormatterKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SelfControlIOSUITests { 2 | umbrella header "Pods-SelfControlIOSUITests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SelfControlIOSUITests/Pods-SelfControlIOSUITests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FormatterKit/FormatterKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Under construction - nothing to see here! 2 | 3 | This project is an active construction zone. You should back away slowly unless you're wearing your developer hardhat. 4 | -------------------------------------------------------------------------------- /SCFilterControlProvider/ControlExtension.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016 Apple Inc. All Rights Reserved. 3 | See LICENSE.txt for this sample’s licensing information 4 | 5 | Abstract: 6 | This file contains the ControlExtension class. The ControlExtension class is a sub-class of NEFilterControlProvider, and is responsible for downloading content filter rules from a web service. 7 | */ 8 | 9 | import NetworkExtension 10 | import Foundation 11 | 12 | /// A NEFitlerControlProvider sub-class that implements logic for downloading rules from a web server. 13 | class ControlExtension : NEFilterControlProvider { 14 | 15 | // MARK: Properties 16 | 17 | /// An integer to use as the context for key-value observing. 18 | var observerContext = 0 19 | 20 | // MARK: Interface 21 | 22 | /// Update the filter based on changes to the configuration 23 | func updateFromConfiguration() { 24 | guard let serverAddress = filterConfiguration.serverAddress else { return } 25 | 26 | // FilterUtilities.fetchRulesFromServer(filterConfiguration.serverAddress) 27 | 28 | let remediationURL = "https://\(serverAddress)/remediate/?url=\(NEFilterProviderRemediationURLFlowURLHostname)&organization=\(NEFilterProviderRemediationURLOrganization)&username=\(NEFilterProviderRemediationURLUsername)" 29 | 30 | NSLog("Remediation url is \(remediationURL)") 31 | 32 | remediationMap = 33 | [ 34 | NEFilterProviderRemediationMapRemediationURLs : [ "Remediate1" : remediationURL as NSObject ], 35 | NEFilterProviderRemediationMapRemediationButtonTexts : 36 | [ 37 | "RemediateButton1" : "Request Access" as NSObject, 38 | "RemediateButton2" : "\"" as NSObject, 39 | "RemediateButton3" : "Request Access 3" as NSObject, 40 | ] 41 | ] 42 | 43 | self.urlAppendStringMap = [ "SafeYes" : "safe=yes", "Adult" : "adult=yes"] 44 | 45 | NSLog("Remediation map set") 46 | } 47 | 48 | // MARK: Initializers 49 | 50 | override init() { 51 | NSLog("Init filter control provider!"); 52 | 53 | super.init() 54 | updateFromConfiguration() 55 | 56 | // FilterUtilities.fetchRulesFromServer(self.filterConfiguration.serverAddress) 57 | 58 | self.addObserver(self, forKeyPath: "filterConfiguration", options: [.initial, .new], context: &observerContext) 59 | } 60 | 61 | // MARK: NSObject 62 | 63 | /// Observe changes to the configuration. 64 | override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { 65 | if keyPath == "filterConfiguration" && context == &observerContext { 66 | NSLog("configuration changed") 67 | updateFromConfiguration() 68 | } else { 69 | super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context) 70 | } 71 | } 72 | 73 | // MARK: NEFilterControlProvider 74 | 75 | /// Handle a new flow of network data 76 | override func handleNewFlow(_ flow: NEFilterFlow, completionHandler: @escaping (NEFilterControlVerdict) -> Void) { 77 | NSLog("Handle new flow called") 78 | var controlVerdict = NEFilterControlVerdict.updateRules() 79 | let (ruleType, hostname, _) = FilterUtilities.getRule(flow) 80 | 81 | switch ruleType { 82 | case .needMoreRulesAndAllow: 83 | NSLog("\(hostname) is set to be Allowed (handling new flow in control extension)") 84 | controlVerdict = NEFilterControlVerdict.allow(withUpdateRules: false) 85 | 86 | case .needMoreRulesAndBlock: 87 | NSLog("\(hostname) is set to be Blocked (handling new flow in control extension)") 88 | controlVerdict = NEFilterControlVerdict.drop(withUpdateRules: false) 89 | 90 | default: 91 | NSLog("\(hostname) is not set for need more rules") 92 | } 93 | 94 | completionHandler(controlVerdict) 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /SCFilterControlProvider/ControlFilterExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | keychain-access-groups 6 | 7 | com.apple.managed.vpn.shared 8 | 9 | com.apple.developer.networking.networkextension 10 | 11 | packet-tunnel-provider 12 | app-proxy-provider 13 | content-filter-provider 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SCFilterControlProvider/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | SCFilterControlProvider 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSExtension 26 | 27 | NSExtensionPrincipalClass 28 | SCFilterControlProvider.ControlExtension 29 | NSExtensionPointIdentifier 30 | com.apple.networkextension.filter-control 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SCFilterControlProvider/SCFilterControlProvider.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.networking.networkextension 6 | 7 | packet-tunnel-provider 8 | app-proxy-provider 9 | content-filter-provider 10 | 11 | com.apple.security.application-groups 12 | 13 | group.com.selfcontrolapp.SelfControlIOS 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SCFilterDataProvider/DataFilterExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | keychain-access-groups 6 | 7 | com.apple.managed.vpn.shared 8 | 9 | com.apple.developer.networking.networkextension 10 | 11 | packet-tunnel-provider 12 | app-proxy-provider 13 | content-filter-provider 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SCFilterDataProvider/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | SCFilterDataProvider 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSExtension 26 | 27 | NSExtensionPrincipalClass 28 | SCFilterDataProvider.DataExtension 29 | NSExtensionPointIdentifier 30 | com.apple.networkextension.filter-data 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SCFilterDataProvider/SCFilterDataProvider.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.networking.networkextension 6 | 7 | packet-tunnel-provider 8 | app-proxy-provider 9 | content-filter-provider 10 | 11 | com.apple.security.application-groups 12 | 13 | group.com.selfcontrolapp.SelfControlIOS 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SCUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCUtils.h 3 | // 4 | // 5 | // Created by Charles Stigler on 08/05/2017. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface SCUtils : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SCUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCUtils.m 3 | // 4 | // 5 | // Created by Charles Stigler on 08/05/2017. 6 | // 7 | // 8 | 9 | #import "SCUtils.h" 10 | 11 | @implementation SCUtils 12 | 13 | - (NSString*)stringWithoutRegexSpecialChars:(NSString*)input { 14 | return [input stringByReplacingOccurrencesOfString: @"[\\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)\\[\\{]" 15 | withString: @"\\\\$0" 16 | options: NSRegularExpressionSearch 17 | range: (NSRange){0, [input length]}]; 18 | // return [input stringByR (of: "[\\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)\\[\\{]", 19 | // with: "\\\\$0", 20 | // options: .regularExpression) 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /SelfControlIOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SelfControlIOS.xcodeproj/xcuserdata/charlie.xcuserdatad/xcschemes/SelfControlIOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /SelfControlIOS.xcodeproj/xcuserdata/charlie.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SCFilterControlManager.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | SCFilterControlProvider.xcscheme 13 | 14 | orderHint 15 | 3 16 | 17 | SCFilterDataProvider.xcscheme 18 | 19 | orderHint 20 | 2 21 | 22 | SelfControlIOS.xcscheme 23 | 24 | orderHint 25 | 0 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | CB84E2CE1E1097C0005A0A6B 31 | 32 | primary 33 | 34 | 35 | CB84E2E01E109803005A0A6B 36 | 37 | primary 38 | 39 | 40 | CB84E2F11E1098E6005A0A6B 41 | 42 | primary 43 | 44 | 45 | CB93D1A61E0F216700CE0571 46 | 47 | primary 48 | 49 | 50 | CB93D1BC1E0F216700CE0571 51 | 52 | primary 53 | 54 | 55 | CB93D1C71E0F216800CE0571 56 | 57 | primary 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /SelfControlIOS.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "57x57", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-57x57@1x.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "57x57", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-57x57@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "60x60", 59 | "idiom" : "iphone", 60 | "filename" : "Icon-App-60x60@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "60x60", 65 | "idiom" : "iphone", 66 | "filename" : "Icon-App-60x60@3x.png", 67 | "scale" : "3x" 68 | }, 69 | { 70 | "size" : "20x20", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-20x20@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "20x20", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-20x20@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "29x29", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-29x29@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "29x29", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-29x29@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "40x40", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-40x40@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "40x40", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-40x40@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "50x50", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-Small-50x50@1x.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "50x50", 113 | "idiom" : "ipad", 114 | "filename" : "Icon-Small-50x50@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "72x72", 119 | "idiom" : "ipad", 120 | "filename" : "Icon-App-72x72@1x.png", 121 | "scale" : "1x" 122 | }, 123 | { 124 | "size" : "72x72", 125 | "idiom" : "ipad", 126 | "filename" : "Icon-App-72x72@2x.png", 127 | "scale" : "2x" 128 | }, 129 | { 130 | "size" : "76x76", 131 | "idiom" : "ipad", 132 | "filename" : "Icon-App-76x76@1x.png", 133 | "scale" : "1x" 134 | }, 135 | { 136 | "size" : "76x76", 137 | "idiom" : "ipad", 138 | "filename" : "Icon-App-76x76@2x.png", 139 | "scale" : "2x" 140 | }, 141 | { 142 | "size" : "83.5x83.5", 143 | "idiom" : "ipad", 144 | "filename" : "Icon-App-83.5x83.5@2x.png", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "idiom" : "ios-marketing", 149 | "size" : "1024x1024", 150 | "scale" : "1x" 151 | }, 152 | { 153 | "size" : "40x40", 154 | "idiom" : "iphone", 155 | "filename" : "Icon-App-40x40@1x.png", 156 | "scale" : "1x" 157 | }, 158 | { 159 | "size" : "60x60", 160 | "idiom" : "iphone", 161 | "filename" : "Icon-App-60x60@1x.png", 162 | "scale" : "1x" 163 | }, 164 | { 165 | "size" : "76x76", 166 | "idiom" : "iphone", 167 | "filename" : "Icon-App-76x76@1x.png", 168 | "scale" : "1x" 169 | }, 170 | { 171 | "size" : "76x76", 172 | "idiom" : "ipad", 173 | "filename" : "Icon-App-76x76@3x.png", 174 | "scale" : "3x" 175 | } 176 | ], 177 | "info" : { 178 | "version" : 1, 179 | "author" : "xcode" 180 | } 181 | } -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SelfControlIOS/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 | } -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/first.imageset/first.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/first.imageset/first.pdf -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "logo.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/logo.imageset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/logo.imageset/logo.png -------------------------------------------------------------------------------- /SelfControlIOS/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 | } -------------------------------------------------------------------------------- /SelfControlIOS/Assets.xcassets/second.imageset/second.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelfControlApp/selfcontrol-ios/83a71d49c4fd0026c45cbe697bb7ae4b87a00fc3/SelfControlIOS/Assets.xcassets/second.imageset/second.pdf -------------------------------------------------------------------------------- /SelfControlIOS/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 | -------------------------------------------------------------------------------- /SelfControlIOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | SelfControl 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarTintParameters 32 | 33 | UINavigationBar 34 | 35 | Style 36 | UIBarStyleDefault 37 | Translucent 38 | 39 | 40 | 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | UISupportedInterfaceOrientations~ipad 48 | 49 | UIInterfaceOrientationPortrait 50 | UIInterfaceOrientationPortraitUpsideDown 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /SelfControlIOS/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | SelfControlIOS 4 | 5 | Created by Charles Stigler on 22/09/2017. 6 | Copyright © 2017 SelfControl. All rights reserved. 7 | */ 8 | -------------------------------------------------------------------------------- /SelfControlIOS/Localizable.stringsdict: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %lu app(s) 6 | 7 | NSStringLocalizedFormatKey 8 | %#@apps@ 9 | apps 10 | 11 | NSStringFormatSpecTypeKey 12 | NSStringPluralRuleType 13 | NSStringFormatValueTypeKey 14 | lu 15 | zero 16 | 17 | one 18 | %lu app 19 | other 20 | %lu apps 21 | 22 | 23 | %lu site(s) 24 | 25 | NSStringLocalizedFormatKey 26 | %#@sites@ 27 | sites 28 | 29 | NSStringFormatSpecTypeKey 30 | NSStringPluralRuleType 31 | NSStringFormatValueTypeKey 32 | lu 33 | zero 34 | 35 | one 36 | %lu site 37 | other 38 | %lu sites 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /SelfControlIOS/SCAlertFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCAlertFactory.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 01/07/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface SCAlertFactory : NSObject 13 | 14 | + (void)showAlertWithTitle:(NSString*)title 15 | description:(NSString*)description 16 | viewController:(UIViewController*)vc; 17 | 18 | + (void)showAlertWithError:(NSError*)err 19 | title:(NSString*)title 20 | viewController:(UIViewController*)vc; 21 | 22 | + (void)showConfirmationDialogWithTitle:(NSString*)title 23 | description:(NSString*)description 24 | confirmAction:(void(^)())handler 25 | viewController: (UIViewController*)vc; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /SelfControlIOS/SCAlertFactory.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCAlertFactory.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 01/07/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCAlertFactory.h" 10 | 11 | @implementation SCAlertFactory 12 | 13 | + (void)showAlertWithTitle:(NSString*)title 14 | description:(NSString*)description 15 | viewController:(UIViewController*)vc { 16 | UIAlertController* alert = [UIAlertController alertControllerWithTitle: title 17 | message: description 18 | preferredStyle: UIAlertControllerStyleAlert]; 19 | UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault 20 | handler:^(UIAlertAction * action) {}]; 21 | [alert addAction: defaultAction]; 22 | [vc presentViewController: alert animated: YES completion: nil]; 23 | } 24 | 25 | + (void)showAlertWithError:(NSError*)err 26 | title:(NSString*)title 27 | viewController:(UIViewController*)vc { 28 | UIAlertController* alert = [UIAlertController alertControllerWithTitle: title 29 | message: [err localizedDescription] 30 | preferredStyle: UIAlertControllerStyleAlert]; 31 | UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:UIAlertActionStyleDefault 32 | handler:^(UIAlertAction * action) {}]; 33 | [alert addAction: defaultAction]; 34 | [vc presentViewController: alert animated: YES completion: nil]; 35 | } 36 | 37 | + (void)showConfirmationDialogWithTitle:(NSString*)title 38 | description:(NSString*)description 39 | confirmAction:(void(^)())handler 40 | viewController: (UIViewController*)vc { 41 | UIAlertController* alert = [UIAlertController alertControllerWithTitle: title 42 | message: description 43 | preferredStyle: UIAlertControllerStyleAlert]; 44 | 45 | UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil) style:UIAlertActionStyleCancel 46 | handler:^(UIAlertAction * action) {}]; 47 | [alert addAction: cancelAction]; 48 | 49 | UIAlertAction* confirmAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Confirm", nil) style:UIAlertActionStyleDefault 50 | handler:^(UIAlertAction * action) { 51 | [handler invoke]; 52 | }]; 53 | [alert addAction: confirmAction]; 54 | 55 | [vc presentViewController: alert animated: YES completion: nil]; 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /SelfControlIOS/SCAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCAppDelegate.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCMainViewController.h" 11 | 12 | @interface SCAppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | @property (nonatomic, weak) SCMainViewController *mainViewController; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /SelfControlIOS/SCAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCAppDelegate.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCAppDelegate.h" 10 | 11 | @implementation SCAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 14 | SCMainViewController *mainViewController = [SCMainViewController new]; 15 | self.mainViewController = mainViewController; 16 | 17 | UIWindow *window = [UIWindow new]; 18 | window.backgroundColor = [UIColor whiteColor]; 19 | window.rootViewController = mainViewController; 20 | [window makeKeyAndVisible]; 21 | self.window = window; 22 | 23 | // let bm = BlockManager() 24 | // bm.startBlock(); 25 | return YES; 26 | } 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application { 29 | // 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. 30 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 31 | } 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application { 34 | // 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. 35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 36 | } 37 | 38 | - (void)applicationWillEnterForeground:(UIApplication *)application { 39 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 40 | } 41 | 42 | - (void)applicationDidBecomeActive:(UIApplication *)application { 43 | // 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. 44 | } 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /SelfControlIOS/SCAppSelectorDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCAppSelectorDelegate.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 23/09/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCBlockRule.h" 11 | 12 | @protocol SCAppSelectorDelegate 13 | 14 | - (void)appRuleSelected:(SCBlockRule*)appRule; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SelfControlIOS/SCAppSelectorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCAppSelectorViewController.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 06/08/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCBlockListViewController.h" 11 | #import "SCBlockManager.h" 12 | #import "SCAppSelectorDelegate.h" 13 | 14 | @interface SCAppSelectorViewController : UITableViewController 15 | 16 | @property (weak) id delegate; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /SelfControlIOS/SCBlockListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCBlockListViewController.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCBlockRule.h" 11 | #import "SCAppSelectorDelegate.h" 12 | 13 | @interface SCBlockListViewController : UITableViewController 14 | 15 | - (void)addRulesToList:(NSArray*)rules type:(SCBlockType)type; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /SelfControlIOS/SCBlockManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCBlockManager.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCBlockRule.h" 10 | 11 | typedef void(^completion)(NSError* _Nonnull); 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface SCBlockManager : NSObject 16 | 17 | + (SCBlockManager *)sharedManager; 18 | 19 | - (void)startBlock:(completion)done; 20 | 21 | - (NSInteger)addBlockRules:(NSArray *)blockRules type:(SCBlockType)type; 22 | - (BOOL)addBlockRule:(SCBlockRule*)blockRule type:(SCBlockType)type; 23 | - (void)removeBlockRuleAtIndex:(NSUInteger)index type:(SCBlockType)type; 24 | - (NSArray*)blockRulesOfType:(SCBlockType)type; 25 | - (void)setBlockRules:(NSArray*)blockRules type:(SCBlockType)type; 26 | - (void)extendBlockDuration:(NSInteger)seconds; 27 | 28 | @property (nonatomic, copy) NSArray *appBlockRules; 29 | @property (nonatomic, copy) NSArray *hostBlockRules; 30 | @property (nonatomic, readonly) NSDate* blockEndDate; 31 | @property (nonatomic, readonly) BOOL blockIsRunning; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /SelfControlIOS/SCBlockRule.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCBlockRule.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | typedef NS_ENUM(NSInteger, SCBlockRuleFilterAction) { 14 | SCBlockRuleFilterActionBlock, 15 | SCBlockRuleFilterActionAllow, 16 | SCBlockRuleFilterActionNeedMoreRulesAndBlock, 17 | SCBlockRuleFilterActionNeedMoreRulesAndAllow, 18 | SCBlockRuleFilterActionNeedMoreRulesFromDataAndBlock, 19 | SCBlockRuleFilterActionNeedMoreRulesFromDataAndAllow, 20 | SCBlockRuleFilterActionExamineData, 21 | SCBlockRuleFilterActionRedirectToSafeURL, 22 | SCBlockRuleFilterActionRemediate 23 | }; 24 | 25 | typedef NS_ENUM(NSInteger, SCBlockType) { 26 | SCBlockTypeApp, 27 | SCBlockTypeHost 28 | }; 29 | 30 | extern NSString *SCBlockRuleFilterActionGetDescription(SCBlockRuleFilterAction action); 31 | 32 | @interface SCBlockRule : NSObject 33 | 34 | - (instancetype)initWithHostname:(NSString *)hostname; 35 | + (instancetype)ruleWithHostname:(NSString*) hostname; 36 | 37 | + (instancetype)ruleWithAppDict:(NSDictionary *)appDict; 38 | - (instancetype)initWithAppDict:(NSDictionary *)appDict; 39 | 40 | @property (nonatomic, readonly) NSString* type; 41 | @property (nonatomic, readonly) NSString *hostname; 42 | @property (nonatomic, readonly) NSDictionary* appDict; 43 | 44 | - (NSDictionary *)filterRuleDictionary; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /SelfControlIOS/SCBlockRule.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCBlockRule.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCBlockRule.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | NSString *SCBlockRuleFilterActionGetDescription(SCBlockRuleFilterAction action) { 14 | switch (action) { 15 | case SCBlockRuleFilterActionBlock: return @"Block"; 16 | case SCBlockRuleFilterActionExamineData: return @"Examine Data"; 17 | case SCBlockRuleFilterActionNeedMoreRulesAndAllow: return @"Ask for more rules, then allow"; 18 | case SCBlockRuleFilterActionNeedMoreRulesAndBlock: return @"Ask for more rules, then block"; 19 | case SCBlockRuleFilterActionNeedMoreRulesFromDataAndAllow: return @"Ask for more rules, examine data, then allow"; 20 | case SCBlockRuleFilterActionNeedMoreRulesFromDataAndBlock: return @"Ask for more rules, examine data, then block"; 21 | case SCBlockRuleFilterActionRedirectToSafeURL: return @"Redirect"; 22 | case SCBlockRuleFilterActionRemediate: return @"Remediate"; 23 | case SCBlockRuleFilterActionAllow: return @"Allow"; 24 | } 25 | } 26 | 27 | @implementation SCBlockRule 28 | 29 | + (instancetype)ruleWithHostname:(NSString *)hostname { 30 | return [[SCBlockRule alloc] initWithHostname: hostname]; 31 | } 32 | 33 | - (instancetype)initWithHostname:(NSString *)hostname { 34 | self = [super init]; 35 | if (!self) 36 | return nil; 37 | 38 | _hostname = [hostname copy]; 39 | _type = @"hostname"; 40 | _appDict = [NSDictionary dictionary]; 41 | 42 | return self; 43 | } 44 | 45 | + (instancetype)ruleWithAppDict:(NSDictionary *)appDict { 46 | return [[SCBlockRule alloc] initWithAppDict: appDict]; 47 | } 48 | 49 | - (instancetype)initWithAppDict:(NSDictionary *)appDict { 50 | self = [super init]; 51 | if (!self) 52 | return nil; 53 | 54 | _appDict = [appDict copy]; 55 | _type = @"app"; 56 | 57 | return self; 58 | } 59 | 60 | - (NSDictionary *)filterRuleDictionary { 61 | return @{ 62 | @"kRule": @(SCBlockRuleFilterActionBlock), 63 | @"kRemediationKey": @"Remediate1", 64 | @"type": self.type, 65 | @"appDict": self.appDict 66 | }; 67 | } 68 | 69 | @end 70 | 71 | NS_ASSUME_NONNULL_END 72 | 73 | -------------------------------------------------------------------------------- /SelfControlIOS/SCBlockRuleTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCBlockRuleTableViewCell.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol SCBlockRuleTableViewCellDelegate; 12 | 13 | @interface SCBlockRuleTableViewCell : UITableViewCell 14 | 15 | @property (nonatomic, weak) id delegate; 16 | @property (nonatomic, weak, readonly) UITextField *textField; 17 | 18 | @end 19 | 20 | @protocol SCBlockRuleTableViewCellDelegate 21 | 22 | - (void)blockRuleCellDidChange:(SCBlockRuleTableViewCell *)cell; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /SelfControlIOS/SCBlockRuleTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCBlockRuleTableViewCell.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCBlockRuleTableViewCell.h" 10 | 11 | @interface SCBlockRuleTableViewCell () 12 | 13 | @end 14 | 15 | @implementation SCBlockRuleTableViewCell 16 | 17 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 18 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 19 | if (!self) 20 | return nil; 21 | 22 | UIView *contentView = self.contentView; 23 | 24 | UITextField *textField = [UITextField new]; 25 | textField.translatesAutoresizingMaskIntoConstraints = NO; 26 | textField.keyboardType = UIKeyboardTypeURL; 27 | textField.returnKeyType = UIReturnKeyDone; 28 | textField.autocapitalizationType = UITextAutocapitalizationTypeNone; 29 | textField.autocorrectionType = UITextAutocorrectionTypeNo; 30 | textField.delegate = self; 31 | textField.placeholder = @"example.com"; 32 | [contentView addSubview:textField]; 33 | _textField = textField; 34 | 35 | [NSLayoutConstraint activateConstraints:@[ 36 | [NSLayoutConstraint constraintWithItem:textField attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:contentView attribute:NSLayoutAttributeLeadingMargin multiplier:1.0f constant:0.0f], 37 | [NSLayoutConstraint constraintWithItem:textField attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:contentView attribute:NSLayoutAttributeTrailingMargin multiplier:1.0f constant:0.0f], 38 | [NSLayoutConstraint constraintWithItem:textField attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:contentView attribute:NSLayoutAttributeTop multiplier:1.0f constant:0.0f], 39 | [NSLayoutConstraint constraintWithItem:textField attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:contentView attribute:NSLayoutAttributeBottom multiplier:1.0f constant:0.0f] 40 | ]]; 41 | 42 | return self; 43 | } 44 | 45 | #pragma mark - UITextFieldDelegate 46 | 47 | - (void)textFieldDidEndEditing:(UITextField *)textField { 48 | [self.delegate blockRuleCellDidChange:self]; 49 | } 50 | 51 | - (BOOL)textFieldShouldReturn:(UITextField *)textField { 52 | [textField resignFirstResponder]; 53 | [(UITableViewController*)self.delegate setEditing: NO animated: YES]; 54 | return NO; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /SelfControlIOS/SCImportSitesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCImportSitesViewController.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 04/07/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCBlockListViewController.h" 11 | 12 | @interface SCImportSitesViewController : UITableViewController 13 | 14 | @property (weak) SCBlockListViewController* blockListViewController; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SelfControlIOS/SCMainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCMainViewController.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SCMainViewController : UINavigationController 12 | 13 | - (void)reloadViewControllers; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SelfControlIOS/SCMainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCMainViewController.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCMainViewController.h" 10 | #import "SCStartViewController.h" 11 | #import "SCTimerViewController.h" 12 | #import "SCBlockManager.h" 13 | 14 | @interface SCMainViewController () 15 | 16 | @property (nonatomic, strong) SCStartViewController* startViewController; 17 | @property (nonatomic, strong) SCTimerViewController* timerViewController; 18 | 19 | @end 20 | 21 | @implementation SCMainViewController 22 | 23 | - (instancetype)init { 24 | self = [super init]; 25 | if (!self) 26 | return nil; 27 | 28 | _startViewController = [SCStartViewController new]; 29 | _timerViewController = [SCTimerViewController new]; 30 | 31 | [self reloadViewControllers]; 32 | 33 | return self; 34 | } 35 | 36 | - (void)reloadViewControllers { 37 | // if block running, root view controller = timer, otherwise = start 38 | if ([SCBlockManager sharedManager].blockIsRunning) { 39 | self.viewControllers = @[self.timerViewController]; 40 | } else { 41 | self.viewControllers = @[self.startViewController]; 42 | } 43 | 44 | self.navigationBarHidden = YES; 45 | } 46 | 47 | - (void)viewDidLoad { 48 | [super viewDidLoad]; 49 | // Do any additional setup after loading the view. 50 | } 51 | 52 | - (void)didReceiveMemoryWarning { 53 | [super didReceiveMemoryWarning]; 54 | // Dispose of any resources that can be recreated. 55 | } 56 | 57 | /* 58 | #pragma mark - Navigation 59 | 60 | // In a storyboard-based application, you will often want to do a little preparation before navigation 61 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 62 | // Get the new view controller using [segue destinationViewController]. 63 | // Pass the selected object to the new view controller. 64 | } 65 | */ 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /SelfControlIOS/SCStartViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCStartViewController.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SCStartViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SelfControlIOS/SCTimeIntervalFormatter.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCTimeIntervalFormatter.h 3 | // SelfControl 4 | // 5 | // Created by Sam Stigler on 10/14/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | /** 12 | Formats a time interval (provided in seconds wrapped in an NSNumber). 13 | 14 | @discussion This is a façade that will allow us to conditionally take advantage of better time 15 | interval formatting methods as they become available. 16 | */ 17 | 18 | @interface SCTimeIntervalFormatter : NSFormatter 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /SelfControlIOS/SCTimeIntervalFormatter.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCTimeIntervalFormatter.m 3 | // SelfControl 4 | // 5 | // Created by Sam Stigler on 10/14/14. 6 | // 7 | // 8 | 9 | #import 10 | #import "SCTimeIntervalFormatter.h" 11 | 12 | @implementation SCTimeIntervalFormatter 13 | 14 | - (NSString *)stringForObjectValue:(id)obj { 15 | NSString* string = @""; 16 | if ([obj isKindOfClass:[NSNumber class]]) { 17 | string = [self formatSeconds:[obj doubleValue]]; 18 | } 19 | 20 | return string; 21 | } 22 | 23 | - (NSString *)formatSeconds:(NSTimeInterval)seconds { 24 | static TTTTimeIntervalFormatter* timeIntervalFormatter = nil; 25 | if (timeIntervalFormatter == nil) { 26 | timeIntervalFormatter = [[TTTTimeIntervalFormatter alloc] init]; 27 | timeIntervalFormatter.pastDeicticExpression = @""; 28 | timeIntervalFormatter.presentDeicticExpression = @""; 29 | timeIntervalFormatter.futureDeicticExpression = @""; 30 | timeIntervalFormatter.significantUnits = (NSCalendarUnitYear | 31 | NSCalendarUnitMonth | 32 | NSCalendarUnitDay | 33 | NSCalendarUnitHour | 34 | NSCalendarUnitMinute); 35 | timeIntervalFormatter.numberOfSignificantUnits = 0; 36 | timeIntervalFormatter.leastSignificantUnit = NSCalendarUnitMinute; 37 | } 38 | 39 | NSString* formatted = [timeIntervalFormatter stringForTimeInterval:seconds]; 40 | if ([formatted length] == 0) { 41 | formatted = [self stringIndicatingZeroMinutes]; 42 | } 43 | 44 | return formatted; 45 | } 46 | 47 | - (NSString *)stringIndicatingZeroMinutes { 48 | NSString* disabledString = [NSString stringWithFormat: @"0 %@ (%@)", 49 | NSLocalizedString(@"minutes", @"Plural minutes time string"), 50 | NSLocalizedString(@"disabled", "Shows that SelfControl is disabled")]; 51 | return disabledString; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /SelfControlIOS/SCTimerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCTimerViewController.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCAppSelectorDelegate.h" 11 | 12 | @interface SCTimerViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /SelfControlIOS/SCUtils+SCViewUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCUtils+SCViewUtils.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 23/09/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCUtils.h" 10 | 11 | // This needs to be a separate category from the normal SCUtils because SCUtils is used in the filter extension binaries, 12 | // and therefore can't link to any classes that aren't included in the filter extension 13 | 14 | @interface SCUtils (SCViewUtils) 15 | 16 | + (NSString*)blockListSummaryString; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /SelfControlIOS/SCUtils+SCViewUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCUtils+SCViewUtils.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 23/09/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "SCUtils+SCViewUtils.h" 10 | #import "SCBlockManager.h" 11 | 12 | @implementation SCUtils (SCViewUtils) 13 | 14 | + (NSString*)blockListSummaryString { 15 | NSInteger appsBlocked = [SCBlockManager sharedManager].appBlockRules.count; 16 | NSInteger sitesBlocked = [SCBlockManager sharedManager].hostBlockRules.count; 17 | 18 | NSString* appsString = [NSString localizedStringWithFormat: NSLocalizedString(@"%lu app(s)", @"%{number of blocked apps} app(s)"), (unsigned long)appsBlocked]; 19 | NSString* sitesString = [NSString localizedStringWithFormat: NSLocalizedString(@"%lu site(s)", @"{number of blocked sites} site(s)"), (unsigned long)sitesBlocked]; 20 | 21 | if (!appsBlocked && !sitesBlocked) { 22 | return NSLocalizedString(@"Nothing", nil); 23 | } else if (appsBlocked && sitesBlocked) { 24 | return [NSString localizedStringWithFormat: NSLocalizedString(@"%@ and %@", @"{num blocked apps} apps and {num blocked sites} sites"), appsString, sitesString]; 25 | } else if (appsBlocked) { 26 | return appsString; 27 | } else { 28 | // only sitesBlocked 29 | return sitesString; 30 | } 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /SelfControlIOS/SCUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCUtils.h 3 | // 4 | // 5 | // Created by Charles Stigler on 08/05/2017. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface SCUtils : NSObject 12 | 13 | + (NSString*)stringWithoutRegexSpecialChars:(NSString*)input; 14 | + (NSDictionary*)appDictForBundleId:(NSString*)bundleId; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /SelfControlIOS/SCUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SCUtils.m 3 | // 4 | // 5 | // Created by Charles Stigler on 08/05/2017. 6 | // 7 | // 8 | 9 | #import "SCUtils.h" 10 | 11 | @implementation SCUtils 12 | 13 | + (NSString*)stringWithoutRegexSpecialChars:(NSString*)input { 14 | return [input stringByReplacingOccurrencesOfString: @"[\\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)\\[\\{]" 15 | withString: @"\\\\$0" 16 | options: NSRegularExpressionSearch 17 | range: (NSRange){0, [input length]}]; 18 | // return [input stringByR (of: "[\\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)\\[\\{]", 19 | // with: "\\\\$0", 20 | // options: .regularExpression) 21 | } 22 | 23 | + (NSDictionary*)appNameDict { 24 | return @{ 25 | @"com.facebook.Facebook": NSLocalizedString(@"Facebook", nil), 26 | @"com.facebook.Messenger": NSLocalizedString(@"Facebook Messenger", nil), 27 | @"com.apple.mobilesafari": NSLocalizedString(@"Safari", nil), 28 | @"com.google.chrome.ios": NSLocalizedString(@"Chrome", nil), 29 | @"com.atebits.Tweetie2": NSLocalizedString(@"Twitter", nil), 30 | @"com.burbn.instagram": NSLocalizedString(@"Instagram", nil), 31 | @"com.toyopagroup.picaboo": NSLocalizedString(@"Snapchat", nil), 32 | @"com.youtube.ios.youtube": NSLocalizedString(@"YouTube", nil), 33 | @"com.netflix.Netflix": NSLocalizedString(@"Netflix", nil), 34 | @"com.spotify.client": NSLocalizedString(@"Spotify", nil), 35 | @"com.dotgears.flap": NSLocalizedString(@"Flappy Bird", nil), 36 | @"com.9gag.ios.mobile": NSLocalizedString(@"9GAG", nil), 37 | @"com.google.Gmail": NSLocalizedString(@"Gmail", nil), 38 | @"com.google.inbox": NSLocalizedString(@"Google Inbox", nil), 39 | @"com.medium.reader": NSLocalizedString(@"Medium", nil), 40 | @"com.tyanya.reddit": NSLocalizedString(@"Reddit", nil), 41 | @"com.cardify.tinder": NSLocalizedString(@"Tinder", nil), 42 | @"com.tumblr.tumblr": NSLocalizedString(@"Tumblr", nil), 43 | @"com.nianticlabs.pokemongo": NSLocalizedString(@"Pokemon Go", nil) 44 | }; 45 | } 46 | 47 | + (NSDictionary*)appDictForBundleId:(NSString*)bundleId { 48 | return @{ 49 | @"name": [[SCUtils appNameDict] objectForKey: bundleId], 50 | @"bundleId": bundleId 51 | }; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /SelfControlIOS/SelfControlIOS-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "SCBlockRule.h" 6 | #import "SCUtils.h" 7 | -------------------------------------------------------------------------------- /SelfControlIOS/SelfControlIOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.networking.networkextension 6 | 7 | packet-tunnel-provider 8 | app-proxy-provider 9 | content-filter-provider 10 | 11 | com.apple.security.application-groups 12 | 13 | group.com.selfcontrolapp.SelfControlIOS 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SelfControlIOS/UIButton+SCButtons.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+SCButtons.h 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 23/09/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIButton (SCButtons) 12 | 13 | + (UIButton*)scActionButton; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SelfControlIOS/UIButton+SCButtons.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+SCButtons.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 23/09/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import "UIButton+SCButtons.h" 10 | #import 11 | 12 | @implementation UIButton (SCButtons) 13 | 14 | + (UIButton*)scActionButton; { 15 | UIButton* actionButton = [UIButton buttonWithType: UIButtonTypeSystem]; 16 | actionButton.titleLabel.font = [UIFont systemFontOfSize: 24.0]; 17 | [actionButton setTitleColor: [UIColor whiteColor] forState: UIControlStateNormal]; 18 | actionButton.backgroundColor = [UIColor colorWithRed: (68.0 / 255.0) green: (108.0 / 255.0) blue: (179.0 / 255.0) alpha: 1]; 19 | [actionButton setTitleColor: [UIColor lightGrayColor] forState: UIControlStateDisabled]; 20 | 21 | // add drop shadow 22 | actionButton.layer.shadowRadius = 1.5f; 23 | actionButton.layer.shadowColor = [UIColor blackColor].CGColor; 24 | actionButton.layer.shadowOffset = CGSizeMake(0.0f, 1.0f); 25 | actionButton.layer.shadowOpacity = 0.3f; 26 | actionButton.layer.masksToBounds = NO; 27 | 28 | [actionButton mas_makeConstraints:^(MASConstraintMaker *make) { 29 | make.height.equalTo(@60); 30 | }]; 31 | 32 | // darken button when pressed 33 | [actionButton addTarget: self action: @selector(scActionButtonHighlight:) forControlEvents: UIControlEventTouchDown]; 34 | [actionButton addTarget: self action: @selector(scActionButtonUnHighlight:) forControlEvents: UIControlEventTouchUpInside|UIControlEventTouchUpOutside|UIControlEventTouchDragExit]; 35 | 36 | return actionButton; 37 | } 38 | + (void)scActionButtonHighlight:(UIButton*)button { 39 | button.backgroundColor = [UIColor colorWithRed: (48.0 / 255.0) green: (88.0 / 255.0) blue: (159.0 / 255.0) alpha: 1]; 40 | } 41 | + (void)scActionButtonUnHighlight:(UIButton*)button { 42 | button.backgroundColor = [UIColor colorWithRed: (68.0 / 255.0) green: (108.0 / 255.0) blue: (179.0 / 255.0) alpha: 1]; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /SelfControlIOS/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SelfControlIOS 4 | // 5 | // Created by Charles Stigler on 25/02/2017. 6 | // Copyright © 2017 SelfControl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([SCAppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SelfControlIOSTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SelfControlIOSTests/SelfControlIOSTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SelfControlIOSTests.swift 3 | // SelfControlIOSTests 4 | // 5 | // Created by Charles Stigler on 12/24/16. 6 | // Copyright © 2016 SelfControl. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SelfControlIOS 11 | 12 | class SelfControlIOSTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /SelfControlIOSUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SelfControlIOSUITests/SelfControlIOSUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SelfControlIOSUITests.swift 3 | // SelfControlIOSUITests 4 | // 5 | // Created by Charles Stigler on 12/24/16. 6 | // Copyright © 2016 SelfControl. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SelfControlIOSUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------