├── .gitignore ├── .swift-version ├── CHANGELOG.md ├── Each Example ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist └── ViewController.swift ├── Each.podspec ├── Each.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcshareddata │ └── xcschemes │ │ ├── Each iOS.xcscheme │ │ ├── Each macOS.xcscheme │ │ ├── Each tvOS.xcscheme │ │ └── Each watchOS.xcscheme └── xcuserdata │ └── Luca.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── EachTests ├── EachTestCases.swift ├── EachTimeIntervalTestCases.swift └── Info.plist ├── LICENSE ├── README.md └── Sources ├── Each-macOS.h ├── Each.h ├── Each.swift ├── Info-iOS.plist ├── Info-macOS.plist ├── Info-tvOS.plist └── Info-watchOS.plist /.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 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | `Each` adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | #### 1.x Releases 6 | - `1.2.x` Releases - [1.2.0](#120) 7 | - `1.1.x` Releases - [1.1.0](#110) | [1.1.1](#111) 8 | - `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101) 9 | 10 | ## [1.2.0](https://github.com/dalu93/Each/releases/tag/1.2.0) 11 | Release on 2016-12-05 12 | 13 | #### Added 14 | - Carthage compatibility [#12](https://github.com/dalu93/Each/pull/12) by [stupergenius](https://github.com/stupergenius) 15 | 16 | ## [1.1.1](https://github.com/dalu93/Each/releases/tag/1.1.1) 17 | Release on 2016-10-31 18 | 19 | #### Added 20 | - [perform(on: _) method for an automatic memory management system](https://github.com/dalu93/Each/pull/9) by [Luca D'Alberti](https://github.com/dalu93) 21 | 22 | #### Fixed 23 | - [isStopped variable is now read-only from the outside](https://github.com/dalu93/Each/commit/47b68658ef11b7642c8e34584ecf6ed328c5ceaa) by [Luca D'Alberti](https://github.com/dalu93) 24 | 25 | ## [1.1.0](https://github.com/dalu93/Each/releases/tag/1.1.0) 26 | Released on 2016-10-25 27 | 28 | #### Fixed 29 | - [Fixed the internal protection level error when creating a new instance](https://github.com/dalu93/Each/issues/8) by [Luca D'Alberti](https://github.com/dalu93) 30 | 31 | #### Improved 32 | - [Perform closure return type more readable by using enum](https://github.com/dalu93/Each/pull/7) by [Luca D'Alberti](https://github.com/dalu93) 33 | 34 | ## [1.0.1](https://github.com/dalu93/Each/releases/tag/1.0.1) 35 | Released on 2016-10-22 36 | 37 | #### Fixed 38 | - [Use the correct value for the milliseconds multiplier](https://github.com/dalu93/Each/pull/3) by [Sam Jones](https://github.com/sjoness) 39 | 40 | ## [1.0.0](https://github.com/dalu93/Each/releases/tag/1.0.0) 41 | Released on 2016-10-14. 42 | 43 | #### Added 44 | - Initial release of Each. 45 | - Added by [Luca D'Alberti](https://github.com/dalu93). 46 | -------------------------------------------------------------------------------- /Each Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Each 4 | // 5 | // Created by Luca D'Alberti on 10/14/16. 6 | // Copyright © 2016 dalu93. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and 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 | -------------------------------------------------------------------------------- /Each Example/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 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Each Example/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Each Example/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 | -------------------------------------------------------------------------------- /Each 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 | 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 | -------------------------------------------------------------------------------- /Each Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Each 4 | // 5 | // Created by Luca D'Alberti on 10/14/16. 6 | // Copyright © 2016 dalu93. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Each 11 | 12 | class ViewController: UIViewController { 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // 1. Instantiate the Each class with a value 17 | // 2. Define the value mesure (milliseconds, seconds, minutes, hours) 18 | // 3. Register the perfom closure 19 | // 4. Return .continue in the closure to continue, otherwise .stop to stop the timer 20 | Each(1).seconds.perform { 21 | print("second passed") 22 | return .continue 23 | } 24 | } 25 | 26 | override func didReceiveMemoryWarning() { 27 | super.didReceiveMemoryWarning() 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Each.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Each' 3 | s.version = '1.2.0' 4 | s.license = 'MIT' 5 | s.summary = 'Elegant NSTimer interface in Swift' 6 | s.homepage = 'https://github.com/dalu93/Each' 7 | s.social_media_url = 'https://twitter.com/DAlbertiLuca' 8 | s.authors = { 'dalu93' => 'dalberti.luca93@gmail.com' } 9 | s.source = { :git => 'https://github.com/dalu93/Each.git', :tag => s.version } 10 | 11 | s.ios.deployment_target = '8.0' 12 | s.osx.deployment_target = '10.10' 13 | s.tvos.deployment_target = '9.0' 14 | s.watchos.deployment_target = '2.0' 15 | 16 | s.source_files = 'Sources/*.swift' 17 | end 18 | -------------------------------------------------------------------------------- /Each.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0F41C41C1DF372740076BB6B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F41C4141DF372740076BB6B /* AppDelegate.swift */; }; 11 | 0F41C41D1DF372740076BB6B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0F41C4151DF372740076BB6B /* Assets.xcassets */; }; 12 | 0F41C41E1DF372740076BB6B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F41C4161DF372740076BB6B /* LaunchScreen.storyboard */; }; 13 | 0F41C41F1DF372740076BB6B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F41C4181DF372740076BB6B /* Main.storyboard */; }; 14 | 0F41C4211DF372740076BB6B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F41C41B1DF372740076BB6B /* ViewController.swift */; }; 15 | 0F41C42E1DF372A90076BB6B /* Each.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F41C4271DF372A90076BB6B /* Each.framework */; }; 16 | 0F41C42F1DF372A90076BB6B /* Each.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0F41C4271DF372A90076BB6B /* Each.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 0F41C4341DF373470076BB6B /* Each.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A194681DB0C3EC00985EC0 /* Each.swift */; }; 18 | 0F41C4351DF373600076BB6B /* Each.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F41C4271DF372A90076BB6B /* Each.framework */; }; 19 | 0F41C4761DF37AEE0076BB6B /* Each.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A194681DB0C3EC00985EC0 /* Each.swift */; }; 20 | 0F41C4771DF37AEF0076BB6B /* Each.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A194681DB0C3EC00985EC0 /* Each.swift */; }; 21 | 0F41C4781DF37AEF0076BB6B /* Each.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A194681DB0C3EC00985EC0 /* Each.swift */; }; 22 | 0F41C4791DF37BC10076BB6B /* Each.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F41C43A1DF373B40076BB6B /* Each.h */; settings = {ATTRIBUTES = (Public, ); }; }; 23 | 0F41C47A1DF37BC20076BB6B /* Each.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F41C43A1DF373B40076BB6B /* Each.h */; settings = {ATTRIBUTES = (Public, ); }; }; 24 | 0F41C47B1DF37BC20076BB6B /* Each.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F41C43A1DF373B40076BB6B /* Each.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25 | 0F41C4981DF37D2D0076BB6B /* Each-macOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F41C4971DF37D2D0076BB6B /* Each-macOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26 | 817D34741DBB6A4A0059E633 /* EachTimeIntervalTestCases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817D34731DBB6A4A0059E633 /* EachTimeIntervalTestCases.swift */; }; 27 | 81C8F80D1DB0C487009FE6D3 /* EachTestCases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C8F80C1DB0C487009FE6D3 /* EachTestCases.swift */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 0F41C42C1DF372A90076BB6B /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 81A1943C1DB0C3A100985EC0 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 0F41C4261DF372A90076BB6B; 36 | remoteInfo = Each; 37 | }; 38 | 0F41C4381DF3736E0076BB6B /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 81A1943C1DB0C3A100985EC0 /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = 0F41C4261DF372A90076BB6B; 43 | remoteInfo = Each; 44 | }; 45 | /* End PBXContainerItemProxy section */ 46 | 47 | /* Begin PBXCopyFilesBuildPhase section */ 48 | 0F41C4331DF372A90076BB6B /* Embed Frameworks */ = { 49 | isa = PBXCopyFilesBuildPhase; 50 | buildActionMask = 2147483647; 51 | dstPath = ""; 52 | dstSubfolderSpec = 10; 53 | files = ( 54 | 0F41C42F1DF372A90076BB6B /* Each.framework in Embed Frameworks */, 55 | ); 56 | name = "Embed Frameworks"; 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | /* End PBXCopyFilesBuildPhase section */ 60 | 61 | /* Begin PBXFileReference section */ 62 | 0F41C4141DF372740076BB6B /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 63 | 0F41C4151DF372740076BB6B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 64 | 0F41C4171DF372740076BB6B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 65 | 0F41C4191DF372740076BB6B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 66 | 0F41C41A1DF372740076BB6B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | 0F41C41B1DF372740076BB6B /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 68 | 0F41C4271DF372A90076BB6B /* Each.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Each.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | 0F41C43A1DF373B40076BB6B /* Each.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Each.h; path = Sources/Each.h; sourceTree = ""; }; 70 | 0F41C4501DF378400076BB6B /* Each.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Each.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | 0F41C45D1DF378E00076BB6B /* Each.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Each.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 72 | 0F41C4651DF379600076BB6B /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-iOS.plist"; path = "Sources/Info-iOS.plist"; sourceTree = ""; }; 73 | 0F41C4661DF379600076BB6B /* Info-tvOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-tvOS.plist"; path = "Sources/Info-tvOS.plist"; sourceTree = ""; }; 74 | 0F41C4671DF379600076BB6B /* Info-watchOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-watchOS.plist"; path = "Sources/Info-watchOS.plist"; sourceTree = ""; }; 75 | 0F41C46D1DF379C70076BB6B /* Each.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Each.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 76 | 0F41C4751DF379FF0076BB6B /* Info-macOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-macOS.plist"; path = "Sources/Info-macOS.plist"; sourceTree = ""; }; 77 | 0F41C4971DF37D2D0076BB6B /* Each-macOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Each-macOS.h"; path = "Sources/Each-macOS.h"; sourceTree = ""; }; 78 | 817D34731DBB6A4A0059E633 /* EachTimeIntervalTestCases.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EachTimeIntervalTestCases.swift; sourceTree = ""; }; 79 | 81A194441DB0C3A100985EC0 /* Each Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Each Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | 81A194581DB0C3A200985EC0 /* EachTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EachTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | 81A1945E1DB0C3A200985EC0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 82 | 81A194681DB0C3EC00985EC0 /* Each.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Each.swift; path = Sources/Each.swift; sourceTree = ""; }; 83 | 81C8F80C1DB0C487009FE6D3 /* EachTestCases.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EachTestCases.swift; sourceTree = ""; }; 84 | 81C8F80E1DB0C61E009FE6D3 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 85 | 81C8F8101DB0C62F009FE6D3 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; 86 | 81C8F8121DB0CB24009FE6D3 /* .swift-version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ".swift-version"; sourceTree = ""; }; 87 | 81C8F8141DB0CB62009FE6D3 /* Each.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Each.podspec; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | 0F41C4231DF372A90076BB6B /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | ); 96 | runOnlyForDeploymentPostprocessing = 0; 97 | }; 98 | 0F41C44C1DF378400076BB6B /* Frameworks */ = { 99 | isa = PBXFrameworksBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | ); 103 | runOnlyForDeploymentPostprocessing = 0; 104 | }; 105 | 0F41C4591DF378E00076BB6B /* Frameworks */ = { 106 | isa = PBXFrameworksBuildPhase; 107 | buildActionMask = 2147483647; 108 | files = ( 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | 0F41C4691DF379C70076BB6B /* Frameworks */ = { 113 | isa = PBXFrameworksBuildPhase; 114 | buildActionMask = 2147483647; 115 | files = ( 116 | ); 117 | runOnlyForDeploymentPostprocessing = 0; 118 | }; 119 | 81A194411DB0C3A100985EC0 /* Frameworks */ = { 120 | isa = PBXFrameworksBuildPhase; 121 | buildActionMask = 2147483647; 122 | files = ( 123 | 0F41C42E1DF372A90076BB6B /* Each.framework in Frameworks */, 124 | ); 125 | runOnlyForDeploymentPostprocessing = 0; 126 | }; 127 | 81A194551DB0C3A200985EC0 /* Frameworks */ = { 128 | isa = PBXFrameworksBuildPhase; 129 | buildActionMask = 2147483647; 130 | files = ( 131 | 0F41C4351DF373600076BB6B /* Each.framework in Frameworks */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXFrameworksBuildPhase section */ 136 | 137 | /* Begin PBXGroup section */ 138 | 0F41C4131DF372740076BB6B /* Each Example */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 0F41C4141DF372740076BB6B /* AppDelegate.swift */, 142 | 0F41C4151DF372740076BB6B /* Assets.xcassets */, 143 | 0F41C4161DF372740076BB6B /* LaunchScreen.storyboard */, 144 | 0F41C4181DF372740076BB6B /* Main.storyboard */, 145 | 0F41C41A1DF372740076BB6B /* Info.plist */, 146 | 0F41C41B1DF372740076BB6B /* ViewController.swift */, 147 | ); 148 | path = "Each Example"; 149 | sourceTree = ""; 150 | }; 151 | 81A1943B1DB0C3A100985EC0 = { 152 | isa = PBXGroup; 153 | children = ( 154 | 81C8F8141DB0CB62009FE6D3 /* Each.podspec */, 155 | 81C8F8121DB0CB24009FE6D3 /* .swift-version */, 156 | 81C8F8101DB0C62F009FE6D3 /* CHANGELOG.md */, 157 | 81C8F80E1DB0C61E009FE6D3 /* README.md */, 158 | 81A194671DB0C3E100985EC0 /* Sources */, 159 | 0F41C4131DF372740076BB6B /* Each Example */, 160 | 81A1945B1DB0C3A200985EC0 /* EachTests */, 161 | 81A194451DB0C3A100985EC0 /* Products */, 162 | ); 163 | sourceTree = ""; 164 | }; 165 | 81A194451DB0C3A100985EC0 /* Products */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 81A194441DB0C3A100985EC0 /* Each Example.app */, 169 | 81A194581DB0C3A200985EC0 /* EachTests.xctest */, 170 | 0F41C4271DF372A90076BB6B /* Each.framework */, 171 | 0F41C4501DF378400076BB6B /* Each.framework */, 172 | 0F41C45D1DF378E00076BB6B /* Each.framework */, 173 | 0F41C46D1DF379C70076BB6B /* Each.framework */, 174 | ); 175 | name = Products; 176 | sourceTree = ""; 177 | }; 178 | 81A1945B1DB0C3A200985EC0 /* EachTests */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 81C8F80C1DB0C487009FE6D3 /* EachTestCases.swift */, 182 | 817D34731DBB6A4A0059E633 /* EachTimeIntervalTestCases.swift */, 183 | 81A1945E1DB0C3A200985EC0 /* Info.plist */, 184 | ); 185 | path = EachTests; 186 | sourceTree = ""; 187 | }; 188 | 81A194671DB0C3E100985EC0 /* Sources */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 81A194681DB0C3EC00985EC0 /* Each.swift */, 192 | 0F41C43A1DF373B40076BB6B /* Each.h */, 193 | 0F41C4971DF37D2D0076BB6B /* Each-macOS.h */, 194 | 0F41C4651DF379600076BB6B /* Info-iOS.plist */, 195 | 0F41C4751DF379FF0076BB6B /* Info-macOS.plist */, 196 | 0F41C4661DF379600076BB6B /* Info-tvOS.plist */, 197 | 0F41C4671DF379600076BB6B /* Info-watchOS.plist */, 198 | ); 199 | name = Sources; 200 | sourceTree = ""; 201 | }; 202 | /* End PBXGroup section */ 203 | 204 | /* Begin PBXHeadersBuildPhase section */ 205 | 0F41C4241DF372A90076BB6B /* Headers */ = { 206 | isa = PBXHeadersBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | 0F41C4791DF37BC10076BB6B /* Each.h in Headers */, 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | }; 213 | 0F41C44D1DF378400076BB6B /* Headers */ = { 214 | isa = PBXHeadersBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | 0F41C47B1DF37BC20076BB6B /* Each.h in Headers */, 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | }; 221 | 0F41C45A1DF378E00076BB6B /* Headers */ = { 222 | isa = PBXHeadersBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | 0F41C47A1DF37BC20076BB6B /* Each.h in Headers */, 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | }; 229 | 0F41C46A1DF379C70076BB6B /* Headers */ = { 230 | isa = PBXHeadersBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | 0F41C4981DF37D2D0076BB6B /* Each-macOS.h in Headers */, 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | /* End PBXHeadersBuildPhase section */ 238 | 239 | /* Begin PBXNativeTarget section */ 240 | 0F41C4261DF372A90076BB6B /* Each iOS */ = { 241 | isa = PBXNativeTarget; 242 | buildConfigurationList = 0F41C4301DF372A90076BB6B /* Build configuration list for PBXNativeTarget "Each iOS" */; 243 | buildPhases = ( 244 | 0F41C4221DF372A90076BB6B /* Sources */, 245 | 0F41C4231DF372A90076BB6B /* Frameworks */, 246 | 0F41C4241DF372A90076BB6B /* Headers */, 247 | 0F41C4251DF372A90076BB6B /* Resources */, 248 | ); 249 | buildRules = ( 250 | ); 251 | dependencies = ( 252 | ); 253 | name = "Each iOS"; 254 | productName = Each; 255 | productReference = 0F41C4271DF372A90076BB6B /* Each.framework */; 256 | productType = "com.apple.product-type.framework"; 257 | }; 258 | 0F41C44F1DF378400076BB6B /* Each watchOS */ = { 259 | isa = PBXNativeTarget; 260 | buildConfigurationList = 0F41C4551DF378400076BB6B /* Build configuration list for PBXNativeTarget "Each watchOS" */; 261 | buildPhases = ( 262 | 0F41C44B1DF378400076BB6B /* Sources */, 263 | 0F41C44C1DF378400076BB6B /* Frameworks */, 264 | 0F41C44D1DF378400076BB6B /* Headers */, 265 | 0F41C44E1DF378400076BB6B /* Resources */, 266 | ); 267 | buildRules = ( 268 | ); 269 | dependencies = ( 270 | ); 271 | name = "Each watchOS"; 272 | productName = "Each WatchOS"; 273 | productReference = 0F41C4501DF378400076BB6B /* Each.framework */; 274 | productType = "com.apple.product-type.framework"; 275 | }; 276 | 0F41C45C1DF378E00076BB6B /* Each tvOS */ = { 277 | isa = PBXNativeTarget; 278 | buildConfigurationList = 0F41C4621DF378E00076BB6B /* Build configuration list for PBXNativeTarget "Each tvOS" */; 279 | buildPhases = ( 280 | 0F41C4581DF378E00076BB6B /* Sources */, 281 | 0F41C4591DF378E00076BB6B /* Frameworks */, 282 | 0F41C45A1DF378E00076BB6B /* Headers */, 283 | 0F41C45B1DF378E00076BB6B /* Resources */, 284 | ); 285 | buildRules = ( 286 | ); 287 | dependencies = ( 288 | ); 289 | name = "Each tvOS"; 290 | productName = "Each tvOS"; 291 | productReference = 0F41C45D1DF378E00076BB6B /* Each.framework */; 292 | productType = "com.apple.product-type.framework"; 293 | }; 294 | 0F41C46C1DF379C70076BB6B /* Each macOS */ = { 295 | isa = PBXNativeTarget; 296 | buildConfigurationList = 0F41C4721DF379C70076BB6B /* Build configuration list for PBXNativeTarget "Each macOS" */; 297 | buildPhases = ( 298 | 0F41C4681DF379C70076BB6B /* Sources */, 299 | 0F41C4691DF379C70076BB6B /* Frameworks */, 300 | 0F41C46A1DF379C70076BB6B /* Headers */, 301 | 0F41C46B1DF379C70076BB6B /* Resources */, 302 | ); 303 | buildRules = ( 304 | ); 305 | dependencies = ( 306 | ); 307 | name = "Each macOS"; 308 | productName = "Each macOS"; 309 | productReference = 0F41C46D1DF379C70076BB6B /* Each.framework */; 310 | productType = "com.apple.product-type.framework"; 311 | }; 312 | 81A194431DB0C3A100985EC0 /* Each Example */ = { 313 | isa = PBXNativeTarget; 314 | buildConfigurationList = 81A194611DB0C3A200985EC0 /* Build configuration list for PBXNativeTarget "Each Example" */; 315 | buildPhases = ( 316 | 81A194401DB0C3A100985EC0 /* Sources */, 317 | 81A194411DB0C3A100985EC0 /* Frameworks */, 318 | 81A194421DB0C3A100985EC0 /* Resources */, 319 | 0F41C4331DF372A90076BB6B /* Embed Frameworks */, 320 | ); 321 | buildRules = ( 322 | ); 323 | dependencies = ( 324 | 0F41C42D1DF372A90076BB6B /* PBXTargetDependency */, 325 | ); 326 | name = "Each Example"; 327 | productName = Each; 328 | productReference = 81A194441DB0C3A100985EC0 /* Each Example.app */; 329 | productType = "com.apple.product-type.application"; 330 | }; 331 | 81A194571DB0C3A200985EC0 /* EachTests */ = { 332 | isa = PBXNativeTarget; 333 | buildConfigurationList = 81A194641DB0C3A200985EC0 /* Build configuration list for PBXNativeTarget "EachTests" */; 334 | buildPhases = ( 335 | 81A194541DB0C3A200985EC0 /* Sources */, 336 | 81A194551DB0C3A200985EC0 /* Frameworks */, 337 | 81A194561DB0C3A200985EC0 /* Resources */, 338 | ); 339 | buildRules = ( 340 | ); 341 | dependencies = ( 342 | 0F41C4391DF3736E0076BB6B /* PBXTargetDependency */, 343 | ); 344 | name = EachTests; 345 | productName = EachTests; 346 | productReference = 81A194581DB0C3A200985EC0 /* EachTests.xctest */; 347 | productType = "com.apple.product-type.bundle.unit-test"; 348 | }; 349 | /* End PBXNativeTarget section */ 350 | 351 | /* Begin PBXProject section */ 352 | 81A1943C1DB0C3A100985EC0 /* Project object */ = { 353 | isa = PBXProject; 354 | attributes = { 355 | LastSwiftUpdateCheck = 0800; 356 | LastUpgradeCheck = 0810; 357 | ORGANIZATIONNAME = dalu93; 358 | TargetAttributes = { 359 | 0F41C4261DF372A90076BB6B = { 360 | CreatedOnToolsVersion = 8.1; 361 | ProvisioningStyle = Automatic; 362 | }; 363 | 0F41C44F1DF378400076BB6B = { 364 | CreatedOnToolsVersion = 8.1; 365 | ProvisioningStyle = Automatic; 366 | }; 367 | 0F41C45C1DF378E00076BB6B = { 368 | CreatedOnToolsVersion = 8.1; 369 | ProvisioningStyle = Automatic; 370 | }; 371 | 0F41C46C1DF379C70076BB6B = { 372 | CreatedOnToolsVersion = 8.1; 373 | ProvisioningStyle = Automatic; 374 | }; 375 | 81A194431DB0C3A100985EC0 = { 376 | CreatedOnToolsVersion = 8.0; 377 | ProvisioningStyle = Automatic; 378 | }; 379 | 81A194571DB0C3A200985EC0 = { 380 | CreatedOnToolsVersion = 8.0; 381 | ProvisioningStyle = Automatic; 382 | TestTargetID = 81A194431DB0C3A100985EC0; 383 | }; 384 | }; 385 | }; 386 | buildConfigurationList = 81A1943F1DB0C3A100985EC0 /* Build configuration list for PBXProject "Each" */; 387 | compatibilityVersion = "Xcode 3.2"; 388 | developmentRegion = English; 389 | hasScannedForEncodings = 0; 390 | knownRegions = ( 391 | en, 392 | Base, 393 | ); 394 | mainGroup = 81A1943B1DB0C3A100985EC0; 395 | productRefGroup = 81A194451DB0C3A100985EC0 /* Products */; 396 | projectDirPath = ""; 397 | projectRoot = ""; 398 | targets = ( 399 | 0F41C4261DF372A90076BB6B /* Each iOS */, 400 | 0F41C45C1DF378E00076BB6B /* Each tvOS */, 401 | 0F41C44F1DF378400076BB6B /* Each watchOS */, 402 | 0F41C46C1DF379C70076BB6B /* Each macOS */, 403 | 81A194571DB0C3A200985EC0 /* EachTests */, 404 | 81A194431DB0C3A100985EC0 /* Each Example */, 405 | ); 406 | }; 407 | /* End PBXProject section */ 408 | 409 | /* Begin PBXResourcesBuildPhase section */ 410 | 0F41C4251DF372A90076BB6B /* Resources */ = { 411 | isa = PBXResourcesBuildPhase; 412 | buildActionMask = 2147483647; 413 | files = ( 414 | ); 415 | runOnlyForDeploymentPostprocessing = 0; 416 | }; 417 | 0F41C44E1DF378400076BB6B /* Resources */ = { 418 | isa = PBXResourcesBuildPhase; 419 | buildActionMask = 2147483647; 420 | files = ( 421 | ); 422 | runOnlyForDeploymentPostprocessing = 0; 423 | }; 424 | 0F41C45B1DF378E00076BB6B /* Resources */ = { 425 | isa = PBXResourcesBuildPhase; 426 | buildActionMask = 2147483647; 427 | files = ( 428 | ); 429 | runOnlyForDeploymentPostprocessing = 0; 430 | }; 431 | 0F41C46B1DF379C70076BB6B /* Resources */ = { 432 | isa = PBXResourcesBuildPhase; 433 | buildActionMask = 2147483647; 434 | files = ( 435 | ); 436 | runOnlyForDeploymentPostprocessing = 0; 437 | }; 438 | 81A194421DB0C3A100985EC0 /* Resources */ = { 439 | isa = PBXResourcesBuildPhase; 440 | buildActionMask = 2147483647; 441 | files = ( 442 | 0F41C41F1DF372740076BB6B /* Main.storyboard in Resources */, 443 | 0F41C41D1DF372740076BB6B /* Assets.xcassets in Resources */, 444 | 0F41C41E1DF372740076BB6B /* LaunchScreen.storyboard in Resources */, 445 | ); 446 | runOnlyForDeploymentPostprocessing = 0; 447 | }; 448 | 81A194561DB0C3A200985EC0 /* Resources */ = { 449 | isa = PBXResourcesBuildPhase; 450 | buildActionMask = 2147483647; 451 | files = ( 452 | ); 453 | runOnlyForDeploymentPostprocessing = 0; 454 | }; 455 | /* End PBXResourcesBuildPhase section */ 456 | 457 | /* Begin PBXSourcesBuildPhase section */ 458 | 0F41C4221DF372A90076BB6B /* Sources */ = { 459 | isa = PBXSourcesBuildPhase; 460 | buildActionMask = 2147483647; 461 | files = ( 462 | 0F41C4341DF373470076BB6B /* Each.swift in Sources */, 463 | ); 464 | runOnlyForDeploymentPostprocessing = 0; 465 | }; 466 | 0F41C44B1DF378400076BB6B /* Sources */ = { 467 | isa = PBXSourcesBuildPhase; 468 | buildActionMask = 2147483647; 469 | files = ( 470 | 0F41C4771DF37AEF0076BB6B /* Each.swift in Sources */, 471 | ); 472 | runOnlyForDeploymentPostprocessing = 0; 473 | }; 474 | 0F41C4581DF378E00076BB6B /* Sources */ = { 475 | isa = PBXSourcesBuildPhase; 476 | buildActionMask = 2147483647; 477 | files = ( 478 | 0F41C4761DF37AEE0076BB6B /* Each.swift in Sources */, 479 | ); 480 | runOnlyForDeploymentPostprocessing = 0; 481 | }; 482 | 0F41C4681DF379C70076BB6B /* Sources */ = { 483 | isa = PBXSourcesBuildPhase; 484 | buildActionMask = 2147483647; 485 | files = ( 486 | 0F41C4781DF37AEF0076BB6B /* Each.swift in Sources */, 487 | ); 488 | runOnlyForDeploymentPostprocessing = 0; 489 | }; 490 | 81A194401DB0C3A100985EC0 /* Sources */ = { 491 | isa = PBXSourcesBuildPhase; 492 | buildActionMask = 2147483647; 493 | files = ( 494 | 0F41C4211DF372740076BB6B /* ViewController.swift in Sources */, 495 | 0F41C41C1DF372740076BB6B /* AppDelegate.swift in Sources */, 496 | ); 497 | runOnlyForDeploymentPostprocessing = 0; 498 | }; 499 | 81A194541DB0C3A200985EC0 /* Sources */ = { 500 | isa = PBXSourcesBuildPhase; 501 | buildActionMask = 2147483647; 502 | files = ( 503 | 817D34741DBB6A4A0059E633 /* EachTimeIntervalTestCases.swift in Sources */, 504 | 81C8F80D1DB0C487009FE6D3 /* EachTestCases.swift in Sources */, 505 | ); 506 | runOnlyForDeploymentPostprocessing = 0; 507 | }; 508 | /* End PBXSourcesBuildPhase section */ 509 | 510 | /* Begin PBXTargetDependency section */ 511 | 0F41C42D1DF372A90076BB6B /* PBXTargetDependency */ = { 512 | isa = PBXTargetDependency; 513 | target = 0F41C4261DF372A90076BB6B /* Each iOS */; 514 | targetProxy = 0F41C42C1DF372A90076BB6B /* PBXContainerItemProxy */; 515 | }; 516 | 0F41C4391DF3736E0076BB6B /* PBXTargetDependency */ = { 517 | isa = PBXTargetDependency; 518 | target = 0F41C4261DF372A90076BB6B /* Each iOS */; 519 | targetProxy = 0F41C4381DF3736E0076BB6B /* PBXContainerItemProxy */; 520 | }; 521 | /* End PBXTargetDependency section */ 522 | 523 | /* Begin PBXVariantGroup section */ 524 | 0F41C4161DF372740076BB6B /* LaunchScreen.storyboard */ = { 525 | isa = PBXVariantGroup; 526 | children = ( 527 | 0F41C4171DF372740076BB6B /* Base */, 528 | ); 529 | name = LaunchScreen.storyboard; 530 | sourceTree = ""; 531 | }; 532 | 0F41C4181DF372740076BB6B /* Main.storyboard */ = { 533 | isa = PBXVariantGroup; 534 | children = ( 535 | 0F41C4191DF372740076BB6B /* Base */, 536 | ); 537 | name = Main.storyboard; 538 | sourceTree = ""; 539 | }; 540 | /* End PBXVariantGroup section */ 541 | 542 | /* Begin XCBuildConfiguration section */ 543 | 0F41C4311DF372A90076BB6B /* Debug */ = { 544 | isa = XCBuildConfiguration; 545 | buildSettings = { 546 | APPLICATION_EXTENSION_API_ONLY = YES; 547 | CODE_SIGN_IDENTITY = ""; 548 | CURRENT_PROJECT_VERSION = 1; 549 | DEFINES_MODULE = YES; 550 | DYLIB_COMPATIBILITY_VERSION = 1; 551 | DYLIB_CURRENT_VERSION = 1; 552 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 553 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-iOS.plist"; 554 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 555 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 556 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 557 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-iOS"; 558 | PRODUCT_NAME = Each; 559 | SKIP_INSTALL = YES; 560 | SWIFT_VERSION = 3.0; 561 | VERSIONING_SYSTEM = "apple-generic"; 562 | VERSION_INFO_PREFIX = ""; 563 | }; 564 | name = Debug; 565 | }; 566 | 0F41C4321DF372A90076BB6B /* Release */ = { 567 | isa = XCBuildConfiguration; 568 | buildSettings = { 569 | APPLICATION_EXTENSION_API_ONLY = YES; 570 | CODE_SIGN_IDENTITY = ""; 571 | CURRENT_PROJECT_VERSION = 1; 572 | DEFINES_MODULE = YES; 573 | DYLIB_COMPATIBILITY_VERSION = 1; 574 | DYLIB_CURRENT_VERSION = 1; 575 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 576 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-iOS.plist"; 577 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 578 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 579 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 580 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-iOS"; 581 | PRODUCT_NAME = Each; 582 | SKIP_INSTALL = YES; 583 | SWIFT_VERSION = 3.0; 584 | VERSIONING_SYSTEM = "apple-generic"; 585 | VERSION_INFO_PREFIX = ""; 586 | }; 587 | name = Release; 588 | }; 589 | 0F41C4561DF378400076BB6B /* Debug */ = { 590 | isa = XCBuildConfiguration; 591 | buildSettings = { 592 | APPLICATION_EXTENSION_API_ONLY = YES; 593 | CODE_SIGN_IDENTITY = ""; 594 | CURRENT_PROJECT_VERSION = 1; 595 | DEFINES_MODULE = YES; 596 | DYLIB_COMPATIBILITY_VERSION = 1; 597 | DYLIB_CURRENT_VERSION = 1; 598 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 599 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-watchOS.plist"; 600 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 601 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 602 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-watchOS"; 603 | PRODUCT_NAME = Each; 604 | SDKROOT = watchos; 605 | SKIP_INSTALL = YES; 606 | SWIFT_VERSION = 3.0; 607 | TARGETED_DEVICE_FAMILY = 4; 608 | VERSIONING_SYSTEM = "apple-generic"; 609 | VERSION_INFO_PREFIX = ""; 610 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 611 | }; 612 | name = Debug; 613 | }; 614 | 0F41C4571DF378400076BB6B /* Release */ = { 615 | isa = XCBuildConfiguration; 616 | buildSettings = { 617 | APPLICATION_EXTENSION_API_ONLY = YES; 618 | CODE_SIGN_IDENTITY = ""; 619 | CURRENT_PROJECT_VERSION = 1; 620 | DEFINES_MODULE = YES; 621 | DYLIB_COMPATIBILITY_VERSION = 1; 622 | DYLIB_CURRENT_VERSION = 1; 623 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 624 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-watchOS.plist"; 625 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 626 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 627 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-watchOS"; 628 | PRODUCT_NAME = Each; 629 | SDKROOT = watchos; 630 | SKIP_INSTALL = YES; 631 | SWIFT_VERSION = 3.0; 632 | TARGETED_DEVICE_FAMILY = 4; 633 | VERSIONING_SYSTEM = "apple-generic"; 634 | VERSION_INFO_PREFIX = ""; 635 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 636 | }; 637 | name = Release; 638 | }; 639 | 0F41C4631DF378E00076BB6B /* Debug */ = { 640 | isa = XCBuildConfiguration; 641 | buildSettings = { 642 | APPLICATION_EXTENSION_API_ONLY = YES; 643 | CODE_SIGN_IDENTITY = ""; 644 | CURRENT_PROJECT_VERSION = 1; 645 | DEFINES_MODULE = YES; 646 | DYLIB_COMPATIBILITY_VERSION = 1; 647 | DYLIB_CURRENT_VERSION = 1; 648 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 649 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-tvOS.plist"; 650 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 651 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 652 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-tvOS"; 653 | PRODUCT_NAME = Each; 654 | SDKROOT = appletvos; 655 | SKIP_INSTALL = YES; 656 | SWIFT_VERSION = 3.0; 657 | TARGETED_DEVICE_FAMILY = 3; 658 | TVOS_DEPLOYMENT_TARGET = 9.0; 659 | VERSIONING_SYSTEM = "apple-generic"; 660 | VERSION_INFO_PREFIX = ""; 661 | }; 662 | name = Debug; 663 | }; 664 | 0F41C4641DF378E00076BB6B /* Release */ = { 665 | isa = XCBuildConfiguration; 666 | buildSettings = { 667 | APPLICATION_EXTENSION_API_ONLY = YES; 668 | CODE_SIGN_IDENTITY = ""; 669 | CURRENT_PROJECT_VERSION = 1; 670 | DEFINES_MODULE = YES; 671 | DYLIB_COMPATIBILITY_VERSION = 1; 672 | DYLIB_CURRENT_VERSION = 1; 673 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 674 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-tvOS.plist"; 675 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 676 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 677 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-tvOS"; 678 | PRODUCT_NAME = Each; 679 | SDKROOT = appletvos; 680 | SKIP_INSTALL = YES; 681 | SWIFT_VERSION = 3.0; 682 | TARGETED_DEVICE_FAMILY = 3; 683 | TVOS_DEPLOYMENT_TARGET = 9.0; 684 | VERSIONING_SYSTEM = "apple-generic"; 685 | VERSION_INFO_PREFIX = ""; 686 | }; 687 | name = Release; 688 | }; 689 | 0F41C4731DF379C70076BB6B /* Debug */ = { 690 | isa = XCBuildConfiguration; 691 | buildSettings = { 692 | APPLICATION_EXTENSION_API_ONLY = YES; 693 | CODE_SIGN_IDENTITY = "-"; 694 | COMBINE_HIDPI_IMAGES = YES; 695 | CURRENT_PROJECT_VERSION = 1; 696 | DEFINES_MODULE = YES; 697 | DYLIB_COMPATIBILITY_VERSION = 1; 698 | DYLIB_CURRENT_VERSION = 1; 699 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 700 | FRAMEWORK_VERSION = A; 701 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-macOS.plist"; 702 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 703 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 704 | MACOSX_DEPLOYMENT_TARGET = 10.10; 705 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-macOS"; 706 | PRODUCT_NAME = Each; 707 | SDKROOT = macosx; 708 | SKIP_INSTALL = YES; 709 | SWIFT_VERSION = 3.0; 710 | VERSIONING_SYSTEM = "apple-generic"; 711 | VERSION_INFO_PREFIX = ""; 712 | }; 713 | name = Debug; 714 | }; 715 | 0F41C4741DF379C70076BB6B /* Release */ = { 716 | isa = XCBuildConfiguration; 717 | buildSettings = { 718 | APPLICATION_EXTENSION_API_ONLY = YES; 719 | CODE_SIGN_IDENTITY = "-"; 720 | COMBINE_HIDPI_IMAGES = YES; 721 | CURRENT_PROJECT_VERSION = 1; 722 | DEFINES_MODULE = YES; 723 | DYLIB_COMPATIBILITY_VERSION = 1; 724 | DYLIB_CURRENT_VERSION = 1; 725 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 726 | FRAMEWORK_VERSION = A; 727 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info-macOS.plist"; 728 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 729 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 730 | MACOSX_DEPLOYMENT_TARGET = 10.10; 731 | PRODUCT_BUNDLE_IDENTIFIER = "com.dalu93.Each-macOS"; 732 | PRODUCT_NAME = Each; 733 | SDKROOT = macosx; 734 | SKIP_INSTALL = YES; 735 | SWIFT_VERSION = 3.0; 736 | VERSIONING_SYSTEM = "apple-generic"; 737 | VERSION_INFO_PREFIX = ""; 738 | }; 739 | name = Release; 740 | }; 741 | 81A1945F1DB0C3A200985EC0 /* Debug */ = { 742 | isa = XCBuildConfiguration; 743 | buildSettings = { 744 | ALWAYS_SEARCH_USER_PATHS = NO; 745 | CLANG_ANALYZER_NONNULL = YES; 746 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 747 | CLANG_CXX_LIBRARY = "libc++"; 748 | CLANG_ENABLE_MODULES = YES; 749 | CLANG_ENABLE_OBJC_ARC = YES; 750 | CLANG_WARN_BOOL_CONVERSION = YES; 751 | CLANG_WARN_CONSTANT_CONVERSION = YES; 752 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 753 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 754 | CLANG_WARN_EMPTY_BODY = YES; 755 | CLANG_WARN_ENUM_CONVERSION = YES; 756 | CLANG_WARN_INFINITE_RECURSION = YES; 757 | CLANG_WARN_INT_CONVERSION = YES; 758 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 759 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 760 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 761 | CLANG_WARN_UNREACHABLE_CODE = YES; 762 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 763 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 764 | COPY_PHASE_STRIP = NO; 765 | DEBUG_INFORMATION_FORMAT = dwarf; 766 | ENABLE_STRICT_OBJC_MSGSEND = YES; 767 | ENABLE_TESTABILITY = YES; 768 | GCC_C_LANGUAGE_STANDARD = gnu99; 769 | GCC_DYNAMIC_NO_PIC = NO; 770 | GCC_NO_COMMON_BLOCKS = YES; 771 | GCC_OPTIMIZATION_LEVEL = 0; 772 | GCC_PREPROCESSOR_DEFINITIONS = ( 773 | "DEBUG=1", 774 | "$(inherited)", 775 | ); 776 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 777 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 778 | GCC_WARN_UNDECLARED_SELECTOR = YES; 779 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 780 | GCC_WARN_UNUSED_FUNCTION = YES; 781 | GCC_WARN_UNUSED_VARIABLE = YES; 782 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 783 | MTL_ENABLE_DEBUG_INFO = YES; 784 | ONLY_ACTIVE_ARCH = YES; 785 | SDKROOT = iphoneos; 786 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 787 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 788 | TARGETED_DEVICE_FAMILY = "1,2"; 789 | }; 790 | name = Debug; 791 | }; 792 | 81A194601DB0C3A200985EC0 /* Release */ = { 793 | isa = XCBuildConfiguration; 794 | buildSettings = { 795 | ALWAYS_SEARCH_USER_PATHS = NO; 796 | CLANG_ANALYZER_NONNULL = YES; 797 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 798 | CLANG_CXX_LIBRARY = "libc++"; 799 | CLANG_ENABLE_MODULES = YES; 800 | CLANG_ENABLE_OBJC_ARC = YES; 801 | CLANG_WARN_BOOL_CONVERSION = YES; 802 | CLANG_WARN_CONSTANT_CONVERSION = YES; 803 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 804 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 805 | CLANG_WARN_EMPTY_BODY = YES; 806 | CLANG_WARN_ENUM_CONVERSION = YES; 807 | CLANG_WARN_INFINITE_RECURSION = YES; 808 | CLANG_WARN_INT_CONVERSION = YES; 809 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 810 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 811 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 812 | CLANG_WARN_UNREACHABLE_CODE = YES; 813 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 814 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 815 | COPY_PHASE_STRIP = NO; 816 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 817 | ENABLE_NS_ASSERTIONS = NO; 818 | ENABLE_STRICT_OBJC_MSGSEND = YES; 819 | GCC_C_LANGUAGE_STANDARD = gnu99; 820 | GCC_NO_COMMON_BLOCKS = YES; 821 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 822 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 823 | GCC_WARN_UNDECLARED_SELECTOR = YES; 824 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 825 | GCC_WARN_UNUSED_FUNCTION = YES; 826 | GCC_WARN_UNUSED_VARIABLE = YES; 827 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 828 | MTL_ENABLE_DEBUG_INFO = NO; 829 | SDKROOT = iphoneos; 830 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 831 | TARGETED_DEVICE_FAMILY = "1,2"; 832 | VALIDATE_PRODUCT = YES; 833 | }; 834 | name = Release; 835 | }; 836 | 81A194621DB0C3A200985EC0 /* Debug */ = { 837 | isa = XCBuildConfiguration; 838 | buildSettings = { 839 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 840 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 841 | INFOPLIST_FILE = "$(SRCROOT)/Each Example/Info.plist"; 842 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 843 | PRODUCT_BUNDLE_IDENTIFIER = com.dalu93.EachExample; 844 | PRODUCT_NAME = "$(TARGET_NAME)"; 845 | SWIFT_VERSION = 3.0; 846 | }; 847 | name = Debug; 848 | }; 849 | 81A194631DB0C3A200985EC0 /* Release */ = { 850 | isa = XCBuildConfiguration; 851 | buildSettings = { 852 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 853 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 854 | INFOPLIST_FILE = "$(SRCROOT)/Each Example/Info.plist"; 855 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 856 | PRODUCT_BUNDLE_IDENTIFIER = com.dalu93.EachExample; 857 | PRODUCT_NAME = "$(TARGET_NAME)"; 858 | SWIFT_VERSION = 3.0; 859 | }; 860 | name = Release; 861 | }; 862 | 81A194651DB0C3A200985EC0 /* Debug */ = { 863 | isa = XCBuildConfiguration; 864 | buildSettings = { 865 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 866 | BUNDLE_LOADER = "$(TEST_HOST)"; 867 | INFOPLIST_FILE = EachTests/Info.plist; 868 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 869 | PRODUCT_BUNDLE_IDENTIFIER = com.dalu93.EachTests; 870 | PRODUCT_NAME = "$(TARGET_NAME)"; 871 | SWIFT_VERSION = 3.0; 872 | }; 873 | name = Debug; 874 | }; 875 | 81A194661DB0C3A200985EC0 /* Release */ = { 876 | isa = XCBuildConfiguration; 877 | buildSettings = { 878 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 879 | BUNDLE_LOADER = "$(TEST_HOST)"; 880 | INFOPLIST_FILE = EachTests/Info.plist; 881 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 882 | PRODUCT_BUNDLE_IDENTIFIER = com.dalu93.EachTests; 883 | PRODUCT_NAME = "$(TARGET_NAME)"; 884 | SWIFT_VERSION = 3.0; 885 | }; 886 | name = Release; 887 | }; 888 | /* End XCBuildConfiguration section */ 889 | 890 | /* Begin XCConfigurationList section */ 891 | 0F41C4301DF372A90076BB6B /* Build configuration list for PBXNativeTarget "Each iOS" */ = { 892 | isa = XCConfigurationList; 893 | buildConfigurations = ( 894 | 0F41C4311DF372A90076BB6B /* Debug */, 895 | 0F41C4321DF372A90076BB6B /* Release */, 896 | ); 897 | defaultConfigurationIsVisible = 0; 898 | defaultConfigurationName = Release; 899 | }; 900 | 0F41C4551DF378400076BB6B /* Build configuration list for PBXNativeTarget "Each watchOS" */ = { 901 | isa = XCConfigurationList; 902 | buildConfigurations = ( 903 | 0F41C4561DF378400076BB6B /* Debug */, 904 | 0F41C4571DF378400076BB6B /* Release */, 905 | ); 906 | defaultConfigurationIsVisible = 0; 907 | }; 908 | 0F41C4621DF378E00076BB6B /* Build configuration list for PBXNativeTarget "Each tvOS" */ = { 909 | isa = XCConfigurationList; 910 | buildConfigurations = ( 911 | 0F41C4631DF378E00076BB6B /* Debug */, 912 | 0F41C4641DF378E00076BB6B /* Release */, 913 | ); 914 | defaultConfigurationIsVisible = 0; 915 | }; 916 | 0F41C4721DF379C70076BB6B /* Build configuration list for PBXNativeTarget "Each macOS" */ = { 917 | isa = XCConfigurationList; 918 | buildConfigurations = ( 919 | 0F41C4731DF379C70076BB6B /* Debug */, 920 | 0F41C4741DF379C70076BB6B /* Release */, 921 | ); 922 | defaultConfigurationIsVisible = 0; 923 | }; 924 | 81A1943F1DB0C3A100985EC0 /* Build configuration list for PBXProject "Each" */ = { 925 | isa = XCConfigurationList; 926 | buildConfigurations = ( 927 | 81A1945F1DB0C3A200985EC0 /* Debug */, 928 | 81A194601DB0C3A200985EC0 /* Release */, 929 | ); 930 | defaultConfigurationIsVisible = 0; 931 | defaultConfigurationName = Release; 932 | }; 933 | 81A194611DB0C3A200985EC0 /* Build configuration list for PBXNativeTarget "Each Example" */ = { 934 | isa = XCConfigurationList; 935 | buildConfigurations = ( 936 | 81A194621DB0C3A200985EC0 /* Debug */, 937 | 81A194631DB0C3A200985EC0 /* Release */, 938 | ); 939 | defaultConfigurationIsVisible = 0; 940 | defaultConfigurationName = Release; 941 | }; 942 | 81A194641DB0C3A200985EC0 /* Build configuration list for PBXNativeTarget "EachTests" */ = { 943 | isa = XCConfigurationList; 944 | buildConfigurations = ( 945 | 81A194651DB0C3A200985EC0 /* Debug */, 946 | 81A194661DB0C3A200985EC0 /* Release */, 947 | ); 948 | defaultConfigurationIsVisible = 0; 949 | defaultConfigurationName = Release; 950 | }; 951 | /* End XCConfigurationList section */ 952 | }; 953 | rootObject = 81A1943C1DB0C3A100985EC0 /* Project object */; 954 | } 955 | -------------------------------------------------------------------------------- /Each.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Each.xcodeproj/xcshareddata/xcschemes/Each iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Each.xcodeproj/xcshareddata/xcschemes/Each macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Each.xcodeproj/xcshareddata/xcschemes/Each tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Each.xcodeproj/xcshareddata/xcschemes/Each watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Each.xcodeproj/xcuserdata/Luca.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Each.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 0F41C4261DF372A90076BB6B 16 | 17 | primary 18 | 19 | 20 | 0F41C44F1DF378400076BB6B 21 | 22 | primary 23 | 24 | 25 | 0F41C45C1DF378E00076BB6B 26 | 27 | primary 28 | 29 | 30 | 0F41C46C1DF379C70076BB6B 31 | 32 | primary 33 | 34 | 35 | 81A194431DB0C3A100985EC0 36 | 37 | primary 38 | 39 | 40 | 81A194571DB0C3A200985EC0 41 | 42 | primary 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /EachTests/EachTestCases.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EachTestCases.swift 3 | // SwiftHelpSet 4 | // 5 | // Created by Luca D'Alberti on 9/8/16. 6 | // Copyright © 2016 dalu93. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Each 11 | 12 | class EachTestCases: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | } 17 | 18 | override func tearDown() { 19 | super.tearDown() 20 | } 21 | 22 | func testEachSimple() { 23 | let exp = expectation(description: "Timer waiting") 24 | 25 | _ = Each(1).seconds.perform { 26 | exp.fulfill() 27 | return .stop 28 | } 29 | 30 | waitForExpectations(timeout: 1.1) { error in 31 | 32 | guard let error = error else { return } 33 | print(error) 34 | } 35 | } 36 | 37 | func testEachStopInClosure() { 38 | let exp = expectation(description: "Timer waiting") 39 | 40 | let timer = Each(1).seconds 41 | timer.perform() { 42 | exp.fulfill() 43 | return .stop 44 | } 45 | 46 | waitForExpectations(timeout: 1.1) { error in 47 | guard timer.isStopped else { 48 | XCTFail("The timer is not stopped even if the closure returns .stop") 49 | return 50 | } 51 | 52 | guard let error = error else { return } 53 | print(error) 54 | } 55 | } 56 | 57 | func testEachStopAndStartAgain() { 58 | let exp = expectation(description: "Timer waiting") 59 | 60 | let timer = Each(1).seconds 61 | timer.perform() { 62 | exp.fulfill() 63 | return .stop 64 | } 65 | 66 | timer.stop() 67 | timer.restart() 68 | 69 | waitForExpectations(timeout: 1.2) { error in 70 | guard let error = error else { return } 71 | print(error) 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /EachTests/EachTimeIntervalTestCases.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EachTimeIntervalTestCases.swift 3 | // Each 4 | // 5 | // Created by Luca D'Alberti on 10/22/16. 6 | // Copyright © 2016 dalu93. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Each 11 | 12 | class EachTimeIntervalTestCases: XCTestCase { 13 | 14 | let interval: TimeInterval = 5 15 | 16 | override func setUp() { 17 | super.setUp() 18 | } 19 | 20 | override func tearDown() { 21 | super.tearDown() 22 | } 23 | 24 | func testMillisecondInterval() { 25 | let timer = Each(interval).milliseconds 26 | 27 | XCTAssert(timer.timeInterval == interval / 1000, "The timeInterval should be \(interval) / 1000, but it's \(timer.timeInterval!)") 28 | } 29 | 30 | func testSecondsInterval() { 31 | let timer = Each(interval).seconds 32 | 33 | XCTAssert(timer.timeInterval == interval , "The timeInterval should be \(interval), but it's \(timer.timeInterval!)") 34 | } 35 | 36 | func testMinutesInterval() { 37 | let timer = Each(interval).minutes 38 | 39 | XCTAssert(timer.timeInterval == interval * 60, "The timeInterval should be \(interval) * 60, but it's \(timer.timeInterval!)") 40 | } 41 | 42 | func testHoursInterval() { 43 | let timer = Each(interval).hours 44 | 45 | XCTAssert(timer.timeInterval == interval * 3600, "The timeInterval should be \(interval) * 3600, but it's \(timer.timeInterval!)") 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /EachTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Luca D'Alberti 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 | # Each 2 | Elegant ⏱ interface for Swift apps 3 | 4 | [![BuddyBuild](https://dashboard.buddybuild.com/api/statusImage?appID=5805caae4b74d00100717ec7&branch=master&build=latest)](https://dashboard.buddybuild.com/apps/5805caae4b74d00100717ec7/build/latest) 5 | 6 | Each is a NSTimer bridge library written in Swift. 7 | 8 | - [Features](#features) 9 | - [Requirements](#requirements) 10 | - [Installation](#installation) 11 | - [Usage](#usage) 12 | - [Leaks](#leaks) 13 | - [License](#license) 14 | 15 | ## Features 16 | 17 | - [x] Completely configurable timers 18 | - [x] Support for time intervals in ms, seconds, minutes and hours 19 | - [x] Fully extendable 20 | - [x] More readable and simple to use in comparison with NSTimer object 21 | 22 | ## Requirements 23 | 24 | - iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ 25 | - Xcode 8.0+ 26 | - Swift 3.0+ 27 | 28 | ## Installation 29 | 30 | ### CocoaPods 31 | 32 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: 33 | 34 | ```bash 35 | $ gem install cocoapods 36 | ``` 37 | 38 | > CocoaPods 1.1.0+ is required to build Each. 39 | 40 | To integrate Each into your Xcode project using CocoaPods, specify it in your `Podfile`: 41 | 42 | ```ruby 43 | source 'https://github.com/CocoaPods/Specs.git' 44 | platform :ios, '10.0' 45 | use_frameworks! 46 | 47 | target '' do 48 | pod 'Each', '~> 1.2' 49 | end 50 | ``` 51 | 52 | Then, run the following command: 53 | 54 | ```bash 55 | $ pod install 56 | ``` 57 | 58 | ### Carthage 59 | 60 | You can use [Carthage](https://github.com/Carthage/Carthage) to install `Each` by adding it to your `Cartfile`: 61 | 62 | ``` 63 | github "dalu93/Each" 64 | ``` 65 | 66 | ## Usage 67 | 68 | ### Creating a new timer instance 69 | 70 | ```swift 71 | let timer = Each(1).seconds // Can be .milliseconds, .seconds, .minute, .hours 72 | ``` 73 | 74 | ### Performing operations 75 | 76 | ```swift 77 | timer.perform { 78 | // Do your operations 79 | // This closure has to return a NextStep value 80 | // Return .continue if you want to leave the timer active, otherwise 81 | // return .stop to invalidate it 82 | } 83 | ``` 84 | 85 | If you want to leave the memory management decision to the `Each` class, you can simply use the `perform(on: _)` method. 86 | It requires that the parameter is an `AnyObject` instance. 87 | 88 | ```swift 89 | timer.perform(on: self) { 90 | // Do your operations 91 | // This closure has to return a NextStep value 92 | // Return .continue if you want to leave the timer active, otherwise 93 | // return .stop to invalidate it 94 | } 95 | ``` 96 | 97 | ### Stopping the timer manually 98 | 99 | ```swift 100 | timer.stop() // This stops immediately the timer 101 | ``` 102 | 103 | ### Restarting the timer 104 | 105 | You can restart the timer only after you stopped it. This method restarts the timer with the same 106 | perform closure. 107 | 108 | ```swift 109 | timer.restart() 110 | ``` 111 | 112 | ## Leaks 113 | Unfortunately the interface doesn't help you with handling the memory leaks the timer 114 | could create. In case of them, two workarounds are provided 115 | 116 | ### Workaround 1 117 | 118 | Use the `perform(on: _)` method as explained in the [usage](#usage) section. 119 | Please note that using this method, the `timer` isn't immediately deallocated when the `owner` is deallocated. 120 | It will be deallocated when the `timer` triggers the next time and it will check whether the `owner` instance is still valid or not. 121 | 122 | ### Workaround 2 123 | 124 | In case you don't want to declare a property that holds the `Each` reference, create a normal `Each` timer in your method scope and return `.stop/true` whenever the `owner` instance is `nil` 125 | 126 | ```swift 127 | Each(1).seconds.perform { [weak self] in 128 | guard let _ = self else { return .stop } 129 | 130 | print("timer called") 131 | return .continue 132 | } 133 | ``` 134 | 135 | 90% of closures will call `self` somehow, so this isn't so bad 136 | 137 | ### Workaround 3 138 | 139 | In case the first workaround wasn't enough, you can declare a property that holds the `Each` reference and call the `stop()` function whenever the `owner` is deallocated 140 | 141 | ```swift 142 | final class ViewController: UIViewController { 143 | private let _timer = Each(1).seconds 144 | 145 | deinit { 146 | _timer.stop() 147 | } 148 | 149 | override func viewDidLoad() { 150 | super.viewDidLoad() 151 | _timer.perform { 152 | // do something and return. you can check here if the `self` instance is nil as for workaround #1 153 | } 154 | } 155 | } 156 | ``` 157 | 158 | ## License 159 | 160 | Each is released under the MIT license. See LICENSE for details. 161 | -------------------------------------------------------------------------------- /Sources/Each-macOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // Each-macOS.h 3 | // Each 4 | // 5 | // Created by Benjamin Snider on 12/3/16. 6 | // Copyright © 2016 dalu93. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Each. 12 | FOUNDATION_EXPORT double EachVersionNumber; 13 | 14 | //! Project version string for Each. 15 | FOUNDATION_EXPORT const unsigned char EachVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | -------------------------------------------------------------------------------- /Sources/Each.h: -------------------------------------------------------------------------------- 1 | // 2 | // Each.h 3 | // Each 4 | // 5 | // Created by Benjamin Snider on 12/3/16. 6 | // Copyright © 2016 dalu93. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Each. 12 | FOUNDATION_EXPORT double EachVersionNumber; 13 | 14 | //! Project version string for Each. 15 | FOUNDATION_EXPORT const unsigned char EachVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sources/Each.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Each.swift 3 | // Each 4 | // 5 | // Created by Luca D'Alberti on 9/5/16. 6 | // Copyright © 2016 dalu93. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /// The perform closure. It has to return a `NextStep` type to let `Each` know 12 | /// what's the next operation to do. 13 | /// 14 | /// Return .continue to keep the timer alive, otherwise .stop to invalidate it. 15 | public typealias PerformClosure = () -> NextStep 16 | 17 | // MARK: - NextStep declaration 18 | /// The enumeration describes the next step `Each` has to do whenever the timer 19 | /// is triggered. 20 | /// 21 | /// - stop: Stops the timer. 22 | /// - `continue`: Keeps the timer alive. 23 | public enum NextStep { 24 | 25 | case stop, `continue` 26 | } 27 | 28 | // MARK: - NextStep boolean value implementation 29 | fileprivate extension NextStep { 30 | 31 | /// Stops the timer or not 32 | var shouldStop: Bool { 33 | switch self { 34 | case .continue: return false 35 | case .stop: return true 36 | } 37 | } 38 | } 39 | 40 | // MARK: - Each declaratiom 41 | /// The `Each` class allows the user to easily create a scheduled action 42 | open class Each { 43 | 44 | enum SecondsMultiplierType { 45 | case toMilliseconds 46 | case toSeconds 47 | case toMinutes 48 | case toHours 49 | 50 | var value: Double { 51 | switch self { 52 | case .toMilliseconds: return 1/1000 53 | case .toSeconds: return 1 54 | case .toMinutes: return 60 55 | case .toHours: return 3600 56 | } 57 | } 58 | } 59 | 60 | // MARK: - Private properties 61 | /// The timer interval in seconds 62 | private let _value: TimeInterval 63 | 64 | /// The multiplier. If nil when using it, the configuration didn't go well, 65 | /// the app will crash 66 | fileprivate var _multiplier: Double? = nil 67 | 68 | /// The action to perform when the timer is triggered 69 | fileprivate var _performClosure: PerformClosure? 70 | 71 | /// The timer instance 72 | private weak var _timer: Timer? 73 | 74 | /// Weak reference to the owner. Useful to check whether to stop or not the timer 75 | /// when the owner is deallocated 76 | fileprivate weak var _owner: AnyObject? { 77 | didSet { 78 | _checkOwner = _owner != nil 79 | } 80 | } 81 | 82 | /// It contains a boolean property that tells how to handle the tier trigger, checking or not for the 83 | /// owner instance. 84 | /// - Note: Do not change this value. The `_owner.didSet` will handle it 85 | fileprivate var _checkOwner = false 86 | 87 | // MARK: - Public properties 88 | /// Instance that runs the specific interval in milliseconds 89 | public lazy var milliseconds: Each = self._makeEachWith(value: self._value, multiplierType: .toMilliseconds) 90 | 91 | /// Instance that runs the specific interval in seconds 92 | public lazy var seconds: Each = self._makeEachWith(value: self._value, multiplierType: .toSeconds) 93 | 94 | /// /// Instance that runs the specific interval in minutes 95 | public lazy var minutes: Each = self._makeEachWith(value: self._value, multiplierType: .toMinutes) 96 | 97 | /// Instance that runs the specific interval in hours 98 | public lazy var hours: Each = self._makeEachWith(value: self._value, multiplierType: .toHours) 99 | 100 | /// Timer is stopped or not 101 | public private(set) var isStopped = true 102 | 103 | /// The definitive time interval to use for the timer. If nil, the app will crash 104 | public var timeInterval: TimeInterval? { 105 | guard let _multiplier = _multiplier else { return nil } 106 | return _multiplier * _value 107 | } 108 | 109 | // MARK: - Lifecycle 110 | /** 111 | Initialize a new `Each` object with an abstract value. 112 | Remember to use the variables `milliseconds`, `seconds`, `minutes` and 113 | `hours` to get the exact configuration 114 | 115 | - parameter value: The abstract value that describes the interval together 116 | with the time unit 117 | 118 | - returns: A new `Each` uncompleted instance 119 | */ 120 | public init(_ value: TimeInterval) { 121 | self._value = value 122 | } 123 | 124 | deinit { 125 | _timer?.invalidate() 126 | } 127 | 128 | // MARK: - Public methods 129 | /** 130 | Starts the timer and performs the action whenever the timer is triggered 131 | The closure should return a boolean that indicates to stop or not the timer after 132 | the trigger. Return `false` to continue, return `true` to stop it 133 | 134 | - parameter closure: The closure to execute whenever the timer is triggered. 135 | The closure should return a boolean that indicates to stop or not the timer after 136 | the trigger. Return `false` to continue, return `true` to stop it 137 | */ 138 | public func perform(closure: @escaping PerformClosure) { 139 | guard _timer == nil else { return } 140 | guard let interval = timeInterval else { fatalError("Please, speficy the time unit by using `milliseconds`, `seconds`, `minutes` abd `hours` properties.") } 141 | 142 | isStopped = false 143 | _performClosure = closure 144 | _timer = Timer.scheduledTimer( 145 | timeInterval: interval, 146 | target: self, 147 | selector: .Triggered, 148 | userInfo: nil, 149 | repeats: true 150 | ) 151 | } 152 | 153 | public func perform(on owner: AnyObject, closure: @escaping PerformClosure) { 154 | _owner = owner 155 | perform(closure: closure) 156 | } 157 | 158 | 159 | /** 160 | Stops the timer 161 | */ 162 | public func stop() { 163 | _timer?.invalidate() 164 | _timer = nil 165 | 166 | isStopped = true 167 | } 168 | 169 | /** 170 | Restarts the timer 171 | */ 172 | public func restart() { 173 | guard let _performClosure = _performClosure else { fatalError("Don't call the method `start()` without stopping it before.") } 174 | 175 | _ = perform(closure: _performClosure) 176 | } 177 | } 178 | 179 | // MARK: - Actions 180 | fileprivate extension Each { 181 | @objc func _trigger(timer: Timer) { 182 | if _checkOwner && _owner == nil { 183 | stop() 184 | return 185 | } 186 | 187 | let stopTimer = _performClosure?().shouldStop ?? false 188 | 189 | guard stopTimer else { return } 190 | stop() 191 | } 192 | } 193 | 194 | // MARK: - Builders 195 | fileprivate extension Each { 196 | func _makeEachWith(value: TimeInterval, multiplierType: SecondsMultiplierType) -> Each { 197 | let each = Each(value) 198 | each._multiplier = multiplierType.value 199 | 200 | return each 201 | } 202 | } 203 | 204 | // MARK: - Selectors 205 | fileprivate extension Selector { 206 | static let Triggered = #selector(Each._trigger(timer:)) 207 | } 208 | -------------------------------------------------------------------------------- /Sources/Info-iOS.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 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Sources/Info-macOS.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 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSHumanReadableCopyright 22 | Copyright © 2016 dalu93. All rights reserved. 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Sources/Info-tvOS.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 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Sources/Info-watchOS.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 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | --------------------------------------------------------------------------------