├── .gitignore
├── .swift-version
├── Example
├── Application
│ └── AppDelegate.swift
├── Resources
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ └── Info.plist
└── Screen
│ ├── ScreenViewModel.swift
│ └── ViewController.swift
├── LICENSE
├── Podfile
├── Podfile.lock
├── README.md
├── RxTimer.podspec
├── RxTimer.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── RxTimer.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── RxTimer
├── Info.plist
├── RxTimer.h
└── Sources
└── Timer+Rx.swift
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.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 | 4.2
--------------------------------------------------------------------------------
/Example/Application/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // RxTimer
4 | //
5 | // Created by Bruno Oliveira on 17/01/2019.
6 | // Copyright © 2019 Bruno Oliveira. 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/Resources/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/Resources/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Example/Resources/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/Resources/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 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Example/Resources/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/Screen/ScreenViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScreenViewModel.swift
3 | // Example
4 | //
5 | // Created by Bruno Oliveira on 17/01/2019.
6 | // Copyright © 2019 Bruno Oliveira. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class ScreenViewModel {
12 | private var currentTime: Int
13 | private let initialTime: Int
14 |
15 | init(time: Int) {
16 | self.currentTime = time
17 | self.initialTime = time
18 | }
19 |
20 | func tick() -> Int {
21 | if (currentTime == -1) {
22 | currentTime = initialTime
23 | }
24 | currentTime -= 1
25 | return currentTime + 1
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Example/Screen/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // RxTimer
4 | //
5 | // Created by Bruno Oliveira on 17/01/2019.
6 | // Copyright © 2019 Bruno Oliveira. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import RxTimer
11 | import RxSwift
12 | import Foundation
13 |
14 | class ViewController: UIViewController {
15 | @IBOutlet weak var exampleLabel: UILabel!
16 |
17 | private let viewModel = ScreenViewModel(time: 30)
18 |
19 | let disposeBag = DisposeBag()
20 |
21 | override func viewDidLoad() {
22 | super.viewDidLoad()
23 | }
24 |
25 | override func viewDidAppear(_ animated: Bool) {
26 | super.viewDidAppear(animated)
27 | Timer.rx.timer
28 | .map { _ in
29 | self.viewModel.tick()
30 | }
31 | .subscribe(onNext: { time in
32 | self.exampleLabel.text = time.description
33 | })
34 | .disposed(by: disposeBag)
35 | }
36 |
37 | override func viewDidDisappear(_ animated: Bool) {
38 | super.viewDidDisappear(animated)
39 |
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Ivan Bruel
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | project 'RxTimer.xcodeproj/'
2 |
3 | use_frameworks!
4 | target 'Example' do
5 | pod 'RxTimer', :path => '.'
6 | end
7 |
8 | target 'RxTimer' do
9 | pod 'RxSwift', '~> 4.x'
10 | end
11 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - RxAtomic (4.4.0)
3 | - RxSwift (4.4.0):
4 | - RxAtomic (~> 4.4)
5 | - RxTimer (1.3):
6 | - RxSwift (~> 4.x)
7 |
8 | DEPENDENCIES:
9 | - RxSwift (~> 4.x)
10 | - RxTimer (from `.`)
11 |
12 | SPEC REPOS:
13 | https://github.com/cocoapods/specs.git:
14 | - RxAtomic
15 | - RxSwift
16 |
17 | EXTERNAL SOURCES:
18 | RxTimer:
19 | :path: "."
20 |
21 | SPEC CHECKSUMS:
22 | RxAtomic: eacf60db868c96bfd63320e28619fe29c179656f
23 | RxSwift: 5976ecd04fc2fefd648827c23de5e11157faa973
24 | RxTimer: ff8fc81ee78db9db3d64b261a11f1b1080810c8f
25 |
26 | PODFILE CHECKSUM: 904255a2f72af45ac2351fb2f95b602b83125bc3
27 |
28 | COCOAPODS: 1.6.0.beta.2
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | RxTimer
2 | ===========
3 |
4 | **RxTimer** provides an easy to use RxSwift binding for NSTimer.
5 |
6 | ## Usage
7 |
8 | ## 1 second default timer
9 | ```swift
10 | NSTimer.rx_timer
11 | .subscribeNext { _ in
12 | print("timer triggered")
13 | }
14 | .addDisposableTo(disposeBag)
15 | ```
16 |
17 | ## Any number of seconds
18 | ```swift
19 | NSTimer.rx.timer(10)
20 | .subscribeNext { _ in
21 | print("timer triggered")
22 | }
23 | .addDisposableTo(disposeBag)
24 | ```
25 |
26 | ### Skip first event to ignore trigger upon subscribing
27 |
28 | ```swift
29 | NSTimer.rx.timer(10)
30 | .skip(1)
31 | .subscribeNext { _ in
32 | print("timer triggered")
33 | }
34 | .addDisposableTo(disposeBag)
35 | ```
36 |
37 | ### Take(n) to cancel the timer after n number of calls
38 |
39 | ```swift
40 | NSTimer.rx.timer(10)
41 | .take(10)
42 | .subscribeNext { _ in
43 | print("timer triggered")
44 | }
45 | .addDisposableTo(disposeBag)
46 | ```
47 |
48 |
49 | Installing
50 | ----------
51 |
52 | #### CocoaPods
53 |
54 | ```ruby
55 | pod 'RxTimer'
56 | ```
57 |
58 | ### Carthage
59 |
60 | Cartfile
61 | ```
62 | github "bmoliveira/RxTimer" ~> 1.3
63 | ```
64 | And that'll be 👌
65 |
66 | License
67 | -------
68 |
69 | MIT License.
70 |
--------------------------------------------------------------------------------
/RxTimer.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod lib lint RxTimer.podspec' to ensure this is a
3 | # valid spec before submitting.
4 | #
5 | # Any lines starting with a # are optional, but their use is encouraged
6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
7 | #
8 |
9 | Pod::Spec.new do |s|
10 | s.name = 'RxTimer'
11 | s.version = '1.3'
12 | s.summary = 'RxTimer adds RxSwift NSTimer bindings.'
13 |
14 | # This description is used to generate tags and improve search results.
15 | # * Think: What does it do? Why did you write it? What is the focus?
16 | # * Try to keep it short, snappy and to the point.
17 | # * Write the description between the DESC delimiters below.
18 | # * Finally, don't worry about the indent, CocoaPods strips it!
19 |
20 | s.description = <<-DESC
21 | RxTimer adds RxSwift NSTimer bindings. This allows you to trigger events reactively with a timer.
22 | DESC
23 |
24 | s.homepage = 'https://github.com/bmoliveira/RxTimer'
25 | s.license = { :type => 'MIT', :file => 'LICENSE' }
26 | s.author = { 'Ivan Bruel' => 'ivan.bruel@gmail.com' }
27 | s.source = { :git => 'https://github.com/bmoliveira/RxTimer.git', :tag => s.version.to_s }
28 | s.social_media_url = 'https://twitter.com/ivanbruel'
29 |
30 | s.ios.deployment_target = '8.0'
31 |
32 | s.source_files = 'RxTimer/Sources/**/*'
33 |
34 | s.dependency 'RxSwift', '~> 4.x'
35 | end
36 |
--------------------------------------------------------------------------------
/RxTimer.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4B39C5B6521D74D9B73C587F /* Pods_RxTimer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BE2E56066EC75C735C17F37 /* Pods_RxTimer.framework */; };
11 | 962623DCA125AC7CFD8C4D25 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5868C397564BD36FC34A6C6F /* Pods_Example.framework */; };
12 | B607DB6921F0D5F3009C1A93 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B607DB6821F0D5F3009C1A93 /* AppDelegate.swift */; };
13 | B607DB6B21F0D5F3009C1A93 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B607DB6A21F0D5F3009C1A93 /* ViewController.swift */; };
14 | B607DB6E21F0D5F3009C1A93 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B607DB6C21F0D5F3009C1A93 /* Main.storyboard */; };
15 | B607DB7021F0D5F4009C1A93 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B607DB6F21F0D5F4009C1A93 /* Assets.xcassets */; };
16 | B607DB7321F0D5F4009C1A93 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B607DB7121F0D5F4009C1A93 /* LaunchScreen.storyboard */; };
17 | B607DB8621F0D8E4009C1A93 /* RxTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = B607DB8421F0D8E4009C1A93 /* RxTimer.h */; settings = {ATTRIBUTES = (Public, ); }; };
18 | B607DB8921F0D8E4009C1A93 /* RxTimer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607DB8221F0D8E4009C1A93 /* RxTimer.framework */; };
19 | B607DB9021F0D9E4009C1A93 /* Timer+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B607DB8F21F0D9E3009C1A93 /* Timer+Rx.swift */; };
20 | B6B914C521F0E17A0080B851 /* (null) in Embed Frameworks */ = {isa = PBXBuildFile; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
21 | B6B914C721F0E3100080B851 /* ScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6B914C621F0E3100080B851 /* ScreenViewModel.swift */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXContainerItemProxy section */
25 | B607DB8721F0D8E4009C1A93 /* PBXContainerItemProxy */ = {
26 | isa = PBXContainerItemProxy;
27 | containerPortal = B607DB5D21F0D5F3009C1A93 /* Project object */;
28 | proxyType = 1;
29 | remoteGlobalIDString = B607DB8121F0D8E4009C1A93;
30 | remoteInfo = RxTimer;
31 | };
32 | /* End PBXContainerItemProxy section */
33 |
34 | /* Begin PBXCopyFilesBuildPhase section */
35 | B607DB8E21F0D8E4009C1A93 /* Embed Frameworks */ = {
36 | isa = PBXCopyFilesBuildPhase;
37 | buildActionMask = 2147483647;
38 | dstPath = "";
39 | dstSubfolderSpec = 10;
40 | files = (
41 | B6B914C521F0E17A0080B851 /* (null) in Embed Frameworks */,
42 | );
43 | name = "Embed Frameworks";
44 | runOnlyForDeploymentPostprocessing = 0;
45 | };
46 | /* End PBXCopyFilesBuildPhase section */
47 |
48 | /* Begin PBXFileReference section */
49 | 0BE2E56066EC75C735C17F37 /* Pods_RxTimer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RxTimer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
50 | 1BD1B7B49B5C6A010AD5151F /* 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 = ""; };
51 | 47C699604F2F1CC8C1691A3B /* Pods-RxTimer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxTimer.debug.xcconfig"; path = "Target Support Files/Pods-RxTimer/Pods-RxTimer.debug.xcconfig"; sourceTree = ""; };
52 | 4F719C032191451F46529542 /* Pods-RxTimer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxTimer.release.xcconfig"; path = "Target Support Files/Pods-RxTimer/Pods-RxTimer.release.xcconfig"; sourceTree = ""; };
53 | 5868C397564BD36FC34A6C6F /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 819495C523CAFAC9187C4BC0 /* 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 = ""; };
55 | B607DB6521F0D5F3009C1A93 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
56 | B607DB6821F0D5F3009C1A93 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
57 | B607DB6A21F0D5F3009C1A93 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
58 | B607DB6D21F0D5F3009C1A93 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
59 | B607DB6F21F0D5F4009C1A93 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
60 | B607DB7221F0D5F4009C1A93 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
61 | B607DB7421F0D5F4009C1A93 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
62 | B607DB8221F0D8E4009C1A93 /* RxTimer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxTimer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
63 | B607DB8421F0D8E4009C1A93 /* RxTimer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RxTimer.h; sourceTree = ""; };
64 | B607DB8521F0D8E4009C1A93 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
65 | B607DB8F21F0D9E3009C1A93 /* Timer+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Timer+Rx.swift"; sourceTree = ""; };
66 | B6B914C621F0E3100080B851 /* ScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenViewModel.swift; sourceTree = ""; };
67 | B6B914C821F0E9DB0080B851 /* RxTimer.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = RxTimer.podspec; sourceTree = ""; };
68 | B6E320E621F0DD0700FB090B /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; };
69 | B6E320E721F0DD0700FB090B /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
70 | /* End PBXFileReference section */
71 |
72 | /* Begin PBXFrameworksBuildPhase section */
73 | B607DB6221F0D5F3009C1A93 /* Frameworks */ = {
74 | isa = PBXFrameworksBuildPhase;
75 | buildActionMask = 2147483647;
76 | files = (
77 | B607DB8921F0D8E4009C1A93 /* RxTimer.framework in Frameworks */,
78 | 962623DCA125AC7CFD8C4D25 /* Pods_Example.framework in Frameworks */,
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | B607DB7F21F0D8E4009C1A93 /* Frameworks */ = {
83 | isa = PBXFrameworksBuildPhase;
84 | buildActionMask = 2147483647;
85 | files = (
86 | 4B39C5B6521D74D9B73C587F /* Pods_RxTimer.framework in Frameworks */,
87 | );
88 | runOnlyForDeploymentPostprocessing = 0;
89 | };
90 | /* End PBXFrameworksBuildPhase section */
91 |
92 | /* Begin PBXGroup section */
93 | 1375E646F4A286BDE1C7611A /* Pods */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 47C699604F2F1CC8C1691A3B /* Pods-RxTimer.debug.xcconfig */,
97 | 4F719C032191451F46529542 /* Pods-RxTimer.release.xcconfig */,
98 | 1BD1B7B49B5C6A010AD5151F /* Pods-Example.debug.xcconfig */,
99 | 819495C523CAFAC9187C4BC0 /* Pods-Example.release.xcconfig */,
100 | );
101 | path = Pods;
102 | sourceTree = "";
103 | };
104 | 3A9D42BA62F18CC7D8DE9811 /* Frameworks */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 0BE2E56066EC75C735C17F37 /* Pods_RxTimer.framework */,
108 | 5868C397564BD36FC34A6C6F /* Pods_Example.framework */,
109 | );
110 | name = Frameworks;
111 | sourceTree = "";
112 | };
113 | B607DB5C21F0D5F3009C1A93 = {
114 | isa = PBXGroup;
115 | children = (
116 | B607DB6721F0D5F3009C1A93 /* Example */,
117 | B607DB8321F0D8E4009C1A93 /* RxTimer */,
118 | B6B914C421F0E0CA0080B851 /* Metadata */,
119 | 1375E646F4A286BDE1C7611A /* Pods */,
120 | B607DB6621F0D5F3009C1A93 /* Products */,
121 | 3A9D42BA62F18CC7D8DE9811 /* Frameworks */,
122 | );
123 | sourceTree = "";
124 | };
125 | B607DB6621F0D5F3009C1A93 /* Products */ = {
126 | isa = PBXGroup;
127 | children = (
128 | B607DB6521F0D5F3009C1A93 /* Example.app */,
129 | B607DB8221F0D8E4009C1A93 /* RxTimer.framework */,
130 | );
131 | name = Products;
132 | sourceTree = "";
133 | };
134 | B607DB6721F0D5F3009C1A93 /* Example */ = {
135 | isa = PBXGroup;
136 | children = (
137 | B607DB7C21F0D621009C1A93 /* Resources */,
138 | B607DB7B21F0D619009C1A93 /* Application */,
139 | B607DB7A21F0D609009C1A93 /* Screen */,
140 | );
141 | path = Example;
142 | sourceTree = "";
143 | };
144 | B607DB7A21F0D609009C1A93 /* Screen */ = {
145 | isa = PBXGroup;
146 | children = (
147 | B607DB6A21F0D5F3009C1A93 /* ViewController.swift */,
148 | B6B914C621F0E3100080B851 /* ScreenViewModel.swift */,
149 | );
150 | path = Screen;
151 | sourceTree = "";
152 | };
153 | B607DB7B21F0D619009C1A93 /* Application */ = {
154 | isa = PBXGroup;
155 | children = (
156 | B607DB6821F0D5F3009C1A93 /* AppDelegate.swift */,
157 | );
158 | path = Application;
159 | sourceTree = "";
160 | };
161 | B607DB7C21F0D621009C1A93 /* Resources */ = {
162 | isa = PBXGroup;
163 | children = (
164 | B607DB6C21F0D5F3009C1A93 /* Main.storyboard */,
165 | B607DB6F21F0D5F4009C1A93 /* Assets.xcassets */,
166 | B607DB7121F0D5F4009C1A93 /* LaunchScreen.storyboard */,
167 | B607DB7421F0D5F4009C1A93 /* Info.plist */,
168 | );
169 | path = Resources;
170 | sourceTree = "";
171 | };
172 | B607DB8321F0D8E4009C1A93 /* RxTimer */ = {
173 | isa = PBXGroup;
174 | children = (
175 | B607DB9121F0D9F0009C1A93 /* Sources */,
176 | B607DB8421F0D8E4009C1A93 /* RxTimer.h */,
177 | B607DB8521F0D8E4009C1A93 /* Info.plist */,
178 | );
179 | path = RxTimer;
180 | sourceTree = "";
181 | };
182 | B607DB9121F0D9F0009C1A93 /* Sources */ = {
183 | isa = PBXGroup;
184 | children = (
185 | B607DB8F21F0D9E3009C1A93 /* Timer+Rx.swift */,
186 | );
187 | path = Sources;
188 | sourceTree = "";
189 | };
190 | B6B914C421F0E0CA0080B851 /* Metadata */ = {
191 | isa = PBXGroup;
192 | children = (
193 | B6B914C821F0E9DB0080B851 /* RxTimer.podspec */,
194 | B6E320E621F0DD0700FB090B /* LICENSE */,
195 | B6E320E721F0DD0700FB090B /* README.md */,
196 | );
197 | name = Metadata;
198 | sourceTree = "";
199 | };
200 | /* End PBXGroup section */
201 |
202 | /* Begin PBXHeadersBuildPhase section */
203 | B607DB7D21F0D8E4009C1A93 /* Headers */ = {
204 | isa = PBXHeadersBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | B607DB8621F0D8E4009C1A93 /* RxTimer.h in Headers */,
208 | );
209 | runOnlyForDeploymentPostprocessing = 0;
210 | };
211 | /* End PBXHeadersBuildPhase section */
212 |
213 | /* Begin PBXNativeTarget section */
214 | B607DB6421F0D5F3009C1A93 /* Example */ = {
215 | isa = PBXNativeTarget;
216 | buildConfigurationList = B607DB7721F0D5F4009C1A93 /* Build configuration list for PBXNativeTarget "Example" */;
217 | buildPhases = (
218 | 7A85C15A659C2AEB045B6154 /* [CP] Check Pods Manifest.lock */,
219 | B607DB6121F0D5F3009C1A93 /* Sources */,
220 | B607DB6221F0D5F3009C1A93 /* Frameworks */,
221 | B607DB6321F0D5F3009C1A93 /* Resources */,
222 | B607DB8E21F0D8E4009C1A93 /* Embed Frameworks */,
223 | EDD363DB87DD6FCB7CB525D2 /* [CP] Embed Pods Frameworks */,
224 | );
225 | buildRules = (
226 | );
227 | dependencies = (
228 | B607DB8821F0D8E4009C1A93 /* PBXTargetDependency */,
229 | );
230 | name = Example;
231 | productName = RxTimer;
232 | productReference = B607DB6521F0D5F3009C1A93 /* Example.app */;
233 | productType = "com.apple.product-type.application";
234 | };
235 | B607DB8121F0D8E4009C1A93 /* RxTimer */ = {
236 | isa = PBXNativeTarget;
237 | buildConfigurationList = B607DB8B21F0D8E4009C1A93 /* Build configuration list for PBXNativeTarget "RxTimer" */;
238 | buildPhases = (
239 | 6C7C2CF885BFC99ABDE928CC /* [CP] Check Pods Manifest.lock */,
240 | B607DB7D21F0D8E4009C1A93 /* Headers */,
241 | B607DB7E21F0D8E4009C1A93 /* Sources */,
242 | B607DB7F21F0D8E4009C1A93 /* Frameworks */,
243 | B607DB8021F0D8E4009C1A93 /* Resources */,
244 | );
245 | buildRules = (
246 | );
247 | dependencies = (
248 | );
249 | name = RxTimer;
250 | productName = RxTimer;
251 | productReference = B607DB8221F0D8E4009C1A93 /* RxTimer.framework */;
252 | productType = "com.apple.product-type.framework";
253 | };
254 | /* End PBXNativeTarget section */
255 |
256 | /* Begin PBXProject section */
257 | B607DB5D21F0D5F3009C1A93 /* Project object */ = {
258 | isa = PBXProject;
259 | attributes = {
260 | LastSwiftUpdateCheck = 1010;
261 | LastUpgradeCheck = 1010;
262 | ORGANIZATIONNAME = "Bruno Oliveira";
263 | TargetAttributes = {
264 | B607DB6421F0D5F3009C1A93 = {
265 | CreatedOnToolsVersion = 10.1;
266 | };
267 | B607DB8121F0D8E4009C1A93 = {
268 | CreatedOnToolsVersion = 10.1;
269 | LastSwiftMigration = 1010;
270 | };
271 | };
272 | };
273 | buildConfigurationList = B607DB6021F0D5F3009C1A93 /* Build configuration list for PBXProject "RxTimer" */;
274 | compatibilityVersion = "Xcode 9.3";
275 | developmentRegion = en;
276 | hasScannedForEncodings = 0;
277 | knownRegions = (
278 | en,
279 | Base,
280 | );
281 | mainGroup = B607DB5C21F0D5F3009C1A93;
282 | productRefGroup = B607DB6621F0D5F3009C1A93 /* Products */;
283 | projectDirPath = "";
284 | projectRoot = "";
285 | targets = (
286 | B607DB6421F0D5F3009C1A93 /* Example */,
287 | B607DB8121F0D8E4009C1A93 /* RxTimer */,
288 | );
289 | };
290 | /* End PBXProject section */
291 |
292 | /* Begin PBXResourcesBuildPhase section */
293 | B607DB6321F0D5F3009C1A93 /* Resources */ = {
294 | isa = PBXResourcesBuildPhase;
295 | buildActionMask = 2147483647;
296 | files = (
297 | B607DB7321F0D5F4009C1A93 /* LaunchScreen.storyboard in Resources */,
298 | B607DB7021F0D5F4009C1A93 /* Assets.xcassets in Resources */,
299 | B607DB6E21F0D5F3009C1A93 /* Main.storyboard in Resources */,
300 | );
301 | runOnlyForDeploymentPostprocessing = 0;
302 | };
303 | B607DB8021F0D8E4009C1A93 /* Resources */ = {
304 | isa = PBXResourcesBuildPhase;
305 | buildActionMask = 2147483647;
306 | files = (
307 | );
308 | runOnlyForDeploymentPostprocessing = 0;
309 | };
310 | /* End PBXResourcesBuildPhase section */
311 |
312 | /* Begin PBXShellScriptBuildPhase section */
313 | 6C7C2CF885BFC99ABDE928CC /* [CP] Check Pods Manifest.lock */ = {
314 | isa = PBXShellScriptBuildPhase;
315 | buildActionMask = 2147483647;
316 | files = (
317 | );
318 | inputFileListPaths = (
319 | );
320 | inputPaths = (
321 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
322 | "${PODS_ROOT}/Manifest.lock",
323 | );
324 | name = "[CP] Check Pods Manifest.lock";
325 | outputFileListPaths = (
326 | );
327 | outputPaths = (
328 | "$(DERIVED_FILE_DIR)/Pods-RxTimer-checkManifestLockResult.txt",
329 | );
330 | runOnlyForDeploymentPostprocessing = 0;
331 | shellPath = /bin/sh;
332 | 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";
333 | showEnvVarsInLog = 0;
334 | };
335 | 7A85C15A659C2AEB045B6154 /* [CP] Check Pods Manifest.lock */ = {
336 | isa = PBXShellScriptBuildPhase;
337 | buildActionMask = 2147483647;
338 | files = (
339 | );
340 | inputFileListPaths = (
341 | );
342 | inputPaths = (
343 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
344 | "${PODS_ROOT}/Manifest.lock",
345 | );
346 | name = "[CP] Check Pods Manifest.lock";
347 | outputFileListPaths = (
348 | );
349 | outputPaths = (
350 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
351 | );
352 | runOnlyForDeploymentPostprocessing = 0;
353 | shellPath = /bin/sh;
354 | 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";
355 | showEnvVarsInLog = 0;
356 | };
357 | EDD363DB87DD6FCB7CB525D2 /* [CP] Embed Pods Frameworks */ = {
358 | isa = PBXShellScriptBuildPhase;
359 | buildActionMask = 2147483647;
360 | files = (
361 | );
362 | inputFileListPaths = (
363 | );
364 | inputPaths = (
365 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
366 | "${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework",
367 | "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
368 | "${BUILT_PRODUCTS_DIR}/RxTimer/RxTimer.framework",
369 | );
370 | name = "[CP] Embed Pods Frameworks";
371 | outputFileListPaths = (
372 | );
373 | outputPaths = (
374 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework",
375 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
376 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxTimer.framework",
377 | );
378 | runOnlyForDeploymentPostprocessing = 0;
379 | shellPath = /bin/sh;
380 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
381 | showEnvVarsInLog = 0;
382 | };
383 | /* End PBXShellScriptBuildPhase section */
384 |
385 | /* Begin PBXSourcesBuildPhase section */
386 | B607DB6121F0D5F3009C1A93 /* Sources */ = {
387 | isa = PBXSourcesBuildPhase;
388 | buildActionMask = 2147483647;
389 | files = (
390 | B607DB6B21F0D5F3009C1A93 /* ViewController.swift in Sources */,
391 | B6B914C721F0E3100080B851 /* ScreenViewModel.swift in Sources */,
392 | B607DB6921F0D5F3009C1A93 /* AppDelegate.swift in Sources */,
393 | );
394 | runOnlyForDeploymentPostprocessing = 0;
395 | };
396 | B607DB7E21F0D8E4009C1A93 /* Sources */ = {
397 | isa = PBXSourcesBuildPhase;
398 | buildActionMask = 2147483647;
399 | files = (
400 | B607DB9021F0D9E4009C1A93 /* Timer+Rx.swift in Sources */,
401 | );
402 | runOnlyForDeploymentPostprocessing = 0;
403 | };
404 | /* End PBXSourcesBuildPhase section */
405 |
406 | /* Begin PBXTargetDependency section */
407 | B607DB8821F0D8E4009C1A93 /* PBXTargetDependency */ = {
408 | isa = PBXTargetDependency;
409 | target = B607DB8121F0D8E4009C1A93 /* RxTimer */;
410 | targetProxy = B607DB8721F0D8E4009C1A93 /* PBXContainerItemProxy */;
411 | };
412 | /* End PBXTargetDependency section */
413 |
414 | /* Begin PBXVariantGroup section */
415 | B607DB6C21F0D5F3009C1A93 /* Main.storyboard */ = {
416 | isa = PBXVariantGroup;
417 | children = (
418 | B607DB6D21F0D5F3009C1A93 /* Base */,
419 | );
420 | name = Main.storyboard;
421 | sourceTree = "";
422 | };
423 | B607DB7121F0D5F4009C1A93 /* LaunchScreen.storyboard */ = {
424 | isa = PBXVariantGroup;
425 | children = (
426 | B607DB7221F0D5F4009C1A93 /* Base */,
427 | );
428 | name = LaunchScreen.storyboard;
429 | sourceTree = "";
430 | };
431 | /* End PBXVariantGroup section */
432 |
433 | /* Begin XCBuildConfiguration section */
434 | B607DB7521F0D5F4009C1A93 /* Debug */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | ALWAYS_SEARCH_USER_PATHS = NO;
438 | CLANG_ANALYZER_NONNULL = YES;
439 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
440 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
441 | CLANG_CXX_LIBRARY = "libc++";
442 | CLANG_ENABLE_MODULES = YES;
443 | CLANG_ENABLE_OBJC_ARC = YES;
444 | CLANG_ENABLE_OBJC_WEAK = YES;
445 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
446 | CLANG_WARN_BOOL_CONVERSION = YES;
447 | CLANG_WARN_COMMA = YES;
448 | CLANG_WARN_CONSTANT_CONVERSION = YES;
449 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
451 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
452 | CLANG_WARN_EMPTY_BODY = YES;
453 | CLANG_WARN_ENUM_CONVERSION = YES;
454 | CLANG_WARN_INFINITE_RECURSION = YES;
455 | CLANG_WARN_INT_CONVERSION = YES;
456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
457 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
458 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
459 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
460 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
461 | CLANG_WARN_STRICT_PROTOTYPES = YES;
462 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
463 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
464 | CLANG_WARN_UNREACHABLE_CODE = YES;
465 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
466 | CODE_SIGN_IDENTITY = "iPhone Developer";
467 | COPY_PHASE_STRIP = NO;
468 | DEBUG_INFORMATION_FORMAT = dwarf;
469 | ENABLE_STRICT_OBJC_MSGSEND = YES;
470 | ENABLE_TESTABILITY = YES;
471 | GCC_C_LANGUAGE_STANDARD = gnu11;
472 | GCC_DYNAMIC_NO_PIC = NO;
473 | GCC_NO_COMMON_BLOCKS = YES;
474 | GCC_OPTIMIZATION_LEVEL = 0;
475 | GCC_PREPROCESSOR_DEFINITIONS = (
476 | "DEBUG=1",
477 | "$(inherited)",
478 | );
479 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
480 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
481 | GCC_WARN_UNDECLARED_SELECTOR = YES;
482 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
483 | GCC_WARN_UNUSED_FUNCTION = YES;
484 | GCC_WARN_UNUSED_VARIABLE = YES;
485 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
486 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
487 | MTL_FAST_MATH = YES;
488 | ONLY_ACTIVE_ARCH = YES;
489 | SDKROOT = iphoneos;
490 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
491 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
492 | };
493 | name = Debug;
494 | };
495 | B607DB7621F0D5F4009C1A93 /* Release */ = {
496 | isa = XCBuildConfiguration;
497 | buildSettings = {
498 | ALWAYS_SEARCH_USER_PATHS = NO;
499 | CLANG_ANALYZER_NONNULL = YES;
500 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
501 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
502 | CLANG_CXX_LIBRARY = "libc++";
503 | CLANG_ENABLE_MODULES = YES;
504 | CLANG_ENABLE_OBJC_ARC = YES;
505 | CLANG_ENABLE_OBJC_WEAK = YES;
506 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
507 | CLANG_WARN_BOOL_CONVERSION = YES;
508 | CLANG_WARN_COMMA = YES;
509 | CLANG_WARN_CONSTANT_CONVERSION = YES;
510 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
511 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
512 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
513 | CLANG_WARN_EMPTY_BODY = YES;
514 | CLANG_WARN_ENUM_CONVERSION = YES;
515 | CLANG_WARN_INFINITE_RECURSION = YES;
516 | CLANG_WARN_INT_CONVERSION = YES;
517 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
518 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
519 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
520 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
521 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
522 | CLANG_WARN_STRICT_PROTOTYPES = YES;
523 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
524 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
525 | CLANG_WARN_UNREACHABLE_CODE = YES;
526 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
527 | CODE_SIGN_IDENTITY = "iPhone Developer";
528 | COPY_PHASE_STRIP = NO;
529 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
530 | ENABLE_NS_ASSERTIONS = NO;
531 | ENABLE_STRICT_OBJC_MSGSEND = YES;
532 | GCC_C_LANGUAGE_STANDARD = gnu11;
533 | GCC_NO_COMMON_BLOCKS = YES;
534 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
535 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
536 | GCC_WARN_UNDECLARED_SELECTOR = YES;
537 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
538 | GCC_WARN_UNUSED_FUNCTION = YES;
539 | GCC_WARN_UNUSED_VARIABLE = YES;
540 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
541 | MTL_ENABLE_DEBUG_INFO = NO;
542 | MTL_FAST_MATH = YES;
543 | SDKROOT = iphoneos;
544 | SWIFT_COMPILATION_MODE = wholemodule;
545 | SWIFT_OPTIMIZATION_LEVEL = "-O";
546 | VALIDATE_PRODUCT = YES;
547 | };
548 | name = Release;
549 | };
550 | B607DB7821F0D5F4009C1A93 /* Debug */ = {
551 | isa = XCBuildConfiguration;
552 | baseConfigurationReference = 1BD1B7B49B5C6A010AD5151F /* Pods-Example.debug.xcconfig */;
553 | buildSettings = {
554 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
555 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
556 | CODE_SIGN_STYLE = Automatic;
557 | INFOPLIST_FILE = Example/Resources/Info.plist;
558 | LD_RUNPATH_SEARCH_PATHS = (
559 | "$(inherited)",
560 | "@executable_path/Frameworks",
561 | );
562 | PRODUCT_BUNDLE_IDENTIFIER = com.example.RxTimer;
563 | PRODUCT_NAME = "$(TARGET_NAME)";
564 | SWIFT_VERSION = 4.2;
565 | TARGETED_DEVICE_FAMILY = "1,2";
566 | };
567 | name = Debug;
568 | };
569 | B607DB7921F0D5F4009C1A93 /* Release */ = {
570 | isa = XCBuildConfiguration;
571 | baseConfigurationReference = 819495C523CAFAC9187C4BC0 /* Pods-Example.release.xcconfig */;
572 | buildSettings = {
573 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
574 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
575 | CODE_SIGN_STYLE = Automatic;
576 | INFOPLIST_FILE = Example/Resources/Info.plist;
577 | LD_RUNPATH_SEARCH_PATHS = (
578 | "$(inherited)",
579 | "@executable_path/Frameworks",
580 | );
581 | PRODUCT_BUNDLE_IDENTIFIER = com.example.RxTimer;
582 | PRODUCT_NAME = "$(TARGET_NAME)";
583 | SWIFT_VERSION = 4.2;
584 | TARGETED_DEVICE_FAMILY = "1,2";
585 | };
586 | name = Release;
587 | };
588 | B607DB8C21F0D8E4009C1A93 /* Debug */ = {
589 | isa = XCBuildConfiguration;
590 | baseConfigurationReference = 47C699604F2F1CC8C1691A3B /* Pods-RxTimer.debug.xcconfig */;
591 | buildSettings = {
592 | CLANG_ENABLE_MODULES = YES;
593 | CODE_SIGN_IDENTITY = "";
594 | CODE_SIGN_STYLE = Automatic;
595 | CURRENT_PROJECT_VERSION = 1;
596 | DEFINES_MODULE = YES;
597 | DYLIB_COMPATIBILITY_VERSION = 1;
598 | DYLIB_CURRENT_VERSION = 1;
599 | DYLIB_INSTALL_NAME_BASE = "@rpath";
600 | INFOPLIST_FILE = RxTimer/Info.plist;
601 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
602 | LD_RUNPATH_SEARCH_PATHS = (
603 | "$(inherited)",
604 | "@executable_path/Frameworks",
605 | "@loader_path/Frameworks",
606 | );
607 | PRODUCT_BUNDLE_IDENTIFIER = com.RxTimer;
608 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
609 | SKIP_INSTALL = YES;
610 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
611 | SWIFT_VERSION = 4.2;
612 | TARGETED_DEVICE_FAMILY = "1,2";
613 | VERSIONING_SYSTEM = "apple-generic";
614 | VERSION_INFO_PREFIX = "";
615 | };
616 | name = Debug;
617 | };
618 | B607DB8D21F0D8E4009C1A93 /* Release */ = {
619 | isa = XCBuildConfiguration;
620 | baseConfigurationReference = 4F719C032191451F46529542 /* Pods-RxTimer.release.xcconfig */;
621 | buildSettings = {
622 | CLANG_ENABLE_MODULES = YES;
623 | CODE_SIGN_IDENTITY = "";
624 | CODE_SIGN_STYLE = Automatic;
625 | CURRENT_PROJECT_VERSION = 1;
626 | DEFINES_MODULE = YES;
627 | DYLIB_COMPATIBILITY_VERSION = 1;
628 | DYLIB_CURRENT_VERSION = 1;
629 | DYLIB_INSTALL_NAME_BASE = "@rpath";
630 | INFOPLIST_FILE = RxTimer/Info.plist;
631 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
632 | LD_RUNPATH_SEARCH_PATHS = (
633 | "$(inherited)",
634 | "@executable_path/Frameworks",
635 | "@loader_path/Frameworks",
636 | );
637 | PRODUCT_BUNDLE_IDENTIFIER = com.RxTimer;
638 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
639 | SKIP_INSTALL = YES;
640 | SWIFT_VERSION = 4.2;
641 | TARGETED_DEVICE_FAMILY = "1,2";
642 | VERSIONING_SYSTEM = "apple-generic";
643 | VERSION_INFO_PREFIX = "";
644 | };
645 | name = Release;
646 | };
647 | /* End XCBuildConfiguration section */
648 |
649 | /* Begin XCConfigurationList section */
650 | B607DB6021F0D5F3009C1A93 /* Build configuration list for PBXProject "RxTimer" */ = {
651 | isa = XCConfigurationList;
652 | buildConfigurations = (
653 | B607DB7521F0D5F4009C1A93 /* Debug */,
654 | B607DB7621F0D5F4009C1A93 /* Release */,
655 | );
656 | defaultConfigurationIsVisible = 0;
657 | defaultConfigurationName = Release;
658 | };
659 | B607DB7721F0D5F4009C1A93 /* Build configuration list for PBXNativeTarget "Example" */ = {
660 | isa = XCConfigurationList;
661 | buildConfigurations = (
662 | B607DB7821F0D5F4009C1A93 /* Debug */,
663 | B607DB7921F0D5F4009C1A93 /* Release */,
664 | );
665 | defaultConfigurationIsVisible = 0;
666 | defaultConfigurationName = Release;
667 | };
668 | B607DB8B21F0D8E4009C1A93 /* Build configuration list for PBXNativeTarget "RxTimer" */ = {
669 | isa = XCConfigurationList;
670 | buildConfigurations = (
671 | B607DB8C21F0D8E4009C1A93 /* Debug */,
672 | B607DB8D21F0D8E4009C1A93 /* Release */,
673 | );
674 | defaultConfigurationIsVisible = 0;
675 | defaultConfigurationName = Release;
676 | };
677 | /* End XCConfigurationList section */
678 | };
679 | rootObject = B607DB5D21F0D5F3009C1A93 /* Project object */;
680 | }
681 |
--------------------------------------------------------------------------------
/RxTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxTimer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RxTimer.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxTimer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RxTimer/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 |
--------------------------------------------------------------------------------
/RxTimer/RxTimer.h:
--------------------------------------------------------------------------------
1 | //
2 | // RxTimer.h
3 | // RxTimer
4 | //
5 | // Created by Bruno Oliveira on 17/01/2019.
6 | // Copyright © 2019 Bruno Oliveira. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for RxTimer.
12 | FOUNDATION_EXPORT double RxTimerVersionNumber;
13 |
14 | //! Project version string for RxTimer.
15 | FOUNDATION_EXPORT const unsigned char RxTimerVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/RxTimer/Sources/Timer+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSTimer+Rx.swift
3 | //
4 | // Created by Ivan Bruel on 20/07/16.
5 | // Copyright © 2016 Faber Ventures. All rights reserved.
6 | //
7 |
8 | import Foundation
9 | import RxSwift
10 |
11 | public extension Reactive where Base: Timer {
12 |
13 | static var timer: Observable {
14 | return timer(1.0)
15 | }
16 |
17 | static func timer(_ time: TimeInterval) -> Observable {
18 | return Observable.create { observer in
19 | observer.onNext(())
20 | let timer = Timer.rx.schedule(repeatInterval: time) {
21 | observer.onNext(())
22 | }
23 | return Disposables.create {
24 | observer.onCompleted()
25 | timer.invalidate()
26 | }
27 | }
28 | }
29 | }
30 |
31 | private extension Reactive where Base: Timer {
32 | /*
33 | Creates and schedules a one-time `NSTimer` instance.
34 |
35 | - Parameters:
36 | - delay: The delay before execution.
37 | - handler: A closure to execute after `delay`.
38 | - Returns: The newly-created `NSTimer` instance.
39 | */
40 | static func schedule(delay: TimeInterval, handler: @escaping ()->()) -> Timer {
41 | let fireDate = delay + CFAbsoluteTimeGetCurrent()
42 | let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, 0, 0, 0) { theTimer in
43 | handler()
44 | }
45 |
46 | CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, CFRunLoopMode.commonModes)
47 | return timer!
48 | }
49 |
50 | /*
51 | Creates and schedules a repeating `NSTimer` instance.
52 |
53 | - Parameters:
54 | - repeatInterval: The interval (in seconds) between each execution of
55 | `handler`. Note that individual calls may be delayed; subsequent calls
56 | to `handler` will be based on the time the timer was created.
57 | - handler: A closure to execute at each `repeatInterval`.
58 | - Returns: The newly-created `NSTimer` instance.
59 | */
60 | static func schedule(repeatInterval interval: TimeInterval, handler: @escaping () -> Void)
61 | -> Timer {
62 | let fireDate = interval + CFAbsoluteTimeGetCurrent()
63 | let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, interval, 0, 0) {
64 | theTimer in
65 | handler()
66 | }
67 |
68 | CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, CFRunLoopMode.commonModes)
69 | return timer!
70 | }
71 | }
72 |
--------------------------------------------------------------------------------