├── .gitignore ├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Example.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Podfile ├── Podfile.lock ├── Pods │ ├── JDToaster │ │ ├── JDToaster │ │ │ └── Source │ │ │ │ ├── Toast.swift │ │ │ │ ├── ToastPresentationController.swift │ │ │ │ └── ToastViewController.swift │ │ ├── LICENSE │ │ └── README.md │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── JDToaster │ │ ├── JDToaster-Info.plist │ │ ├── JDToaster-dummy.m │ │ ├── JDToaster-prefix.pch │ │ ├── JDToaster-umbrella.h │ │ ├── JDToaster.modulemap │ │ └── JDToaster.xcconfig │ │ └── Pods-Example │ │ ├── Pods-Example-Info.plist │ │ ├── Pods-Example-acknowledgements.markdown │ │ ├── Pods-Example-acknowledgements.plist │ │ ├── Pods-Example-dummy.m │ │ ├── Pods-Example-frameworks-Debug-input-files.xcfilelist │ │ ├── Pods-Example-frameworks-Debug-output-files.xcfilelist │ │ ├── Pods-Example-frameworks-Release-input-files.xcfilelist │ │ ├── Pods-Example-frameworks-Release-output-files.xcfilelist │ │ ├── Pods-Example-frameworks.sh │ │ ├── Pods-Example-umbrella.h │ │ ├── Pods-Example.debug.xcconfig │ │ ├── Pods-Example.modulemap │ │ └── Pods-Example.release.xcconfig └── Toaster │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Images ├── Screenshot 2019-06-12 at 13.42.30.png ├── Screenshot 2019-06-12 at 13.49.16.png ├── Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.41.31.png ├── Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.41.50.png └── Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.42.20.png ├── JDToaster.podspec ├── JDToaster.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── JDToaster ├── Info.plist ├── JDToaster.h └── Source │ ├── Toast.swift │ ├── ToastPresentationController.swift │ └── ToastViewController.swift ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 05854842E93F8E20D1FECEF4 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C970D902400F166FF809B748 /* Pods_Example.framework */; }; 11 | 2CB504BE229BFD7200055994 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CB504BD229BFD7200055994 /* AppDelegate.swift */; }; 12 | 2CB504C0229BFD7200055994 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CB504BF229BFD7200055994 /* ViewController.swift */; }; 13 | 2CB504C3229BFD7200055994 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CB504C1229BFD7200055994 /* Main.storyboard */; }; 14 | 2CB504C5229BFD7400055994 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CB504C4229BFD7400055994 /* Assets.xcassets */; }; 15 | 2CB504C8229BFD7400055994 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CB504C6229BFD7400055994 /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 2CB504BA229BFD7200055994 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 2CB504BD229BFD7200055994 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 21 | 2CB504BF229BFD7200055994 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 22 | 2CB504C2229BFD7200055994 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | 2CB504C4229BFD7400055994 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | 2CB504C7229BFD7400055994 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 25 | 2CB504C9229BFD7400055994 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | 630FD5AB711A1F7F39AA1DD7 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; 27 | C970D902400F166FF809B748 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | F43BF8E2632422ECE159D8DB /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 2CB504B7229BFD7200055994 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 05854842E93F8E20D1FECEF4 /* Pods_Example.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 2267224ABF632E06D894FF31 /* Pods */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | 630FD5AB711A1F7F39AA1DD7 /* Pods-Example.debug.xcconfig */, 47 | F43BF8E2632422ECE159D8DB /* Pods-Example.release.xcconfig */, 48 | ); 49 | name = Pods; 50 | path = Pods; 51 | sourceTree = ""; 52 | }; 53 | 2CB504B1229BFD7200055994 = { 54 | isa = PBXGroup; 55 | children = ( 56 | 2CB504BC229BFD7200055994 /* Toaster */, 57 | 2CB504BB229BFD7200055994 /* Products */, 58 | 2267224ABF632E06D894FF31 /* Pods */, 59 | EF06B903C5DD23877311656B /* Frameworks */, 60 | ); 61 | sourceTree = ""; 62 | }; 63 | 2CB504BB229BFD7200055994 /* Products */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | 2CB504BA229BFD7200055994 /* Example.app */, 67 | ); 68 | name = Products; 69 | sourceTree = ""; 70 | }; 71 | 2CB504BC229BFD7200055994 /* Toaster */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 2CB504BD229BFD7200055994 /* AppDelegate.swift */, 75 | 2CB504BF229BFD7200055994 /* ViewController.swift */, 76 | 2CB504C1229BFD7200055994 /* Main.storyboard */, 77 | 2CB504C4229BFD7400055994 /* Assets.xcassets */, 78 | 2CB504C6229BFD7400055994 /* LaunchScreen.storyboard */, 79 | 2CB504C9229BFD7400055994 /* Info.plist */, 80 | ); 81 | path = Toaster; 82 | sourceTree = ""; 83 | }; 84 | EF06B903C5DD23877311656B /* Frameworks */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | C970D902400F166FF809B748 /* Pods_Example.framework */, 88 | ); 89 | name = Frameworks; 90 | sourceTree = ""; 91 | }; 92 | /* End PBXGroup section */ 93 | 94 | /* Begin PBXNativeTarget section */ 95 | 2CB504B9229BFD7200055994 /* Example */ = { 96 | isa = PBXNativeTarget; 97 | buildConfigurationList = 2CB504CC229BFD7400055994 /* Build configuration list for PBXNativeTarget "Example" */; 98 | buildPhases = ( 99 | 391FDF01F5DAAF2DD1C3DDB9 /* [CP] Check Pods Manifest.lock */, 100 | 2CB504B6229BFD7200055994 /* Sources */, 101 | 2CB504B7229BFD7200055994 /* Frameworks */, 102 | 2CB504B8229BFD7200055994 /* Resources */, 103 | BC71A4C95E4C5CA4B3EB2CF4 /* [CP] Embed Pods Frameworks */, 104 | ); 105 | buildRules = ( 106 | ); 107 | dependencies = ( 108 | ); 109 | name = Example; 110 | productName = Toaster; 111 | productReference = 2CB504BA229BFD7200055994 /* Example.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | 2CB504B2229BFD7200055994 /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 1020; 121 | LastUpgradeCheck = 1020; 122 | ORGANIZATIONNAME = disho; 123 | TargetAttributes = { 124 | 2CB504B9229BFD7200055994 = { 125 | CreatedOnToolsVersion = 10.2.1; 126 | }; 127 | }; 128 | }; 129 | buildConfigurationList = 2CB504B5229BFD7200055994 /* Build configuration list for PBXProject "Example" */; 130 | compatibilityVersion = "Xcode 9.3"; 131 | developmentRegion = en; 132 | hasScannedForEncodings = 0; 133 | knownRegions = ( 134 | en, 135 | Base, 136 | ); 137 | mainGroup = 2CB504B1229BFD7200055994; 138 | productRefGroup = 2CB504BB229BFD7200055994 /* Products */; 139 | projectDirPath = ""; 140 | projectRoot = ""; 141 | targets = ( 142 | 2CB504B9229BFD7200055994 /* Example */, 143 | ); 144 | }; 145 | /* End PBXProject section */ 146 | 147 | /* Begin PBXResourcesBuildPhase section */ 148 | 2CB504B8229BFD7200055994 /* Resources */ = { 149 | isa = PBXResourcesBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | 2CB504C8229BFD7400055994 /* LaunchScreen.storyboard in Resources */, 153 | 2CB504C5229BFD7400055994 /* Assets.xcassets in Resources */, 154 | 2CB504C3229BFD7200055994 /* Main.storyboard in Resources */, 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXResourcesBuildPhase section */ 159 | 160 | /* Begin PBXShellScriptBuildPhase section */ 161 | 391FDF01F5DAAF2DD1C3DDB9 /* [CP] Check Pods Manifest.lock */ = { 162 | isa = PBXShellScriptBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | ); 166 | inputFileListPaths = ( 167 | ); 168 | inputPaths = ( 169 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 170 | "${PODS_ROOT}/Manifest.lock", 171 | ); 172 | name = "[CP] Check Pods Manifest.lock"; 173 | outputFileListPaths = ( 174 | ); 175 | outputPaths = ( 176 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | shellPath = /bin/sh; 180 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 181 | showEnvVarsInLog = 0; 182 | }; 183 | BC71A4C95E4C5CA4B3EB2CF4 /* [CP] Embed Pods Frameworks */ = { 184 | isa = PBXShellScriptBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | ); 188 | inputFileListPaths = ( 189 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist", 190 | ); 191 | name = "[CP] Embed Pods Frameworks"; 192 | outputFileListPaths = ( 193 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist", 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | shellPath = /bin/sh; 197 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; 198 | showEnvVarsInLog = 0; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 2CB504B6229BFD7200055994 /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 2CB504C0229BFD7200055994 /* ViewController.swift in Sources */, 208 | 2CB504BE229BFD7200055994 /* AppDelegate.swift in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 2CB504C1229BFD7200055994 /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 2CB504C2229BFD7200055994 /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 2CB504C6229BFD7400055994 /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 2CB504C7229BFD7400055994 /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 2CB504CA229BFD7400055994 /* Debug */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 240 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 241 | CLANG_CXX_LIBRARY = "libc++"; 242 | CLANG_ENABLE_MODULES = YES; 243 | CLANG_ENABLE_OBJC_ARC = YES; 244 | CLANG_ENABLE_OBJC_WEAK = YES; 245 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 246 | CLANG_WARN_BOOL_CONVERSION = YES; 247 | CLANG_WARN_COMMA = YES; 248 | CLANG_WARN_CONSTANT_CONVERSION = YES; 249 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 250 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 251 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 252 | CLANG_WARN_EMPTY_BODY = YES; 253 | CLANG_WARN_ENUM_CONVERSION = YES; 254 | CLANG_WARN_INFINITE_RECURSION = YES; 255 | CLANG_WARN_INT_CONVERSION = YES; 256 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 257 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 258 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 259 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 260 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 261 | CLANG_WARN_STRICT_PROTOTYPES = YES; 262 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 263 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 264 | CLANG_WARN_UNREACHABLE_CODE = YES; 265 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 266 | CODE_SIGN_IDENTITY = "iPhone Developer"; 267 | COPY_PHASE_STRIP = NO; 268 | DEBUG_INFORMATION_FORMAT = dwarf; 269 | ENABLE_STRICT_OBJC_MSGSEND = YES; 270 | ENABLE_TESTABILITY = YES; 271 | GCC_C_LANGUAGE_STANDARD = gnu11; 272 | GCC_DYNAMIC_NO_PIC = NO; 273 | GCC_NO_COMMON_BLOCKS = YES; 274 | GCC_OPTIMIZATION_LEVEL = 0; 275 | GCC_PREPROCESSOR_DEFINITIONS = ( 276 | "DEBUG=1", 277 | "$(inherited)", 278 | ); 279 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 280 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 281 | GCC_WARN_UNDECLARED_SELECTOR = YES; 282 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 283 | GCC_WARN_UNUSED_FUNCTION = YES; 284 | GCC_WARN_UNUSED_VARIABLE = YES; 285 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 286 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 287 | MTL_FAST_MATH = YES; 288 | ONLY_ACTIVE_ARCH = YES; 289 | SDKROOT = iphoneos; 290 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 291 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 292 | }; 293 | name = Debug; 294 | }; 295 | 2CB504CB229BFD7400055994 /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ALWAYS_SEARCH_USER_PATHS = NO; 299 | CLANG_ANALYZER_NONNULL = YES; 300 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 301 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 302 | CLANG_CXX_LIBRARY = "libc++"; 303 | CLANG_ENABLE_MODULES = YES; 304 | CLANG_ENABLE_OBJC_ARC = YES; 305 | CLANG_ENABLE_OBJC_WEAK = YES; 306 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 307 | CLANG_WARN_BOOL_CONVERSION = YES; 308 | CLANG_WARN_COMMA = YES; 309 | CLANG_WARN_CONSTANT_CONVERSION = YES; 310 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 311 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 312 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 313 | CLANG_WARN_EMPTY_BODY = YES; 314 | CLANG_WARN_ENUM_CONVERSION = YES; 315 | CLANG_WARN_INFINITE_RECURSION = YES; 316 | CLANG_WARN_INT_CONVERSION = YES; 317 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 318 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 319 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 320 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 321 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 322 | CLANG_WARN_STRICT_PROTOTYPES = YES; 323 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 324 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 325 | CLANG_WARN_UNREACHABLE_CODE = YES; 326 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 327 | CODE_SIGN_IDENTITY = "iPhone Developer"; 328 | COPY_PHASE_STRIP = NO; 329 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 330 | ENABLE_NS_ASSERTIONS = NO; 331 | ENABLE_STRICT_OBJC_MSGSEND = YES; 332 | GCC_C_LANGUAGE_STANDARD = gnu11; 333 | GCC_NO_COMMON_BLOCKS = YES; 334 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 335 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 336 | GCC_WARN_UNDECLARED_SELECTOR = YES; 337 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 338 | GCC_WARN_UNUSED_FUNCTION = YES; 339 | GCC_WARN_UNUSED_VARIABLE = YES; 340 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 341 | MTL_ENABLE_DEBUG_INFO = NO; 342 | MTL_FAST_MATH = YES; 343 | SDKROOT = iphoneos; 344 | SWIFT_COMPILATION_MODE = wholemodule; 345 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 346 | VALIDATE_PRODUCT = YES; 347 | }; 348 | name = Release; 349 | }; 350 | 2CB504CD229BFD7400055994 /* Debug */ = { 351 | isa = XCBuildConfiguration; 352 | baseConfigurationReference = 630FD5AB711A1F7F39AA1DD7 /* Pods-Example.debug.xcconfig */; 353 | buildSettings = { 354 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 355 | CODE_SIGN_STYLE = Automatic; 356 | INFOPLIST_FILE = Toaster/Info.plist; 357 | LD_RUNPATH_SEARCH_PATHS = ( 358 | "$(inherited)", 359 | "@executable_path/Frameworks", 360 | ); 361 | PRODUCT_BUNDLE_IDENTIFIER = disho.Toaster; 362 | PRODUCT_NAME = "$(TARGET_NAME)"; 363 | SWIFT_VERSION = 5.0; 364 | TARGETED_DEVICE_FAMILY = "1,2"; 365 | }; 366 | name = Debug; 367 | }; 368 | 2CB504CE229BFD7400055994 /* Release */ = { 369 | isa = XCBuildConfiguration; 370 | baseConfigurationReference = F43BF8E2632422ECE159D8DB /* Pods-Example.release.xcconfig */; 371 | buildSettings = { 372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 373 | CODE_SIGN_STYLE = Automatic; 374 | INFOPLIST_FILE = Toaster/Info.plist; 375 | LD_RUNPATH_SEARCH_PATHS = ( 376 | "$(inherited)", 377 | "@executable_path/Frameworks", 378 | ); 379 | PRODUCT_BUNDLE_IDENTIFIER = disho.Toaster; 380 | PRODUCT_NAME = "$(TARGET_NAME)"; 381 | SWIFT_VERSION = 5.0; 382 | TARGETED_DEVICE_FAMILY = "1,2"; 383 | }; 384 | name = Release; 385 | }; 386 | /* End XCBuildConfiguration section */ 387 | 388 | /* Begin XCConfigurationList section */ 389 | 2CB504B5229BFD7200055994 /* Build configuration list for PBXProject "Example" */ = { 390 | isa = XCConfigurationList; 391 | buildConfigurations = ( 392 | 2CB504CA229BFD7400055994 /* Debug */, 393 | 2CB504CB229BFD7400055994 /* Release */, 394 | ); 395 | defaultConfigurationIsVisible = 0; 396 | defaultConfigurationName = Release; 397 | }; 398 | 2CB504CC229BFD7400055994 /* Build configuration list for PBXNativeTarget "Example" */ = { 399 | isa = XCConfigurationList; 400 | buildConfigurations = ( 401 | 2CB504CD229BFD7400055994 /* Debug */, 402 | 2CB504CE229BFD7400055994 /* Release */, 403 | ); 404 | defaultConfigurationIsVisible = 0; 405 | defaultConfigurationName = Release; 406 | }; 407 | /* End XCConfigurationList section */ 408 | }; 409 | rootObject = 2CB504B2229BFD7200055994 /* Project object */; 410 | } 411 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'Example' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for Example 9 | pod 'JDToaster' 10 | 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JDToaster (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - JDToaster 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - JDToaster 10 | 11 | SPEC CHECKSUMS: 12 | JDToaster: 2c6a67a058636c451ae04cb63b3a151ff9fe9e67 13 | 14 | PODFILE CHECKSUM: 127aa9bb088bc41f858acabefa73a9cf2c4ecbca 15 | 16 | COCOAPODS: 1.7.1 17 | -------------------------------------------------------------------------------- /Example/Pods/JDToaster/JDToaster/Source/Toast.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Toast.swift 3 | // JDToaster 4 | // 5 | // Created by Joan Disho on 12.06.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public final class Toast { 13 | public var backgroundColor: UIColor = .black 14 | public var font: UIFont = .systemFont(ofSize: 17, weight: .medium) 15 | public var textColor: UIColor = .white 16 | public var textInsets: UIEdgeInsets = UIEdgeInsets(top: 16.0, left: 16.0, bottom: 16.0, right: 16.0) 17 | public var cornerRadius: CGFloat = 8.0 18 | public var bottomPadding: CGFloat = 16.0 19 | public var minimumHorizontalPadding: CGFloat = 24.0 20 | 21 | public static let `default` = Toast() 22 | 23 | public func show(text: String, duration: Double) { 24 | dismiss(animated: true) 25 | 26 | let toaster = ToastViewController( 27 | configuration: ToastViewController.Configuration( 28 | text: text, 29 | backgroundColor: backgroundColor, 30 | font: font, 31 | textColor: textColor, 32 | textInsets: textInsets, 33 | cornerRadius: cornerRadius, 34 | bottomPadding: bottomPadding, 35 | minimumHorizontalPadding: minimumHorizontalPadding 36 | ) 37 | ) 38 | 39 | let window = UIWindow(frame: UIScreen.main.bounds) 40 | window.isUserInteractionEnabled = false 41 | 42 | let viewController = UIViewController() 43 | viewController.view.backgroundColor = .clear 44 | 45 | window.rootViewController = viewController 46 | window.windowLevel = UIWindow.Level.normal + 1 47 | window.makeKeyAndVisible() 48 | 49 | viewController.present(toaster, animated: true, completion: nil) 50 | } 51 | 52 | public func dismiss(animated: Bool, completion: (() -> Void)? = nil) { 53 | guard let rootViewController = UIApplication.shared.keyWindow?.rootViewController else { return } 54 | rootViewController.dismiss(animated: animated, completion: completion) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Example/Pods/JDToaster/JDToaster/Source/ToastPresentationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToastPresentationController.swift 3 | // JDToaster 4 | // 5 | // Created by Joan Disho on 12.06.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | final class ToastPresentationController: UIPresentationController { 13 | 14 | var bottomPadding: CGFloat = 0.0 15 | var minimumHorizontalPadding: CGFloat = 0.0 16 | 17 | override var frameOfPresentedViewInContainerView: CGRect { 18 | guard let containerView = containerView else { return .zero } 19 | guard let presentedView = presentedView else { return .zero } 20 | 21 | containerView.isUserInteractionEnabled = false 22 | 23 | let safeAreaFrame = containerView.bounds.inset(by: containerView.safeAreaInsets) 24 | 25 | let requiredFullWidthTargetSize = presentedView.systemLayoutSizeFitting( 26 | CGSize( 27 | width: safeAreaFrame.width - 2 * minimumHorizontalPadding, 28 | height: UIView.layoutFittingCompressedSize.height 29 | ), 30 | withHorizontalFittingPriority: .required, 31 | verticalFittingPriority: .defaultLow 32 | ) 33 | 34 | let defaultLowMinimumWidthTargetSize = presentedView.systemLayoutSizeFitting( 35 | UIView.layoutFittingCompressedSize, 36 | withHorizontalFittingPriority: .defaultLow, 37 | verticalFittingPriority: .defaultLow 38 | ) 39 | 40 | var frame = safeAreaFrame 41 | 42 | frame.origin.y += frame.size.height - requiredFullWidthTargetSize.height - bottomPadding 43 | 44 | if defaultLowMinimumWidthTargetSize.width > safeAreaFrame.width - 2 * minimumHorizontalPadding { 45 | frame.origin.x += minimumHorizontalPadding 46 | frame.size.width = requiredFullWidthTargetSize.width 47 | } else { 48 | frame.origin.x += (frame.size.width - defaultLowMinimumWidthTargetSize.width) / 2 49 | frame.size.width = defaultLowMinimumWidthTargetSize.width 50 | } 51 | 52 | frame.size.height = requiredFullWidthTargetSize.height 53 | 54 | return frame 55 | } 56 | 57 | override func containerViewDidLayoutSubviews() { 58 | super.containerViewDidLayoutSubviews() 59 | presentedView?.frame = frameOfPresentedViewInContainerView 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Example/Pods/JDToaster/JDToaster/Source/ToastViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToastViewController.swift 3 | // JDToaster 4 | // 5 | // Created by Joan Disho on 12.06.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | final class ToastViewController: UIViewController, UIViewControllerTransitioningDelegate { 13 | struct Configuration { 14 | let text: String 15 | let backgroundColor: UIColor 16 | let font: UIFont 17 | let textColor: UIColor 18 | let textInsets: UIEdgeInsets 19 | let cornerRadius: CGFloat 20 | let bottomPadding: CGFloat 21 | let minimumHorizontalPadding: CGFloat 22 | } 23 | 24 | private let configuration: Configuration 25 | 26 | private var cornerRadius: CGFloat { 27 | didSet { 28 | view.layoutSubviews() 29 | } 30 | } 31 | 32 | init(configuration: Configuration) { 33 | self.configuration = configuration 34 | cornerRadius = configuration.cornerRadius 35 | 36 | super.init(nibName: nil, bundle: nil) 37 | 38 | transitioningDelegate = self 39 | modalPresentationStyle = .custom 40 | 41 | view.backgroundColor = configuration.backgroundColor 42 | 43 | let label = UILabel() 44 | label.font = configuration.font 45 | label.textColor = configuration.textColor 46 | label.text = configuration.text 47 | label.numberOfLines = 0 48 | 49 | view.addSubview(label) 50 | label.translatesAutoresizingMaskIntoConstraints = false 51 | 52 | NSLayoutConstraint.activate([ 53 | label.topAnchor.constraint( 54 | equalTo: view.topAnchor, constant: configuration.textInsets.top), 55 | label.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -configuration.textInsets.bottom), 56 | label.widthAnchor.constraint(lessThanOrEqualTo: view.widthAnchor, constant: -(configuration.textInsets.left + configuration.textInsets.right)), 57 | label.centerXAnchor.constraint(equalTo: view.centerXAnchor) 58 | ]) 59 | } 60 | 61 | required init?(coder aDecoder: NSCoder) { 62 | fatalError("init(coder:) has not been implemented") 63 | } 64 | 65 | override func viewDidLayoutSubviews() { 66 | view.layer.roundCorners(radius: cornerRadius) 67 | } 68 | 69 | func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { 70 | let toastPresentationController = ToastPresentationController(presentedViewController: presented, presenting: presenting) 71 | toastPresentationController.bottomPadding = configuration.bottomPadding 72 | toastPresentationController.minimumHorizontalPadding = configuration.minimumHorizontalPadding 73 | return toastPresentationController 74 | } 75 | } 76 | 77 | private extension CALayer { 78 | func roundCorners(_ corners: UIRectCorner = .allCorners, radius: CGFloat) { 79 | let path = UIBezierPath( 80 | roundedRect: bounds, 81 | byRoundingCorners: corners, 82 | cornerRadii: CGSize(width: radius, height: radius) 83 | ) 84 | let mask = CAShapeLayer() 85 | mask.path = path.cgPath 86 | self.mask = mask 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Example/Pods/JDToaster/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Joan Disho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/Pods/JDToaster/README.md: -------------------------------------------------------------------------------- 1 | # 🍞 Toasty iOS alerts 2 | 3 |
4 | 5 | 6 | 7 |
8 | 9 | A toast provides simple feedback in the bottom of the screen about an operation in an popup, which only fills the required amount of space for the message. The current popup remains visible until it’s manully dismissed or automaticaly after a given timeout. It doesn't interupt the user experience and doesn't require any user input to dismiss. 10 | 11 | Similar to an `UIAlertController `, a toast is displayed in a separate `UIWindow`. 12 | This means that it’s presented on top of everything, regardless the view hierarchy. 13 | 14 | ## 🛠 Installation 15 | 16 | ### CocoaPods 17 | 18 | To integrate `JDToaster` into your Xcode project using `CocoaPods`, specify it in your `Podfile`: 19 | 20 | ```ruby 21 | pod 'JDToaster' 22 | ``` 23 | 24 | Then, run the following command: 25 | 26 | ```bash 27 | pod install 28 | ``` 29 | 30 | ### Manually 31 | If you prefer not to use any of the dependency managers, you can integrate `JDToaster` into your project manually, by downloading the source code and placing the files on your project directory. 32 | 33 | ## 👩‍💻 Usage 34 | 35 | ### The Basics 36 | 37 | #### Display a toast 38 | 39 | ```swift 40 | Toaster.default.show(text: “Hello Toast!”) 41 | ``` 42 | 43 | #### Dismiss a toast 44 | 45 | ```swift 46 | Toaster.default.dismiss(animated: true) 47 | ``` 48 | 49 | ### 🎨 Customizations 50 | 51 | | Property | Type | Default | Description | 52 | |----------------------------|----------------|------------------------------------------------------------------|--------------------------------------------------------------------| 53 | | `backgroundColor` | `UIColor` | `.black` | Background colour of the toast | 54 | | `font` | `UIFont` | `.systemFont(ofSize: 17, weight: .medium)` | Font of the presented text | 55 | | `textColor` | `UIColor` | `.white` | Colour of the presented text | 56 | | `textInsets` | `UIEdgeInsets` | `UIEdgeInsets(top: 16.0, left: 16.0, bottom: 16.0, right: 16.0)` | Insets of the text within the toast | 57 | | `cornerRadius` | `CGFloat` | `8.0` | Corner radius of the toast | 58 | | `bottomPadding` | `CGFloat` | `16.0` | The space between the toast bottom board and the bottom | 59 | | `minimumHorizontalPadding` | `CGFloat` | `24.0` | The minimum space between the toast left/right board and the view. | 60 | 61 | ## ✨ Example 62 | Checkout the [Example](https://github.com/jdisho/JDToaster/Example) project 63 | 64 |

65 | 66 | 67 | 68 |

69 | 70 | ## 🙏 Acknowledgments 71 | - [Toaster](https://github.com/devxoul/Toaster) by [@devxoul](https://twitter.com/devxoul) 72 | - [Squawk](https://github.com/GitHawkApp/Squawk) by [@_ryannystrom](https://twitter.com/_ryannystrom) 73 | - [Custom View Controller Presentation Tips & Tricks](https://kylebashour.com/posts/custom-view-controller-presentation-tips) by [@kylebshr](https://twitter.com/kylebshr) 74 | 75 | ## 🐨 Author 76 | This tiny library is created with ❤️ by [Joan Disho](https://twitter.com/_disho). 77 | 78 | ## 📃 License 79 | `JDToaster` is released under an MIT license. See [License.md](https://github.com/jdisho/JDToaster/blob/master/LICENSE) for more information. 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JDToaster (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - JDToaster 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - JDToaster 10 | 11 | SPEC CHECKSUMS: 12 | JDToaster: 2c6a67a058636c451ae04cb63b3a151ff9fe9e67 13 | 14 | PODFILE CHECKSUM: 127aa9bb088bc41f858acabefa73a9cf2c4ecbca 15 | 16 | COCOAPODS: 1.7.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 02683E502EFBB795371251CD105C17D3 /* ToastViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74B470D761BD905FFBEDA9DDBAC1B5DC /* ToastViewController.swift */; }; 11 | 1B9212720295D01E8447E56DA321AC62 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */; }; 12 | 29BBB5FB07172A4243C067D0AE76D2AC /* Pods-Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7825A90E082A1582EB16256B0E722B3F /* Pods-Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 43A2C352768FD8CBB12DFB917BA8E013 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 312B988EF117AE4DE76A268D970131FE /* UIKit.framework */; }; 14 | 43C6A355AD7DCD1F77B7F1B7EBA6CB5A /* JDToaster-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 86628FAF50DA35145DCEEDAB9A6530D4 /* JDToaster-dummy.m */; }; 15 | 5788353A439CE1645BF4E87F8937836A /* ToastPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF063B2EF2862B4C30EA968E55445120 /* ToastPresentationController.swift */; }; 16 | 70B1DA272634B26E521388BEC8611879 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF68899FD3B3F95A7F2C778B1A0BAC63 /* Toast.swift */; }; 17 | 897AED3845CFCB1EE347884568335BD3 /* JDToaster-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FE7EBA27D98BA5DDDC1BDE004FC5D24F /* JDToaster-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | AA53CE8800D9A590613593D55198A06E /* Pods-Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D6D7C498FA339E02BD53ECB8916CEA8E /* Pods-Example-dummy.m */; }; 19 | C1E0D7A1999A534EF9552AE652477BA5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | EE39762B6C8E794F90CC17D5AC8CC5DF /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = D12EA1C95B4D0CD0C95D67D004D5C02D; 28 | remoteInfo = JDToaster; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1F667CC0E19EAF34E5A4119E2121F585 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Example.framework; path = "Pods-Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 243410B9535472556EA4BB6DBC133A0D /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.release.xcconfig"; sourceTree = ""; }; 35 | 312B988EF117AE4DE76A268D970131FE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 36 | 31C1D37707DFAA5E6A164BCC07834264 /* Pods-Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-Info.plist"; sourceTree = ""; }; 37 | 35C305D3797C284E6F5BAA1D3E6F9BF8 /* Pods-Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Example.modulemap"; sourceTree = ""; }; 38 | 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 39 | 441854E35F81731E63E53DC7E4EEAD9D /* Pods-Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example-acknowledgements.markdown"; sourceTree = ""; }; 40 | 508324206141C392C1EF12C33E8C09A1 /* JDToaster-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "JDToaster-Info.plist"; sourceTree = ""; }; 41 | 74B470D761BD905FFBEDA9DDBAC1B5DC /* ToastViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToastViewController.swift; path = JDToaster/Source/ToastViewController.swift; sourceTree = ""; }; 42 | 7825A90E082A1582EB16256B0E722B3F /* Pods-Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example-umbrella.h"; sourceTree = ""; }; 43 | 82DFB06AD9F6ED9CCB3360ACCC2DE1E3 /* JDToaster-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JDToaster-prefix.pch"; sourceTree = ""; }; 44 | 86628FAF50DA35145DCEEDAB9A6530D4 /* JDToaster-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JDToaster-dummy.m"; sourceTree = ""; }; 45 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 46 | AFECBC24E09D0D25F822C27BD944AFD4 /* Pods-Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-frameworks.sh"; sourceTree = ""; }; 47 | B45138496B85A072654D1D0F8EBBEDE5 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.debug.xcconfig"; sourceTree = ""; }; 48 | C74AD539242FE11FA98FD4A53DAAD941 /* JDToaster.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = JDToaster.framework; path = JDToaster.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | CF68899FD3B3F95A7F2C778B1A0BAC63 /* Toast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Toast.swift; path = JDToaster/Source/Toast.swift; sourceTree = ""; }; 50 | D6D7C498FA339E02BD53ECB8916CEA8E /* Pods-Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Example-dummy.m"; sourceTree = ""; }; 51 | D76C103953255B4FE950BE213A0597CF /* JDToaster.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JDToaster.xcconfig; sourceTree = ""; }; 52 | E5B6BFC449B22FAE61D844407F8EF1ED /* JDToaster.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = JDToaster.modulemap; sourceTree = ""; }; 53 | EA21B344259B58996DB73382B1B1521F /* Pods-Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-acknowledgements.plist"; sourceTree = ""; }; 54 | FE7EBA27D98BA5DDDC1BDE004FC5D24F /* JDToaster-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JDToaster-umbrella.h"; sourceTree = ""; }; 55 | FF063B2EF2862B4C30EA968E55445120 /* ToastPresentationController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToastPresentationController.swift; path = JDToaster/Source/ToastPresentationController.swift; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 077022BF6BE509C67C47B763ED3B6D25 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | C1E0D7A1999A534EF9552AE652477BA5 /* Foundation.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | E9AD1CEB46E11EF33C8DE865B992506A /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | 1B9212720295D01E8447E56DA321AC62 /* Foundation.framework in Frameworks */, 72 | 43A2C352768FD8CBB12DFB917BA8E013 /* UIKit.framework in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | 142015028C6A0485FA02C67B2C61A58D /* Support Files */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | E5B6BFC449B22FAE61D844407F8EF1ED /* JDToaster.modulemap */, 83 | D76C103953255B4FE950BE213A0597CF /* JDToaster.xcconfig */, 84 | 86628FAF50DA35145DCEEDAB9A6530D4 /* JDToaster-dummy.m */, 85 | 508324206141C392C1EF12C33E8C09A1 /* JDToaster-Info.plist */, 86 | 82DFB06AD9F6ED9CCB3360ACCC2DE1E3 /* JDToaster-prefix.pch */, 87 | FE7EBA27D98BA5DDDC1BDE004FC5D24F /* JDToaster-umbrella.h */, 88 | ); 89 | name = "Support Files"; 90 | path = "../Target Support Files/JDToaster"; 91 | sourceTree = ""; 92 | }; 93 | 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | E2983683FD097A93297E2F5D4E382B36 /* iOS */, 97 | ); 98 | name = Frameworks; 99 | sourceTree = ""; 100 | }; 101 | 272CC6727DA55A8A470EEDE5A2351630 /* JDToaster */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | CF68899FD3B3F95A7F2C778B1A0BAC63 /* Toast.swift */, 105 | FF063B2EF2862B4C30EA968E55445120 /* ToastPresentationController.swift */, 106 | 74B470D761BD905FFBEDA9DDBAC1B5DC /* ToastViewController.swift */, 107 | 142015028C6A0485FA02C67B2C61A58D /* Support Files */, 108 | ); 109 | name = JDToaster; 110 | path = JDToaster; 111 | sourceTree = ""; 112 | }; 113 | 3DC17A13F6EC0B23B950703F30E7BEBE /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | C74AD539242FE11FA98FD4A53DAAD941 /* JDToaster.framework */, 117 | 1F667CC0E19EAF34E5A4119E2121F585 /* Pods_Example.framework */, 118 | ); 119 | name = Products; 120 | sourceTree = ""; 121 | }; 122 | 89BB238965C169371A024C279D8090A0 /* Pods */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 272CC6727DA55A8A470EEDE5A2351630 /* JDToaster */, 126 | ); 127 | name = Pods; 128 | sourceTree = ""; 129 | }; 130 | 9BDBD95ED116334D1B2835202D8D3060 /* Pods-Example */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 35C305D3797C284E6F5BAA1D3E6F9BF8 /* Pods-Example.modulemap */, 134 | 441854E35F81731E63E53DC7E4EEAD9D /* Pods-Example-acknowledgements.markdown */, 135 | EA21B344259B58996DB73382B1B1521F /* Pods-Example-acknowledgements.plist */, 136 | D6D7C498FA339E02BD53ECB8916CEA8E /* Pods-Example-dummy.m */, 137 | AFECBC24E09D0D25F822C27BD944AFD4 /* Pods-Example-frameworks.sh */, 138 | 31C1D37707DFAA5E6A164BCC07834264 /* Pods-Example-Info.plist */, 139 | 7825A90E082A1582EB16256B0E722B3F /* Pods-Example-umbrella.h */, 140 | B45138496B85A072654D1D0F8EBBEDE5 /* Pods-Example.debug.xcconfig */, 141 | 243410B9535472556EA4BB6DBC133A0D /* Pods-Example.release.xcconfig */, 142 | ); 143 | name = "Pods-Example"; 144 | path = "Target Support Files/Pods-Example"; 145 | sourceTree = ""; 146 | }; 147 | CE2E825F08D3AD0FD76E6D78D7512ED0 /* Targets Support Files */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 9BDBD95ED116334D1B2835202D8D3060 /* Pods-Example */, 151 | ); 152 | name = "Targets Support Files"; 153 | sourceTree = ""; 154 | }; 155 | CF1408CF629C7361332E53B88F7BD30C = { 156 | isa = PBXGroup; 157 | children = ( 158 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 159 | 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */, 160 | 89BB238965C169371A024C279D8090A0 /* Pods */, 161 | 3DC17A13F6EC0B23B950703F30E7BEBE /* Products */, 162 | CE2E825F08D3AD0FD76E6D78D7512ED0 /* Targets Support Files */, 163 | ); 164 | sourceTree = ""; 165 | }; 166 | E2983683FD097A93297E2F5D4E382B36 /* iOS */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */, 170 | 312B988EF117AE4DE76A268D970131FE /* UIKit.framework */, 171 | ); 172 | name = iOS; 173 | sourceTree = ""; 174 | }; 175 | /* End PBXGroup section */ 176 | 177 | /* Begin PBXHeadersBuildPhase section */ 178 | 1666F6230FB081B117BA0E8D12736DB0 /* Headers */ = { 179 | isa = PBXHeadersBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 29BBB5FB07172A4243C067D0AE76D2AC /* Pods-Example-umbrella.h in Headers */, 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | }; 186 | 21024A55630FC3AA820C54EEBC776E00 /* Headers */ = { 187 | isa = PBXHeadersBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 897AED3845CFCB1EE347884568335BD3 /* JDToaster-umbrella.h in Headers */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXHeadersBuildPhase section */ 195 | 196 | /* Begin PBXNativeTarget section */ 197 | 0AEE99A309977BD12A049FF48AF9BA4B /* Pods-Example */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = 1B5BD8882CBD5F3164E6E96E01259673 /* Build configuration list for PBXNativeTarget "Pods-Example" */; 200 | buildPhases = ( 201 | 1666F6230FB081B117BA0E8D12736DB0 /* Headers */, 202 | 369A524B59B7936E0550A5BDD3CB431D /* Sources */, 203 | 077022BF6BE509C67C47B763ED3B6D25 /* Frameworks */, 204 | C00EE684B57DA224DB33C137D9DE98FD /* Resources */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | 93F989D88DF940989401E3A8861386AB /* PBXTargetDependency */, 210 | ); 211 | name = "Pods-Example"; 212 | productName = "Pods-Example"; 213 | productReference = 1F667CC0E19EAF34E5A4119E2121F585 /* Pods_Example.framework */; 214 | productType = "com.apple.product-type.framework"; 215 | }; 216 | D12EA1C95B4D0CD0C95D67D004D5C02D /* JDToaster */ = { 217 | isa = PBXNativeTarget; 218 | buildConfigurationList = D789A19BD9BC66B6D6978321F32832AC /* Build configuration list for PBXNativeTarget "JDToaster" */; 219 | buildPhases = ( 220 | 21024A55630FC3AA820C54EEBC776E00 /* Headers */, 221 | F3CDD993C12D1CC1290347F845D6AA35 /* Sources */, 222 | E9AD1CEB46E11EF33C8DE865B992506A /* Frameworks */, 223 | 2CF579FDC2F1008280F0360626CE847C /* Resources */, 224 | ); 225 | buildRules = ( 226 | ); 227 | dependencies = ( 228 | ); 229 | name = JDToaster; 230 | productName = JDToaster; 231 | productReference = C74AD539242FE11FA98FD4A53DAAD941 /* JDToaster.framework */; 232 | productType = "com.apple.product-type.framework"; 233 | }; 234 | /* End PBXNativeTarget section */ 235 | 236 | /* Begin PBXProject section */ 237 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 238 | isa = PBXProject; 239 | attributes = { 240 | LastSwiftUpdateCheck = 1020; 241 | LastUpgradeCheck = 1020; 242 | }; 243 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 244 | compatibilityVersion = "Xcode 9.3"; 245 | developmentRegion = en; 246 | hasScannedForEncodings = 0; 247 | knownRegions = ( 248 | en, 249 | ); 250 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 251 | productRefGroup = 3DC17A13F6EC0B23B950703F30E7BEBE /* Products */; 252 | projectDirPath = ""; 253 | projectRoot = ""; 254 | targets = ( 255 | D12EA1C95B4D0CD0C95D67D004D5C02D /* JDToaster */, 256 | 0AEE99A309977BD12A049FF48AF9BA4B /* Pods-Example */, 257 | ); 258 | }; 259 | /* End PBXProject section */ 260 | 261 | /* Begin PBXResourcesBuildPhase section */ 262 | 2CF579FDC2F1008280F0360626CE847C /* Resources */ = { 263 | isa = PBXResourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | C00EE684B57DA224DB33C137D9DE98FD /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXResourcesBuildPhase section */ 277 | 278 | /* Begin PBXSourcesBuildPhase section */ 279 | 369A524B59B7936E0550A5BDD3CB431D /* Sources */ = { 280 | isa = PBXSourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | AA53CE8800D9A590613593D55198A06E /* Pods-Example-dummy.m in Sources */, 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | F3CDD993C12D1CC1290347F845D6AA35 /* Sources */ = { 288 | isa = PBXSourcesBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | 43C6A355AD7DCD1F77B7F1B7EBA6CB5A /* JDToaster-dummy.m in Sources */, 292 | 70B1DA272634B26E521388BEC8611879 /* Toast.swift in Sources */, 293 | 5788353A439CE1645BF4E87F8937836A /* ToastPresentationController.swift in Sources */, 294 | 02683E502EFBB795371251CD105C17D3 /* ToastViewController.swift in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXTargetDependency section */ 301 | 93F989D88DF940989401E3A8861386AB /* PBXTargetDependency */ = { 302 | isa = PBXTargetDependency; 303 | name = JDToaster; 304 | target = D12EA1C95B4D0CD0C95D67D004D5C02D /* JDToaster */; 305 | targetProxy = EE39762B6C8E794F90CC17D5AC8CC5DF /* PBXContainerItemProxy */; 306 | }; 307 | /* End PBXTargetDependency section */ 308 | 309 | /* Begin XCBuildConfiguration section */ 310 | 06D905F54B2DF0953D9AAF8CDB7821AA /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | baseConfigurationReference = D76C103953255B4FE950BE213A0597CF /* JDToaster.xcconfig */; 313 | buildSettings = { 314 | CLANG_ENABLE_OBJC_WEAK = NO; 315 | CODE_SIGN_IDENTITY = ""; 316 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 317 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 318 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 319 | CURRENT_PROJECT_VERSION = 1; 320 | DEFINES_MODULE = YES; 321 | DYLIB_COMPATIBILITY_VERSION = 1; 322 | DYLIB_CURRENT_VERSION = 1; 323 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 324 | GCC_PREFIX_HEADER = "Target Support Files/JDToaster/JDToaster-prefix.pch"; 325 | INFOPLIST_FILE = "Target Support Files/JDToaster/JDToaster-Info.plist"; 326 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 327 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 328 | LD_RUNPATH_SEARCH_PATHS = ( 329 | "$(inherited)", 330 | "@executable_path/Frameworks", 331 | "@loader_path/Frameworks", 332 | ); 333 | MODULEMAP_FILE = "Target Support Files/JDToaster/JDToaster.modulemap"; 334 | PRODUCT_MODULE_NAME = JDToaster; 335 | PRODUCT_NAME = JDToaster; 336 | SDKROOT = iphoneos; 337 | SKIP_INSTALL = YES; 338 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 339 | SWIFT_VERSION = 5.0; 340 | TARGETED_DEVICE_FAMILY = "1,2"; 341 | VALIDATE_PRODUCT = YES; 342 | VERSIONING_SYSTEM = "apple-generic"; 343 | VERSION_INFO_PREFIX = ""; 344 | }; 345 | name = Release; 346 | }; 347 | 0864B9A611971A6FC4A2CB6036E9D0D7 /* Debug */ = { 348 | isa = XCBuildConfiguration; 349 | baseConfigurationReference = D76C103953255B4FE950BE213A0597CF /* JDToaster.xcconfig */; 350 | buildSettings = { 351 | CLANG_ENABLE_OBJC_WEAK = NO; 352 | CODE_SIGN_IDENTITY = ""; 353 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 355 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 356 | CURRENT_PROJECT_VERSION = 1; 357 | DEFINES_MODULE = YES; 358 | DYLIB_COMPATIBILITY_VERSION = 1; 359 | DYLIB_CURRENT_VERSION = 1; 360 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 361 | GCC_PREFIX_HEADER = "Target Support Files/JDToaster/JDToaster-prefix.pch"; 362 | INFOPLIST_FILE = "Target Support Files/JDToaster/JDToaster-Info.plist"; 363 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 364 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 365 | LD_RUNPATH_SEARCH_PATHS = ( 366 | "$(inherited)", 367 | "@executable_path/Frameworks", 368 | "@loader_path/Frameworks", 369 | ); 370 | MODULEMAP_FILE = "Target Support Files/JDToaster/JDToaster.modulemap"; 371 | PRODUCT_MODULE_NAME = JDToaster; 372 | PRODUCT_NAME = JDToaster; 373 | SDKROOT = iphoneos; 374 | SKIP_INSTALL = YES; 375 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 376 | SWIFT_VERSION = 5.0; 377 | TARGETED_DEVICE_FAMILY = "1,2"; 378 | VERSIONING_SYSTEM = "apple-generic"; 379 | VERSION_INFO_PREFIX = ""; 380 | }; 381 | name = Debug; 382 | }; 383 | 204B8AEA4AE90A551A1768B355C2F9F0 /* Debug */ = { 384 | isa = XCBuildConfiguration; 385 | buildSettings = { 386 | ALWAYS_SEARCH_USER_PATHS = NO; 387 | CLANG_ANALYZER_NONNULL = YES; 388 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 390 | CLANG_CXX_LIBRARY = "libc++"; 391 | CLANG_ENABLE_MODULES = YES; 392 | CLANG_ENABLE_OBJC_ARC = YES; 393 | CLANG_ENABLE_OBJC_WEAK = YES; 394 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 395 | CLANG_WARN_BOOL_CONVERSION = YES; 396 | CLANG_WARN_COMMA = YES; 397 | CLANG_WARN_CONSTANT_CONVERSION = YES; 398 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 399 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 400 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 401 | CLANG_WARN_EMPTY_BODY = YES; 402 | CLANG_WARN_ENUM_CONVERSION = YES; 403 | CLANG_WARN_INFINITE_RECURSION = YES; 404 | CLANG_WARN_INT_CONVERSION = YES; 405 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 406 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 407 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 410 | CLANG_WARN_STRICT_PROTOTYPES = YES; 411 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 412 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | COPY_PHASE_STRIP = NO; 416 | DEBUG_INFORMATION_FORMAT = dwarf; 417 | ENABLE_STRICT_OBJC_MSGSEND = YES; 418 | ENABLE_TESTABILITY = YES; 419 | GCC_C_LANGUAGE_STANDARD = gnu11; 420 | GCC_DYNAMIC_NO_PIC = NO; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_OPTIMIZATION_LEVEL = 0; 423 | GCC_PREPROCESSOR_DEFINITIONS = ( 424 | "POD_CONFIGURATION_DEBUG=1", 425 | "DEBUG=1", 426 | "$(inherited)", 427 | ); 428 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 429 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 430 | GCC_WARN_UNDECLARED_SELECTOR = YES; 431 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 432 | GCC_WARN_UNUSED_FUNCTION = YES; 433 | GCC_WARN_UNUSED_VARIABLE = YES; 434 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 435 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 436 | MTL_FAST_MATH = YES; 437 | ONLY_ACTIVE_ARCH = YES; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | STRIP_INSTALLED_PRODUCT = NO; 440 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 441 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 442 | SWIFT_VERSION = 5.0; 443 | SYMROOT = "${SRCROOT}/../build"; 444 | }; 445 | name = Debug; 446 | }; 447 | 3CCC6195EDBEE5DA2A49DF962113BE16 /* Release */ = { 448 | isa = XCBuildConfiguration; 449 | buildSettings = { 450 | ALWAYS_SEARCH_USER_PATHS = NO; 451 | CLANG_ANALYZER_NONNULL = YES; 452 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 453 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 454 | CLANG_CXX_LIBRARY = "libc++"; 455 | CLANG_ENABLE_MODULES = YES; 456 | CLANG_ENABLE_OBJC_ARC = YES; 457 | CLANG_ENABLE_OBJC_WEAK = YES; 458 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 459 | CLANG_WARN_BOOL_CONVERSION = YES; 460 | CLANG_WARN_COMMA = YES; 461 | CLANG_WARN_CONSTANT_CONVERSION = YES; 462 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 463 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 464 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 465 | CLANG_WARN_EMPTY_BODY = YES; 466 | CLANG_WARN_ENUM_CONVERSION = YES; 467 | CLANG_WARN_INFINITE_RECURSION = YES; 468 | CLANG_WARN_INT_CONVERSION = YES; 469 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 470 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 471 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 472 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 473 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 474 | CLANG_WARN_STRICT_PROTOTYPES = YES; 475 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 476 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 477 | CLANG_WARN_UNREACHABLE_CODE = YES; 478 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 479 | COPY_PHASE_STRIP = NO; 480 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 481 | ENABLE_NS_ASSERTIONS = NO; 482 | ENABLE_STRICT_OBJC_MSGSEND = YES; 483 | GCC_C_LANGUAGE_STANDARD = gnu11; 484 | GCC_NO_COMMON_BLOCKS = YES; 485 | GCC_PREPROCESSOR_DEFINITIONS = ( 486 | "POD_CONFIGURATION_RELEASE=1", 487 | "$(inherited)", 488 | ); 489 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 490 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 491 | GCC_WARN_UNDECLARED_SELECTOR = YES; 492 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 493 | GCC_WARN_UNUSED_FUNCTION = YES; 494 | GCC_WARN_UNUSED_VARIABLE = YES; 495 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 496 | MTL_ENABLE_DEBUG_INFO = NO; 497 | MTL_FAST_MATH = YES; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | STRIP_INSTALLED_PRODUCT = NO; 500 | SWIFT_COMPILATION_MODE = wholemodule; 501 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 502 | SWIFT_VERSION = 5.0; 503 | SYMROOT = "${SRCROOT}/../build"; 504 | }; 505 | name = Release; 506 | }; 507 | A283C877F779B6C32CF40148005CAEC0 /* Release */ = { 508 | isa = XCBuildConfiguration; 509 | baseConfigurationReference = 243410B9535472556EA4BB6DBC133A0D /* Pods-Example.release.xcconfig */; 510 | buildSettings = { 511 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 512 | CLANG_ENABLE_OBJC_WEAK = NO; 513 | CODE_SIGN_IDENTITY = ""; 514 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 515 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 516 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 517 | CURRENT_PROJECT_VERSION = 1; 518 | DEFINES_MODULE = YES; 519 | DYLIB_COMPATIBILITY_VERSION = 1; 520 | DYLIB_CURRENT_VERSION = 1; 521 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 522 | INFOPLIST_FILE = "Target Support Files/Pods-Example/Pods-Example-Info.plist"; 523 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 524 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 525 | LD_RUNPATH_SEARCH_PATHS = ( 526 | "$(inherited)", 527 | "@executable_path/Frameworks", 528 | "@loader_path/Frameworks", 529 | ); 530 | MACH_O_TYPE = staticlib; 531 | MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; 532 | OTHER_LDFLAGS = ""; 533 | OTHER_LIBTOOLFLAGS = ""; 534 | PODS_ROOT = "$(SRCROOT)"; 535 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 536 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 537 | SDKROOT = iphoneos; 538 | SKIP_INSTALL = YES; 539 | TARGETED_DEVICE_FAMILY = "1,2"; 540 | VALIDATE_PRODUCT = YES; 541 | VERSIONING_SYSTEM = "apple-generic"; 542 | VERSION_INFO_PREFIX = ""; 543 | }; 544 | name = Release; 545 | }; 546 | C654D6425127BAAC6963776828E8566E /* Debug */ = { 547 | isa = XCBuildConfiguration; 548 | baseConfigurationReference = B45138496B85A072654D1D0F8EBBEDE5 /* Pods-Example.debug.xcconfig */; 549 | buildSettings = { 550 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 551 | CLANG_ENABLE_OBJC_WEAK = NO; 552 | CODE_SIGN_IDENTITY = ""; 553 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 554 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 555 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 556 | CURRENT_PROJECT_VERSION = 1; 557 | DEFINES_MODULE = YES; 558 | DYLIB_COMPATIBILITY_VERSION = 1; 559 | DYLIB_CURRENT_VERSION = 1; 560 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 561 | INFOPLIST_FILE = "Target Support Files/Pods-Example/Pods-Example-Info.plist"; 562 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 563 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 564 | LD_RUNPATH_SEARCH_PATHS = ( 565 | "$(inherited)", 566 | "@executable_path/Frameworks", 567 | "@loader_path/Frameworks", 568 | ); 569 | MACH_O_TYPE = staticlib; 570 | MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; 571 | OTHER_LDFLAGS = ""; 572 | OTHER_LIBTOOLFLAGS = ""; 573 | PODS_ROOT = "$(SRCROOT)"; 574 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 575 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 576 | SDKROOT = iphoneos; 577 | SKIP_INSTALL = YES; 578 | TARGETED_DEVICE_FAMILY = "1,2"; 579 | VERSIONING_SYSTEM = "apple-generic"; 580 | VERSION_INFO_PREFIX = ""; 581 | }; 582 | name = Debug; 583 | }; 584 | /* End XCBuildConfiguration section */ 585 | 586 | /* Begin XCConfigurationList section */ 587 | 1B5BD8882CBD5F3164E6E96E01259673 /* Build configuration list for PBXNativeTarget "Pods-Example" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | C654D6425127BAAC6963776828E8566E /* Debug */, 591 | A283C877F779B6C32CF40148005CAEC0 /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Release; 595 | }; 596 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 597 | isa = XCConfigurationList; 598 | buildConfigurations = ( 599 | 204B8AEA4AE90A551A1768B355C2F9F0 /* Debug */, 600 | 3CCC6195EDBEE5DA2A49DF962113BE16 /* Release */, 601 | ); 602 | defaultConfigurationIsVisible = 0; 603 | defaultConfigurationName = Release; 604 | }; 605 | D789A19BD9BC66B6D6978321F32832AC /* Build configuration list for PBXNativeTarget "JDToaster" */ = { 606 | isa = XCConfigurationList; 607 | buildConfigurations = ( 608 | 0864B9A611971A6FC4A2CB6036E9D0D7 /* Debug */, 609 | 06D905F54B2DF0953D9AAF8CDB7821AA /* Release */, 610 | ); 611 | defaultConfigurationIsVisible = 0; 612 | defaultConfigurationName = Release; 613 | }; 614 | /* End XCConfigurationList section */ 615 | }; 616 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 617 | } 618 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JDToaster/JDToaster-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JDToaster/JDToaster-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JDToaster : NSObject 3 | @end 4 | @implementation PodsDummy_JDToaster 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JDToaster/JDToaster-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JDToaster/JDToaster-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 JDToasterVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char JDToasterVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JDToaster/JDToaster.modulemap: -------------------------------------------------------------------------------- 1 | framework module JDToaster { 2 | umbrella header "JDToaster-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JDToaster/JDToaster.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JDToaster 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/JDToaster 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## JDToaster 5 | 6 | MIT License 7 | 8 | Copyright (c) 2019 Joan Disho 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-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 | MIT License 18 | 19 | Copyright (c) 2019 Joan Disho 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | JDToaster 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/JDToaster/JDToaster.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JDToaster.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/JDToaster/JDToaster.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JDToaster.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | 23 | # Used as a return value for each invocation of `strip_invalid_archs` function. 24 | STRIP_BINARY_RETVAL=0 25 | 26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 29 | 30 | # Copies and strips a vendored framework 31 | install_framework() 32 | { 33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 34 | local source="${BUILT_PRODUCTS_DIR}/$1" 35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 37 | elif [ -r "$1" ]; then 38 | local source="$1" 39 | fi 40 | 41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 42 | 43 | if [ -L "${source}" ]; then 44 | echo "Symlinked..." 45 | source="$(readlink "${source}")" 46 | fi 47 | 48 | # Use filter instead of exclude so missing patterns don't throw errors. 49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 51 | 52 | local basename 53 | basename="$(basename -s .framework "$1")" 54 | binary="${destination}/${basename}.framework/${basename}" 55 | 56 | if ! [ -r "$binary" ]; then 57 | binary="${destination}/${basename}" 58 | elif [ -L "${binary}" ]; then 59 | echo "Destination binary is symlinked..." 60 | dirname="$(dirname "${binary}")" 61 | binary="${dirname}/$(readlink "${binary}")" 62 | fi 63 | 64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 66 | strip_invalid_archs "$binary" 67 | fi 68 | 69 | # Resign the code if required by the build settings to avoid unstable apps 70 | code_sign_if_enabled "${destination}/$(basename "$1")" 71 | 72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 74 | local swift_runtime_libs 75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 76 | for lib in $swift_runtime_libs; do 77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 79 | code_sign_if_enabled "${destination}/${lib}" 80 | done 81 | fi 82 | } 83 | 84 | # Copies and strips a vendored dSYM 85 | install_dsym() { 86 | local source="$1" 87 | if [ -r "$source" ]; then 88 | # Copy the dSYM into a the targets temp dir. 89 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 90 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 91 | 92 | local basename 93 | basename="$(basename -s .framework.dSYM "$source")" 94 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 95 | 96 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 97 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 98 | strip_invalid_archs "$binary" 99 | fi 100 | 101 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 102 | # Move the stripped file into its final destination. 103 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 104 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 105 | else 106 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 107 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 108 | fi 109 | fi 110 | } 111 | 112 | # Copies the bcsymbolmap files of a vendored framework 113 | install_bcsymbolmap() { 114 | local bcsymbolmap_path="$1" 115 | local destination="${BUILT_PRODUCTS_DIR}" 116 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 117 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 118 | } 119 | 120 | # Signs a framework with the provided identity 121 | code_sign_if_enabled() { 122 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 123 | # Use the current code_sign_identity 124 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 125 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 126 | 127 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 128 | code_sign_cmd="$code_sign_cmd &" 129 | fi 130 | echo "$code_sign_cmd" 131 | eval "$code_sign_cmd" 132 | fi 133 | } 134 | 135 | # Strip invalid architectures 136 | strip_invalid_archs() { 137 | binary="$1" 138 | # Get architectures for current target binary 139 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 140 | # Intersect them with the architectures we are building for 141 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 142 | # If there are no archs supported by this binary then warn the user 143 | if [[ -z "$intersected_archs" ]]; then 144 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 145 | STRIP_BINARY_RETVAL=0 146 | return 147 | fi 148 | stripped="" 149 | for arch in $binary_archs; do 150 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 151 | # Strip non-valid architectures in-place 152 | lipo -remove "$arch" -output "$binary" "$binary" 153 | stripped="$stripped $arch" 154 | fi 155 | done 156 | if [[ "$stripped" ]]; then 157 | echo "Stripped $binary of architectures:$stripped" 158 | fi 159 | STRIP_BINARY_RETVAL=1 160 | } 161 | 162 | 163 | if [[ "$CONFIGURATION" == "Debug" ]]; then 164 | install_framework "${BUILT_PRODUCTS_DIR}/JDToaster/JDToaster.framework" 165 | fi 166 | if [[ "$CONFIGURATION" == "Release" ]]; then 167 | install_framework "${BUILT_PRODUCTS_DIR}/JDToaster/JDToaster.framework" 168 | fi 169 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 170 | wait 171 | fi 172 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-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_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JDToaster" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JDToaster/JDToaster.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "JDToaster" -framework "UIKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Example { 2 | umbrella header "Pods-Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JDToaster" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JDToaster/JDToaster.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "JDToaster" -framework "UIKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Toaster/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Toaster 4 | // 5 | // Created by Joan Disho on 27.05.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/Toaster/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example/Toaster/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Toaster/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 | -------------------------------------------------------------------------------- /Example/Toaster/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Example/Toaster/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/Toaster/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Toaster 4 | // 5 | // Created by Joan Disho on 27.05.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import JDToaster 11 | 12 | class ViewController: UIViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | view.backgroundColor = .white 17 | 18 | let shortToastButton = UIButton(type: .system) 19 | shortToastButton.setTitle("Short", for: .normal) 20 | shortToastButton.addTarget(self, action: #selector(showShortToaster), for: .primaryActionTriggered) 21 | 22 | 23 | let bigToastButton = UIButton(type: .system) 24 | bigToastButton.setTitle("Big", for: .normal) 25 | bigToastButton.addTarget(self, action: #selector(showBigToaster), for: .primaryActionTriggered) 26 | 27 | let hugeToastButton = UIButton(type: .system) 28 | hugeToastButton.setTitle("Huge", for: .normal) 29 | hugeToastButton.addTarget(self, action: #selector(showHugeToaster), for: .primaryActionTriggered) 30 | 31 | let dismissToastButton = UIButton(type: .system) 32 | dismissToastButton.setTitle("Dismiss", for: .normal) 33 | dismissToastButton.addTarget(self, action: #selector(dismissToaster), for: .primaryActionTriggered) 34 | 35 | let stackView = UIStackView(arrangedSubviews: [shortToastButton, bigToastButton, hugeToastButton, dismissToastButton]) 36 | stackView.axis = .vertical 37 | stackView.spacing = 16.0 38 | 39 | view.addSubview(stackView) 40 | stackView.translatesAutoresizingMaskIntoConstraints = false 41 | NSLayoutConstraint.activate([ 42 | stackView.centerYAnchor.constraint(equalTo: view.centerYAnchor), 43 | stackView.centerXAnchor.constraint(equalTo: view.centerXAnchor), 44 | ]) 45 | } 46 | 47 | @objc private func showShortToaster() { 48 | Toast.default.show(text: "Hello Toast!", duration: 4.0) 49 | } 50 | 51 | @objc private func showBigToaster() { 52 | Toast.default.show(text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", duration: 4.0) 53 | } 54 | 55 | @objc private func showHugeToaster() { 56 | Toast.default.show(text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", duration: 4.0) 57 | } 58 | 59 | @objc private func dismissToaster() { 60 | Toast.default.dismiss(animated: true) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Images/Screenshot 2019-06-12 at 13.42.30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdisho/JDToaster/5e753ffdd26ab5f29a6b6d3802ef88d843fc06b3/Images/Screenshot 2019-06-12 at 13.42.30.png -------------------------------------------------------------------------------- /Images/Screenshot 2019-06-12 at 13.49.16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdisho/JDToaster/5e753ffdd26ab5f29a6b6d3802ef88d843fc06b3/Images/Screenshot 2019-06-12 at 13.49.16.png -------------------------------------------------------------------------------- /Images/Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.41.31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdisho/JDToaster/5e753ffdd26ab5f29a6b6d3802ef88d843fc06b3/Images/Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.41.31.png -------------------------------------------------------------------------------- /Images/Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.41.50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdisho/JDToaster/5e753ffdd26ab5f29a6b6d3802ef88d843fc06b3/Images/Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.41.50.png -------------------------------------------------------------------------------- /Images/Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.42.20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdisho/JDToaster/5e753ffdd26ab5f29a6b6d3802ef88d843fc06b3/Images/Simulator Screen Shot - iPhone Xʀ - 2019-06-12 at 11.42.20.png -------------------------------------------------------------------------------- /JDToaster.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.platform = :ios 4 | s.ios.deployment_target = '11.0' 5 | s.name = "JDToaster" 6 | s.summary = "Toasty iOS alerts" 7 | s.requires_arc = true 8 | 9 | s.version = "1.0.0" 10 | 11 | s.license = { :type => "MIT", :file => "LICENSE" } 12 | 13 | s.author = { "Joan Disho" => "dishojoan@gmail.com" } 14 | 15 | s.homepage = "https://github.com/jdisho/JDToaster" 16 | 17 | s.source = { :git => "https://github.com/jdisho/JDToaster.git", 18 | :tag => "#{s.version}" } 19 | 20 | s.framework = "Foundation" 21 | s.framework = "UIKit" 22 | 23 | s.source_files = "JDToaster/**/*.{swift}" 24 | 25 | s.swift_version = "5.0" 26 | 27 | end -------------------------------------------------------------------------------- /JDToaster.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2CEAD1DB22B131860058EAB7 /* JDToaster.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CEAD1D922B131860058EAB7 /* JDToaster.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 2CEAD1E322B131B50058EAB7 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CEAD1E222B131B50058EAB7 /* Toast.swift */; }; 12 | 2CEAD1E522B131C90058EAB7 /* ToastPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CEAD1E422B131C90058EAB7 /* ToastPresentationController.swift */; }; 13 | 2CEAD1E722B131E20058EAB7 /* ToastViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CEAD1E622B131E20058EAB7 /* ToastViewController.swift */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 2CEAD1D622B131860058EAB7 /* JDToaster.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JDToaster.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | 2CEAD1D922B131860058EAB7 /* JDToaster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JDToaster.h; sourceTree = ""; }; 19 | 2CEAD1DA22B131860058EAB7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 20 | 2CEAD1E222B131B50058EAB7 /* Toast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toast.swift; sourceTree = ""; }; 21 | 2CEAD1E422B131C90058EAB7 /* ToastPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastPresentationController.swift; sourceTree = ""; }; 22 | 2CEAD1E622B131E20058EAB7 /* ToastViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastViewController.swift; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | 2CEAD1D322B131860058EAB7 /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | 2CEAD1CC22B131860058EAB7 = { 37 | isa = PBXGroup; 38 | children = ( 39 | 2CEAD1D822B131860058EAB7 /* JDToaster */, 40 | 2CEAD1D722B131860058EAB7 /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | 2CEAD1D722B131860058EAB7 /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | 2CEAD1D622B131860058EAB7 /* JDToaster.framework */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | 2CEAD1D822B131860058EAB7 /* JDToaster */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 2CEAD1E122B1318D0058EAB7 /* Source */, 56 | 2CEAD1D922B131860058EAB7 /* JDToaster.h */, 57 | 2CEAD1DA22B131860058EAB7 /* Info.plist */, 58 | ); 59 | path = JDToaster; 60 | sourceTree = ""; 61 | }; 62 | 2CEAD1E122B1318D0058EAB7 /* Source */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 2CEAD1E222B131B50058EAB7 /* Toast.swift */, 66 | 2CEAD1E422B131C90058EAB7 /* ToastPresentationController.swift */, 67 | 2CEAD1E622B131E20058EAB7 /* ToastViewController.swift */, 68 | ); 69 | path = Source; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXHeadersBuildPhase section */ 75 | 2CEAD1D122B131860058EAB7 /* Headers */ = { 76 | isa = PBXHeadersBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | 2CEAD1DB22B131860058EAB7 /* JDToaster.h in Headers */, 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXHeadersBuildPhase section */ 84 | 85 | /* Begin PBXNativeTarget section */ 86 | 2CEAD1D522B131860058EAB7 /* JDToaster */ = { 87 | isa = PBXNativeTarget; 88 | buildConfigurationList = 2CEAD1DE22B131860058EAB7 /* Build configuration list for PBXNativeTarget "JDToaster" */; 89 | buildPhases = ( 90 | 2CEAD1D122B131860058EAB7 /* Headers */, 91 | 2CEAD1D222B131860058EAB7 /* Sources */, 92 | 2CEAD1D322B131860058EAB7 /* Frameworks */, 93 | 2CEAD1D422B131860058EAB7 /* Resources */, 94 | ); 95 | buildRules = ( 96 | ); 97 | dependencies = ( 98 | ); 99 | name = JDToaster; 100 | productName = JDToaster; 101 | productReference = 2CEAD1D622B131860058EAB7 /* JDToaster.framework */; 102 | productType = "com.apple.product-type.framework"; 103 | }; 104 | /* End PBXNativeTarget section */ 105 | 106 | /* Begin PBXProject section */ 107 | 2CEAD1CD22B131860058EAB7 /* Project object */ = { 108 | isa = PBXProject; 109 | attributes = { 110 | LastUpgradeCheck = 1020; 111 | ORGANIZATIONNAME = disho; 112 | TargetAttributes = { 113 | 2CEAD1D522B131860058EAB7 = { 114 | CreatedOnToolsVersion = 10.2.1; 115 | LastSwiftMigration = 1020; 116 | }; 117 | }; 118 | }; 119 | buildConfigurationList = 2CEAD1D022B131860058EAB7 /* Build configuration list for PBXProject "JDToaster" */; 120 | compatibilityVersion = "Xcode 9.3"; 121 | developmentRegion = en; 122 | hasScannedForEncodings = 0; 123 | knownRegions = ( 124 | en, 125 | ); 126 | mainGroup = 2CEAD1CC22B131860058EAB7; 127 | productRefGroup = 2CEAD1D722B131860058EAB7 /* Products */; 128 | projectDirPath = ""; 129 | projectRoot = ""; 130 | targets = ( 131 | 2CEAD1D522B131860058EAB7 /* JDToaster */, 132 | ); 133 | }; 134 | /* End PBXProject section */ 135 | 136 | /* Begin PBXResourcesBuildPhase section */ 137 | 2CEAD1D422B131860058EAB7 /* Resources */ = { 138 | isa = PBXResourcesBuildPhase; 139 | buildActionMask = 2147483647; 140 | files = ( 141 | ); 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | /* End PBXResourcesBuildPhase section */ 145 | 146 | /* Begin PBXSourcesBuildPhase section */ 147 | 2CEAD1D222B131860058EAB7 /* Sources */ = { 148 | isa = PBXSourcesBuildPhase; 149 | buildActionMask = 2147483647; 150 | files = ( 151 | 2CEAD1E522B131C90058EAB7 /* ToastPresentationController.swift in Sources */, 152 | 2CEAD1E722B131E20058EAB7 /* ToastViewController.swift in Sources */, 153 | 2CEAD1E322B131B50058EAB7 /* Toast.swift in Sources */, 154 | ); 155 | runOnlyForDeploymentPostprocessing = 0; 156 | }; 157 | /* End PBXSourcesBuildPhase section */ 158 | 159 | /* Begin XCBuildConfiguration section */ 160 | 2CEAD1DC22B131860058EAB7 /* Debug */ = { 161 | isa = XCBuildConfiguration; 162 | buildSettings = { 163 | ALWAYS_SEARCH_USER_PATHS = NO; 164 | CLANG_ANALYZER_NONNULL = YES; 165 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 166 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 167 | CLANG_CXX_LIBRARY = "libc++"; 168 | CLANG_ENABLE_MODULES = YES; 169 | CLANG_ENABLE_OBJC_ARC = YES; 170 | CLANG_ENABLE_OBJC_WEAK = YES; 171 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 172 | CLANG_WARN_BOOL_CONVERSION = YES; 173 | CLANG_WARN_COMMA = YES; 174 | CLANG_WARN_CONSTANT_CONVERSION = YES; 175 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 176 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 177 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 178 | CLANG_WARN_EMPTY_BODY = YES; 179 | CLANG_WARN_ENUM_CONVERSION = YES; 180 | CLANG_WARN_INFINITE_RECURSION = YES; 181 | CLANG_WARN_INT_CONVERSION = YES; 182 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 183 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 184 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 185 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 186 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 187 | CLANG_WARN_STRICT_PROTOTYPES = YES; 188 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 189 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 190 | CLANG_WARN_UNREACHABLE_CODE = YES; 191 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 192 | CODE_SIGN_IDENTITY = "iPhone Developer"; 193 | COPY_PHASE_STRIP = NO; 194 | CURRENT_PROJECT_VERSION = 1; 195 | DEBUG_INFORMATION_FORMAT = dwarf; 196 | ENABLE_STRICT_OBJC_MSGSEND = YES; 197 | ENABLE_TESTABILITY = YES; 198 | GCC_C_LANGUAGE_STANDARD = gnu11; 199 | GCC_DYNAMIC_NO_PIC = NO; 200 | GCC_NO_COMMON_BLOCKS = YES; 201 | GCC_OPTIMIZATION_LEVEL = 0; 202 | GCC_PREPROCESSOR_DEFINITIONS = ( 203 | "DEBUG=1", 204 | "$(inherited)", 205 | ); 206 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 207 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 208 | GCC_WARN_UNDECLARED_SELECTOR = YES; 209 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 210 | GCC_WARN_UNUSED_FUNCTION = YES; 211 | GCC_WARN_UNUSED_VARIABLE = YES; 212 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 213 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 214 | MTL_FAST_MATH = YES; 215 | ONLY_ACTIVE_ARCH = YES; 216 | SDKROOT = iphoneos; 217 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 218 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 219 | VERSIONING_SYSTEM = "apple-generic"; 220 | VERSION_INFO_PREFIX = ""; 221 | }; 222 | name = Debug; 223 | }; 224 | 2CEAD1DD22B131860058EAB7 /* Release */ = { 225 | isa = XCBuildConfiguration; 226 | buildSettings = { 227 | ALWAYS_SEARCH_USER_PATHS = NO; 228 | CLANG_ANALYZER_NONNULL = YES; 229 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 230 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 231 | CLANG_CXX_LIBRARY = "libc++"; 232 | CLANG_ENABLE_MODULES = YES; 233 | CLANG_ENABLE_OBJC_ARC = YES; 234 | CLANG_ENABLE_OBJC_WEAK = YES; 235 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 236 | CLANG_WARN_BOOL_CONVERSION = YES; 237 | CLANG_WARN_COMMA = YES; 238 | CLANG_WARN_CONSTANT_CONVERSION = YES; 239 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 240 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 241 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 242 | CLANG_WARN_EMPTY_BODY = YES; 243 | CLANG_WARN_ENUM_CONVERSION = YES; 244 | CLANG_WARN_INFINITE_RECURSION = YES; 245 | CLANG_WARN_INT_CONVERSION = YES; 246 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 247 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 248 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 249 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 250 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 251 | CLANG_WARN_STRICT_PROTOTYPES = YES; 252 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 253 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 254 | CLANG_WARN_UNREACHABLE_CODE = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | CODE_SIGN_IDENTITY = "iPhone Developer"; 257 | COPY_PHASE_STRIP = NO; 258 | CURRENT_PROJECT_VERSION = 1; 259 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 260 | ENABLE_NS_ASSERTIONS = NO; 261 | ENABLE_STRICT_OBJC_MSGSEND = YES; 262 | GCC_C_LANGUAGE_STANDARD = gnu11; 263 | GCC_NO_COMMON_BLOCKS = YES; 264 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 265 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 266 | GCC_WARN_UNDECLARED_SELECTOR = YES; 267 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 268 | GCC_WARN_UNUSED_FUNCTION = YES; 269 | GCC_WARN_UNUSED_VARIABLE = YES; 270 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 271 | MTL_ENABLE_DEBUG_INFO = NO; 272 | MTL_FAST_MATH = YES; 273 | SDKROOT = iphoneos; 274 | SWIFT_COMPILATION_MODE = wholemodule; 275 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 276 | VALIDATE_PRODUCT = YES; 277 | VERSIONING_SYSTEM = "apple-generic"; 278 | VERSION_INFO_PREFIX = ""; 279 | }; 280 | name = Release; 281 | }; 282 | 2CEAD1DF22B131860058EAB7 /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | CLANG_ENABLE_MODULES = YES; 286 | CODE_SIGN_IDENTITY = ""; 287 | CODE_SIGN_STYLE = Automatic; 288 | DEFINES_MODULE = YES; 289 | DEVELOPMENT_TEAM = K3WATBUBCW; 290 | DYLIB_COMPATIBILITY_VERSION = 1; 291 | DYLIB_CURRENT_VERSION = 1; 292 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 293 | INFOPLIST_FILE = JDToaster/Info.plist; 294 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 295 | LD_RUNPATH_SEARCH_PATHS = ( 296 | "$(inherited)", 297 | "@executable_path/Frameworks", 298 | "@loader_path/Frameworks", 299 | ); 300 | PRODUCT_BUNDLE_IDENTIFIER = disho.JDToaster; 301 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 302 | SKIP_INSTALL = YES; 303 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 304 | SWIFT_VERSION = 5.0; 305 | TARGETED_DEVICE_FAMILY = "1,2"; 306 | }; 307 | name = Debug; 308 | }; 309 | 2CEAD1E022B131860058EAB7 /* Release */ = { 310 | isa = XCBuildConfiguration; 311 | buildSettings = { 312 | CLANG_ENABLE_MODULES = YES; 313 | CODE_SIGN_IDENTITY = ""; 314 | CODE_SIGN_STYLE = Automatic; 315 | DEFINES_MODULE = YES; 316 | DEVELOPMENT_TEAM = K3WATBUBCW; 317 | DYLIB_COMPATIBILITY_VERSION = 1; 318 | DYLIB_CURRENT_VERSION = 1; 319 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 320 | INFOPLIST_FILE = JDToaster/Info.plist; 321 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 322 | LD_RUNPATH_SEARCH_PATHS = ( 323 | "$(inherited)", 324 | "@executable_path/Frameworks", 325 | "@loader_path/Frameworks", 326 | ); 327 | PRODUCT_BUNDLE_IDENTIFIER = disho.JDToaster; 328 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 329 | SKIP_INSTALL = YES; 330 | SWIFT_VERSION = 5.0; 331 | TARGETED_DEVICE_FAMILY = "1,2"; 332 | }; 333 | name = Release; 334 | }; 335 | /* End XCBuildConfiguration section */ 336 | 337 | /* Begin XCConfigurationList section */ 338 | 2CEAD1D022B131860058EAB7 /* Build configuration list for PBXProject "JDToaster" */ = { 339 | isa = XCConfigurationList; 340 | buildConfigurations = ( 341 | 2CEAD1DC22B131860058EAB7 /* Debug */, 342 | 2CEAD1DD22B131860058EAB7 /* Release */, 343 | ); 344 | defaultConfigurationIsVisible = 0; 345 | defaultConfigurationName = Release; 346 | }; 347 | 2CEAD1DE22B131860058EAB7 /* Build configuration list for PBXNativeTarget "JDToaster" */ = { 348 | isa = XCConfigurationList; 349 | buildConfigurations = ( 350 | 2CEAD1DF22B131860058EAB7 /* Debug */, 351 | 2CEAD1E022B131860058EAB7 /* Release */, 352 | ); 353 | defaultConfigurationIsVisible = 0; 354 | defaultConfigurationName = Release; 355 | }; 356 | /* End XCConfigurationList section */ 357 | }; 358 | rootObject = 2CEAD1CD22B131860058EAB7 /* Project object */; 359 | } 360 | -------------------------------------------------------------------------------- /JDToaster.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JDToaster/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /JDToaster/JDToaster.h: -------------------------------------------------------------------------------- 1 | // 2 | // JDToaster.h 3 | // JDToaster 4 | // 5 | // Created by Joan Disho on 12.06.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for JDToaster. 12 | FOUNDATION_EXPORT double JDToasterVersionNumber; 13 | 14 | //! Project version string for JDToaster. 15 | FOUNDATION_EXPORT const unsigned char JDToasterVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /JDToaster/Source/Toast.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Toast.swift 3 | // JDToaster 4 | // 5 | // Created by Joan Disho on 12.06.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public final class Toast { 13 | public var backgroundColor: UIColor = .black 14 | public var font: UIFont = .systemFont(ofSize: 17, weight: .medium) 15 | public var textColor: UIColor = .white 16 | public var textInsets: UIEdgeInsets = UIEdgeInsets(top: 16.0, left: 16.0, bottom: 16.0, right: 16.0) 17 | public var cornerRadius: CGFloat = 8.0 18 | public var bottomPadding: CGFloat = 16.0 19 | public var minimumHorizontalPadding: CGFloat = 24.0 20 | 21 | public static let `default` = Toast() 22 | 23 | private let feedbackGenerator = UINotificationFeedbackGenerator() 24 | private var window: UIWindow? 25 | private var timer: Timer? { 26 | willSet { 27 | timer?.invalidate() 28 | } 29 | } 30 | 31 | public func show( 32 | text: String, 33 | duration: Double, 34 | feedbackType: UINotificationFeedbackGenerator.FeedbackType = .success, 35 | animated: Bool = true 36 | ) { 37 | feedbackGenerator.prepare() 38 | feedbackGenerator.notificationOccurred(feedbackType) 39 | 40 | timer = Timer.scheduledTimer(withTimeInterval: duration, repeats: false) { [weak self] _ in 41 | self?.dismiss(animated: animated) 42 | } 43 | 44 | let toaster = ToastViewController( 45 | configuration: ToastViewController.Configuration( 46 | text: text, 47 | backgroundColor: backgroundColor, 48 | font: font, 49 | textColor: textColor, 50 | textInsets: textInsets, 51 | cornerRadius: cornerRadius, 52 | bottomPadding: bottomPadding, 53 | minimumHorizontalPadding: minimumHorizontalPadding 54 | ) 55 | ) 56 | 57 | window = UIWindow(frame: UIScreen.main.bounds) 58 | window?.isUserInteractionEnabled = false 59 | 60 | let viewController = UIViewController() 61 | viewController.view.backgroundColor = .clear 62 | 63 | window?.rootViewController = viewController 64 | window?.windowLevel = UIWindow.Level.normal + 1 65 | window?.makeKeyAndVisible() 66 | 67 | viewController.present(toaster, animated: animated, completion: nil) 68 | } 69 | 70 | public func dismiss(animated: Bool = true, completion: (() -> Void)? = nil) { 71 | let keyWindow: UIWindow? 72 | if #available(iOS 13.0, *) { 73 | keyWindow = UIApplication.shared.connectedScenes 74 | .filter { $0.activationState == .foregroundActive } 75 | .map { $0 as? UIWindowScene } 76 | .compactMap { $0 } 77 | .first?.windows 78 | .first(where: { $0.isKeyWindow }) 79 | } else { 80 | keyWindow = UIApplication.shared.keyWindow 81 | } 82 | 83 | guard let rootViewController = keyWindow?.rootViewController else { return } 84 | rootViewController.dismiss(animated: animated, completion: completion) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /JDToaster/Source/ToastPresentationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToastPresentationController.swift 3 | // JDToaster 4 | // 5 | // Created by Joan Disho on 12.06.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | final class ToastPresentationController: UIPresentationController { 13 | 14 | var bottomPadding: CGFloat = 0.0 15 | var minimumHorizontalPadding: CGFloat = 0.0 16 | 17 | override var frameOfPresentedViewInContainerView: CGRect { 18 | guard let containerView = containerView else { return .zero } 19 | guard let presentedView = presentedView else { return .zero } 20 | 21 | containerView.isUserInteractionEnabled = false 22 | 23 | let safeAreaFrame = containerView.bounds.inset(by: containerView.safeAreaInsets) 24 | 25 | let requiredFullWidthTargetSize = presentedView.systemLayoutSizeFitting( 26 | CGSize( 27 | width: safeAreaFrame.width - 2 * minimumHorizontalPadding, 28 | height: UIView.layoutFittingCompressedSize.height 29 | ), 30 | withHorizontalFittingPriority: .required, 31 | verticalFittingPriority: .defaultLow 32 | ) 33 | 34 | let defaultLowMinimumWidthTargetSize = presentedView.systemLayoutSizeFitting( 35 | UIView.layoutFittingCompressedSize, 36 | withHorizontalFittingPriority: .defaultLow, 37 | verticalFittingPriority: .defaultLow 38 | ) 39 | 40 | var frame = safeAreaFrame 41 | 42 | frame.origin.y += frame.size.height - requiredFullWidthTargetSize.height - bottomPadding 43 | 44 | if defaultLowMinimumWidthTargetSize.width > safeAreaFrame.width - 2 * minimumHorizontalPadding { 45 | frame.origin.x += minimumHorizontalPadding 46 | frame.size.width = requiredFullWidthTargetSize.width 47 | } else { 48 | frame.origin.x += (frame.size.width - defaultLowMinimumWidthTargetSize.width) / 2 49 | frame.size.width = defaultLowMinimumWidthTargetSize.width 50 | } 51 | 52 | frame.size.height = requiredFullWidthTargetSize.height 53 | 54 | return frame 55 | } 56 | 57 | override func containerViewDidLayoutSubviews() { 58 | super.containerViewDidLayoutSubviews() 59 | presentedView?.frame = frameOfPresentedViewInContainerView 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /JDToaster/Source/ToastViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToastViewController.swift 3 | // JDToaster 4 | // 5 | // Created by Joan Disho on 12.06.19. 6 | // Copyright © 2019 disho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | final class ToastViewController: UIViewController, UIViewControllerTransitioningDelegate { 13 | struct Configuration { 14 | let text: String 15 | let backgroundColor: UIColor 16 | let font: UIFont 17 | let textColor: UIColor 18 | let textInsets: UIEdgeInsets 19 | let cornerRadius: CGFloat 20 | let bottomPadding: CGFloat 21 | let minimumHorizontalPadding: CGFloat 22 | } 23 | 24 | private let configuration: Configuration 25 | 26 | private var cornerRadius: CGFloat { 27 | didSet { 28 | view.layoutSubviews() 29 | } 30 | } 31 | 32 | init(configuration: Configuration) { 33 | self.configuration = configuration 34 | cornerRadius = configuration.cornerRadius 35 | 36 | super.init(nibName: nil, bundle: nil) 37 | 38 | transitioningDelegate = self 39 | modalPresentationStyle = .custom 40 | 41 | view.backgroundColor = configuration.backgroundColor 42 | 43 | let label = UILabel() 44 | label.font = configuration.font 45 | label.textColor = configuration.textColor 46 | label.text = configuration.text 47 | label.numberOfLines = 0 48 | 49 | view.addSubview(label) 50 | label.translatesAutoresizingMaskIntoConstraints = false 51 | 52 | NSLayoutConstraint.activate([ 53 | label.topAnchor.constraint( 54 | equalTo: view.topAnchor, constant: configuration.textInsets.top), 55 | label.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -configuration.textInsets.bottom), 56 | label.widthAnchor.constraint(lessThanOrEqualTo: view.widthAnchor, constant: -(configuration.textInsets.left + configuration.textInsets.right)), 57 | label.centerXAnchor.constraint(equalTo: view.centerXAnchor) 58 | ]) 59 | } 60 | 61 | required init?(coder aDecoder: NSCoder) { 62 | fatalError("init(coder:) has not been implemented") 63 | } 64 | 65 | override func viewDidLayoutSubviews() { 66 | view.layer.roundCorners(radius: cornerRadius) 67 | } 68 | 69 | func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { 70 | let toastPresentationController = ToastPresentationController(presentedViewController: presented, presenting: presenting) 71 | toastPresentationController.bottomPadding = configuration.bottomPadding 72 | toastPresentationController.minimumHorizontalPadding = configuration.minimumHorizontalPadding 73 | return toastPresentationController 74 | } 75 | } 76 | 77 | private extension CALayer { 78 | func roundCorners(_ corners: UIRectCorner = .allCorners, radius: CGFloat) { 79 | let path = UIBezierPath( 80 | roundedRect: bounds, 81 | byRoundingCorners: corners, 82 | cornerRadii: CGSize(width: radius, height: radius) 83 | ) 84 | let mask = CAShapeLayer() 85 | mask.path = path.cgPath 86 | self.mask = mask 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Joan Disho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🍞 Toasty iOS alerts 2 | 3 |

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

14 | A toast provides simple feedback in the bottom of the screen about an operation in an popup, which only fills the required amount of space for the message. The current popup remains visible until it’s manully dismissed or automaticaly after a given timeout. It doesn't interupt the user experience and doesn't require any user input to dismiss. 15 | 16 | Similar to an `UIAlertController`, a toast is displayed in a separate `UIWindow`. 17 | This means that it’s presented on top of everything, regardless the view hierarchy. 18 | 19 | ## 🛠 Installation 20 | 21 | ### CocoaPods 22 | 23 | To integrate `JDToaster` into your Xcode project using `CocoaPods`, specify it in your `Podfile`: 24 | 25 | ```ruby 26 | pod 'JDToaster' 27 | ``` 28 | 29 | Then, run the following command: 30 | 31 | ```bash 32 | pod install 33 | ``` 34 | 35 | ### Manually 36 | If you prefer not to use any of the dependency managers, you can integrate `JDToaster` into your project manually, by downloading the source code and placing the files on your project directory. 37 | 38 | ## 👩‍💻 Usage 39 | 40 | ### The Basics 41 | 42 | #### Display a toast 43 | 44 | ```swift 45 | Toaster.default.show(text: “Hello Toast!”) 46 | ``` 47 | 48 | #### Dismiss a toast 49 | 50 | ```swift 51 | Toaster.default.dismiss(animated: true) 52 | ``` 53 | 54 | ### 🎨 Customizations 55 | 56 | | Property | Type | Default | Description | 57 | |----------------------------|----------------|------------------------------------------------------------------|--------------------------------------------------------------------| 58 | | `backgroundColor` | `UIColor` | `.black` | Background colour of the toast | 59 | | `font` | `UIFont` | `.systemFont(ofSize: 17, weight: .medium)` | Font of the presented text | 60 | | `textColor` | `UIColor` | `.white` | Colour of the presented text | 61 | | `textInsets` | `UIEdgeInsets` | `UIEdgeInsets(top: 16.0, left: 16.0, bottom: 16.0, right: 16.0)` | Insets of the text within the toast | 62 | | `cornerRadius` | `CGFloat` | `8.0` | Corner radius of the toast | 63 | | `bottomPadding` | `CGFloat` | `16.0` | The space between the toast bottom board and the bottom | 64 | | `minimumHorizontalPadding` | `CGFloat` | `24.0` | The minimum space between the toast left/right board and the view. | 65 | 66 | ## ✨ Example 67 | Checkout the [Example](https://github.com/jdisho/JDToaster/tree/master/Example) project 68 | 69 |

70 | 71 | 72 | 73 |

74 | 75 | ## 🙏 Acknowledgments 76 | - [Toaster](https://github.com/devxoul/Toaster) by [@devxoul](https://twitter.com/devxoul) 77 | - [Squawk](https://github.com/GitHawkApp/Squawk) by [@_ryannystrom](https://twitter.com/_ryannystrom) 78 | - [Custom View Controller Presentation Tips & Tricks](https://kylebashour.com/posts/custom-view-controller-presentation-tips) by [@kylebshr](https://twitter.com/kylebshr) 79 | 80 | ## 🐨 Author 81 | This tiny library is created with ❤️ by [Joan Disho](https://twitter.com/_disho). 82 | 83 | ## 📃 License 84 | `JDToaster` is released under an MIT license. See [License.md](https://github.com/jdisho/JDToaster/blob/master/LICENSE) for more information. 85 | 86 | 87 | 88 | --------------------------------------------------------------------------------