├── .gitignore ├── .travis.yml ├── Example ├── GlobalTimer.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── GlobalTimer-Example.xcscheme ├── GlobalTimer.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── steve.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── GlobalTimer │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── GTAppDelegate.h │ ├── GTAppDelegate.m │ ├── GTViewController.h │ ├── GTViewController.m │ ├── GlobalTimer-Info.plist │ ├── GlobalTimer-Prefix.pch │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile ├── Podfile.lock ├── Pods │ ├── GlobalTimer │ │ ├── GlobalTimer │ │ │ └── Classes │ │ │ │ ├── GTimer │ │ │ │ ├── GEvent.h │ │ │ │ ├── GEvent.m │ │ │ │ ├── GTimer.h │ │ │ │ └── GTimer.m │ │ │ │ └── GlobalTimer.h │ │ ├── LICENSE │ │ └── README.md │ ├── Local Podspecs │ │ └── GlobalTimer.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── GlobalTimer │ │ ├── GlobalTimer-dummy.m │ │ ├── GlobalTimer-prefix.pch │ │ ├── GlobalTimer-umbrella.h │ │ ├── GlobalTimer.modulemap │ │ ├── GlobalTimer.xcconfig │ │ └── Info.plist │ │ ├── Pods-GlobalTimer_Example │ │ ├── Info.plist │ │ ├── Pods-GlobalTimer_Example-acknowledgements.markdown │ │ ├── Pods-GlobalTimer_Example-acknowledgements.plist │ │ ├── Pods-GlobalTimer_Example-dummy.m │ │ ├── Pods-GlobalTimer_Example-frameworks.sh │ │ ├── Pods-GlobalTimer_Example-resources.sh │ │ ├── Pods-GlobalTimer_Example-umbrella.h │ │ ├── Pods-GlobalTimer_Example.debug.xcconfig │ │ ├── Pods-GlobalTimer_Example.modulemap │ │ └── Pods-GlobalTimer_Example.release.xcconfig │ │ └── Pods-GlobalTimer_Tests │ │ ├── Info.plist │ │ ├── Pods-GlobalTimer_Tests-acknowledgements.markdown │ │ ├── Pods-GlobalTimer_Tests-acknowledgements.plist │ │ ├── Pods-GlobalTimer_Tests-dummy.m │ │ ├── Pods-GlobalTimer_Tests-frameworks.sh │ │ ├── Pods-GlobalTimer_Tests-resources.sh │ │ ├── Pods-GlobalTimer_Tests-umbrella.h │ │ ├── Pods-GlobalTimer_Tests.debug.xcconfig │ │ ├── Pods-GlobalTimer_Tests.modulemap │ │ └── Pods-GlobalTimer_Tests.release.xcconfig └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── GlobalTimer.podspec ├── GlobalTimer ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── GTimer │ ├── GEvent.h │ ├── GEvent.m │ ├── GTimer.h │ └── GTimer.m │ └── GlobalTimer.h ├── LICENSE ├── README.md ├── _Pods.xcodeproj └── issue_template.md /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/GlobalTimer.xcworkspace -scheme GlobalTimer-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/GlobalTimer.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 11 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 12 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 13 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 14 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 15 | 6003F59E195388D20070C39A /* GTAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* GTAppDelegate.m */; }; 16 | 6003F5A7195388D20070C39A /* GTViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* GTViewController.m */; }; 17 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 18 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 19 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 20 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 21 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 22 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 23 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 24 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 25 | D15A02F7103CEEBB922B982C /* Pods_GlobalTimer_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF38BC4FD38B241F4E0A2D8F /* Pods_GlobalTimer_Tests.framework */; }; 26 | E2B74B356DD2FF2ADB669BB7 /* Pods_GlobalTimer_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA9BC2595C9275A6E65BB17C /* Pods_GlobalTimer_Example.framework */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 6003F582195388D10070C39A /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 6003F589195388D20070C39A; 35 | remoteInfo = GlobalTimer; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 3AE0A6D6EFAAD850EB5E0A14 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 41 | 48B8973E9675A9EA62A01E0F /* GlobalTimer.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = GlobalTimer.podspec; path = ../GlobalTimer.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 42 | 4A22F99827BC12335FCD5946 /* Pods-GlobalTimer_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalTimer_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests.release.xcconfig"; sourceTree = ""; }; 43 | 50D78438CC030F7081C5568C /* Pods-GlobalTimer_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalTimer_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests.debug.xcconfig"; sourceTree = ""; }; 44 | 6003F58A195388D20070C39A /* GlobalTimer_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GlobalTimer_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 46 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 47 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 48 | 6003F595195388D20070C39A /* GlobalTimer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GlobalTimer-Info.plist"; sourceTree = ""; }; 49 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 50 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | 6003F59B195388D20070C39A /* GlobalTimer-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GlobalTimer-Prefix.pch"; sourceTree = ""; }; 52 | 6003F59C195388D20070C39A /* GTAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GTAppDelegate.h; sourceTree = ""; }; 53 | 6003F59D195388D20070C39A /* GTAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTAppDelegate.m; sourceTree = ""; }; 54 | 6003F5A5195388D20070C39A /* GTViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GTViewController.h; sourceTree = ""; }; 55 | 6003F5A6195388D20070C39A /* GTViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTViewController.m; sourceTree = ""; }; 56 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 57 | 6003F5AE195388D20070C39A /* GlobalTimer_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GlobalTimer_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 59 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 60 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 61 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 62 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 63 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 64 | 7EBE2A97B3E5A568A179AF9F /* Pods-GlobalTimer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalTimer_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example.debug.xcconfig"; sourceTree = ""; }; 65 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 66 | 9A46509C6F3218D255EBFCCF /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 67 | AA9BC2595C9275A6E65BB17C /* Pods_GlobalTimer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalTimer_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | BF38BC4FD38B241F4E0A2D8F /* Pods_GlobalTimer_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalTimer_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | D6B2647CB6D1761D7CBDD376 /* Pods-GlobalTimer_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalTimer_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example.release.xcconfig"; sourceTree = ""; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | 6003F587195388D20070C39A /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 78 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 79 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 80 | E2B74B356DD2FF2ADB669BB7 /* Pods_GlobalTimer_Example.framework in Frameworks */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | 6003F5AB195388D20070C39A /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 89 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 90 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 91 | D15A02F7103CEEBB922B982C /* Pods_GlobalTimer_Tests.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 6003F581195388D10070C39A = { 99 | isa = PBXGroup; 100 | children = ( 101 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 102 | 6003F593195388D20070C39A /* Example for GlobalTimer */, 103 | 6003F5B5195388D20070C39A /* Tests */, 104 | 6003F58C195388D20070C39A /* Frameworks */, 105 | 6003F58B195388D20070C39A /* Products */, 106 | 8C82420F72D6D9B351DA6E22 /* Pods */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 6003F58B195388D20070C39A /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 6003F58A195388D20070C39A /* GlobalTimer_Example.app */, 114 | 6003F5AE195388D20070C39A /* GlobalTimer_Tests.xctest */, 115 | ); 116 | name = Products; 117 | sourceTree = ""; 118 | }; 119 | 6003F58C195388D20070C39A /* Frameworks */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 6003F58D195388D20070C39A /* Foundation.framework */, 123 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 124 | 6003F591195388D20070C39A /* UIKit.framework */, 125 | 6003F5AF195388D20070C39A /* XCTest.framework */, 126 | AA9BC2595C9275A6E65BB17C /* Pods_GlobalTimer_Example.framework */, 127 | BF38BC4FD38B241F4E0A2D8F /* Pods_GlobalTimer_Tests.framework */, 128 | ); 129 | name = Frameworks; 130 | sourceTree = ""; 131 | }; 132 | 6003F593195388D20070C39A /* Example for GlobalTimer */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 6003F59C195388D20070C39A /* GTAppDelegate.h */, 136 | 6003F59D195388D20070C39A /* GTAppDelegate.m */, 137 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 138 | 6003F5A5195388D20070C39A /* GTViewController.h */, 139 | 6003F5A6195388D20070C39A /* GTViewController.m */, 140 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, 141 | 6003F5A8195388D20070C39A /* Images.xcassets */, 142 | 6003F594195388D20070C39A /* Supporting Files */, 143 | ); 144 | name = "Example for GlobalTimer"; 145 | path = GlobalTimer; 146 | sourceTree = ""; 147 | }; 148 | 6003F594195388D20070C39A /* Supporting Files */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 6003F595195388D20070C39A /* GlobalTimer-Info.plist */, 152 | 6003F596195388D20070C39A /* InfoPlist.strings */, 153 | 6003F599195388D20070C39A /* main.m */, 154 | 6003F59B195388D20070C39A /* GlobalTimer-Prefix.pch */, 155 | ); 156 | name = "Supporting Files"; 157 | sourceTree = ""; 158 | }; 159 | 6003F5B5195388D20070C39A /* Tests */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 6003F5BB195388D20070C39A /* Tests.m */, 163 | 6003F5B6195388D20070C39A /* Supporting Files */, 164 | ); 165 | path = Tests; 166 | sourceTree = ""; 167 | }; 168 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 172 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 173 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 174 | ); 175 | name = "Supporting Files"; 176 | sourceTree = ""; 177 | }; 178 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 48B8973E9675A9EA62A01E0F /* GlobalTimer.podspec */, 182 | 3AE0A6D6EFAAD850EB5E0A14 /* README.md */, 183 | 9A46509C6F3218D255EBFCCF /* LICENSE */, 184 | ); 185 | name = "Podspec Metadata"; 186 | sourceTree = ""; 187 | }; 188 | 8C82420F72D6D9B351DA6E22 /* Pods */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 7EBE2A97B3E5A568A179AF9F /* Pods-GlobalTimer_Example.debug.xcconfig */, 192 | D6B2647CB6D1761D7CBDD376 /* Pods-GlobalTimer_Example.release.xcconfig */, 193 | 50D78438CC030F7081C5568C /* Pods-GlobalTimer_Tests.debug.xcconfig */, 194 | 4A22F99827BC12335FCD5946 /* Pods-GlobalTimer_Tests.release.xcconfig */, 195 | ); 196 | name = Pods; 197 | sourceTree = ""; 198 | }; 199 | /* End PBXGroup section */ 200 | 201 | /* Begin PBXNativeTarget section */ 202 | 6003F589195388D20070C39A /* GlobalTimer_Example */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "GlobalTimer_Example" */; 205 | buildPhases = ( 206 | 4C9B759E93163A6A3F59F4B8 /* [CP] Check Pods Manifest.lock */, 207 | 6003F586195388D20070C39A /* Sources */, 208 | 6003F587195388D20070C39A /* Frameworks */, 209 | 6003F588195388D20070C39A /* Resources */, 210 | 133BA512BA604DC5F4EDF34F /* [CP] Embed Pods Frameworks */, 211 | ); 212 | buildRules = ( 213 | ); 214 | dependencies = ( 215 | ); 216 | name = GlobalTimer_Example; 217 | productName = GlobalTimer; 218 | productReference = 6003F58A195388D20070C39A /* GlobalTimer_Example.app */; 219 | productType = "com.apple.product-type.application"; 220 | }; 221 | 6003F5AD195388D20070C39A /* GlobalTimer_Tests */ = { 222 | isa = PBXNativeTarget; 223 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "GlobalTimer_Tests" */; 224 | buildPhases = ( 225 | 3CB14345C86C973A9CA88AE2 /* [CP] Check Pods Manifest.lock */, 226 | 6003F5AA195388D20070C39A /* Sources */, 227 | 6003F5AB195388D20070C39A /* Frameworks */, 228 | 6003F5AC195388D20070C39A /* Resources */, 229 | ); 230 | buildRules = ( 231 | ); 232 | dependencies = ( 233 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 234 | ); 235 | name = GlobalTimer_Tests; 236 | productName = GlobalTimerTests; 237 | productReference = 6003F5AE195388D20070C39A /* GlobalTimer_Tests.xctest */; 238 | productType = "com.apple.product-type.bundle.unit-test"; 239 | }; 240 | /* End PBXNativeTarget section */ 241 | 242 | /* Begin PBXProject section */ 243 | 6003F582195388D10070C39A /* Project object */ = { 244 | isa = PBXProject; 245 | attributes = { 246 | CLASSPREFIX = GT; 247 | LastUpgradeCheck = 0720; 248 | ORGANIZATIONNAME = "王承权"; 249 | TargetAttributes = { 250 | 6003F5AD195388D20070C39A = { 251 | TestTargetID = 6003F589195388D20070C39A; 252 | }; 253 | }; 254 | }; 255 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "GlobalTimer" */; 256 | compatibilityVersion = "Xcode 3.2"; 257 | developmentRegion = English; 258 | hasScannedForEncodings = 0; 259 | knownRegions = ( 260 | English, 261 | en, 262 | Base, 263 | ); 264 | mainGroup = 6003F581195388D10070C39A; 265 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 266 | projectDirPath = ""; 267 | projectRoot = ""; 268 | targets = ( 269 | 6003F589195388D20070C39A /* GlobalTimer_Example */, 270 | 6003F5AD195388D20070C39A /* GlobalTimer_Tests */, 271 | ); 272 | }; 273 | /* End PBXProject section */ 274 | 275 | /* Begin PBXResourcesBuildPhase section */ 276 | 6003F588195388D20070C39A /* Resources */ = { 277 | isa = PBXResourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 281 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, 282 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 283 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | 6003F5AC195388D20070C39A /* Resources */ = { 288 | isa = PBXResourcesBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | /* End PBXResourcesBuildPhase section */ 296 | 297 | /* Begin PBXShellScriptBuildPhase section */ 298 | 133BA512BA604DC5F4EDF34F /* [CP] Embed Pods Frameworks */ = { 299 | isa = PBXShellScriptBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | ); 303 | inputFileListPaths = ( 304 | ); 305 | inputPaths = ( 306 | "${SRCROOT}/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-frameworks.sh", 307 | "${BUILT_PRODUCTS_DIR}/GlobalTimer/GlobalTimer.framework", 308 | ); 309 | name = "[CP] Embed Pods Frameworks"; 310 | outputFileListPaths = ( 311 | ); 312 | outputPaths = ( 313 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GlobalTimer.framework", 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | shellPath = /bin/sh; 317 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-frameworks.sh\"\n"; 318 | showEnvVarsInLog = 0; 319 | }; 320 | 3CB14345C86C973A9CA88AE2 /* [CP] Check Pods Manifest.lock */ = { 321 | isa = PBXShellScriptBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | ); 325 | inputFileListPaths = ( 326 | ); 327 | inputPaths = ( 328 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 329 | "${PODS_ROOT}/Manifest.lock", 330 | ); 331 | name = "[CP] Check Pods Manifest.lock"; 332 | outputFileListPaths = ( 333 | ); 334 | outputPaths = ( 335 | "$(DERIVED_FILE_DIR)/Pods-GlobalTimer_Tests-checkManifestLockResult.txt", 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | shellPath = /bin/sh; 339 | 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"; 340 | showEnvVarsInLog = 0; 341 | }; 342 | 4C9B759E93163A6A3F59F4B8 /* [CP] Check Pods Manifest.lock */ = { 343 | isa = PBXShellScriptBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | inputFileListPaths = ( 348 | ); 349 | inputPaths = ( 350 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 351 | "${PODS_ROOT}/Manifest.lock", 352 | ); 353 | name = "[CP] Check Pods Manifest.lock"; 354 | outputFileListPaths = ( 355 | ); 356 | outputPaths = ( 357 | "$(DERIVED_FILE_DIR)/Pods-GlobalTimer_Example-checkManifestLockResult.txt", 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | shellPath = /bin/sh; 361 | 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"; 362 | showEnvVarsInLog = 0; 363 | }; 364 | /* End PBXShellScriptBuildPhase section */ 365 | 366 | /* Begin PBXSourcesBuildPhase section */ 367 | 6003F586195388D20070C39A /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | 6003F59E195388D20070C39A /* GTAppDelegate.m in Sources */, 372 | 6003F5A7195388D20070C39A /* GTViewController.m in Sources */, 373 | 6003F59A195388D20070C39A /* main.m in Sources */, 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | }; 377 | 6003F5AA195388D20070C39A /* Sources */ = { 378 | isa = PBXSourcesBuildPhase; 379 | buildActionMask = 2147483647; 380 | files = ( 381 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 382 | ); 383 | runOnlyForDeploymentPostprocessing = 0; 384 | }; 385 | /* End PBXSourcesBuildPhase section */ 386 | 387 | /* Begin PBXTargetDependency section */ 388 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 389 | isa = PBXTargetDependency; 390 | target = 6003F589195388D20070C39A /* GlobalTimer_Example */; 391 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 392 | }; 393 | /* End PBXTargetDependency section */ 394 | 395 | /* Begin PBXVariantGroup section */ 396 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 397 | isa = PBXVariantGroup; 398 | children = ( 399 | 6003F597195388D20070C39A /* en */, 400 | ); 401 | name = InfoPlist.strings; 402 | sourceTree = ""; 403 | }; 404 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 405 | isa = PBXVariantGroup; 406 | children = ( 407 | 6003F5B9195388D20070C39A /* en */, 408 | ); 409 | name = InfoPlist.strings; 410 | sourceTree = ""; 411 | }; 412 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { 413 | isa = PBXVariantGroup; 414 | children = ( 415 | 71719F9E1E33DC2100824A3D /* Base */, 416 | ); 417 | name = LaunchScreen.storyboard; 418 | sourceTree = ""; 419 | }; 420 | /* End PBXVariantGroup section */ 421 | 422 | /* Begin XCBuildConfiguration section */ 423 | 6003F5BD195388D20070C39A /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | ALWAYS_SEARCH_USER_PATHS = NO; 427 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 428 | CLANG_CXX_LIBRARY = "libc++"; 429 | CLANG_ENABLE_MODULES = YES; 430 | CLANG_ENABLE_OBJC_ARC = YES; 431 | CLANG_WARN_BOOL_CONVERSION = YES; 432 | CLANG_WARN_CONSTANT_CONVERSION = YES; 433 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 434 | CLANG_WARN_EMPTY_BODY = YES; 435 | CLANG_WARN_ENUM_CONVERSION = YES; 436 | CLANG_WARN_INT_CONVERSION = YES; 437 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 438 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 439 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 440 | COPY_PHASE_STRIP = NO; 441 | ENABLE_TESTABILITY = YES; 442 | GCC_C_LANGUAGE_STANDARD = gnu99; 443 | GCC_DYNAMIC_NO_PIC = NO; 444 | GCC_OPTIMIZATION_LEVEL = 0; 445 | GCC_PREPROCESSOR_DEFINITIONS = ( 446 | "DEBUG=1", 447 | "$(inherited)", 448 | ); 449 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 450 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 451 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 452 | GCC_WARN_UNDECLARED_SELECTOR = YES; 453 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 454 | GCC_WARN_UNUSED_FUNCTION = YES; 455 | GCC_WARN_UNUSED_VARIABLE = YES; 456 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 457 | ONLY_ACTIVE_ARCH = YES; 458 | SDKROOT = iphoneos; 459 | TARGETED_DEVICE_FAMILY = "1,2"; 460 | }; 461 | name = Debug; 462 | }; 463 | 6003F5BE195388D20070C39A /* Release */ = { 464 | isa = XCBuildConfiguration; 465 | buildSettings = { 466 | ALWAYS_SEARCH_USER_PATHS = NO; 467 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 468 | CLANG_CXX_LIBRARY = "libc++"; 469 | CLANG_ENABLE_MODULES = YES; 470 | CLANG_ENABLE_OBJC_ARC = YES; 471 | CLANG_WARN_BOOL_CONVERSION = YES; 472 | CLANG_WARN_CONSTANT_CONVERSION = YES; 473 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 474 | CLANG_WARN_EMPTY_BODY = YES; 475 | CLANG_WARN_ENUM_CONVERSION = YES; 476 | CLANG_WARN_INT_CONVERSION = YES; 477 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 478 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 479 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 480 | COPY_PHASE_STRIP = YES; 481 | ENABLE_NS_ASSERTIONS = NO; 482 | GCC_C_LANGUAGE_STANDARD = gnu99; 483 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 484 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 485 | GCC_WARN_UNDECLARED_SELECTOR = YES; 486 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 487 | GCC_WARN_UNUSED_FUNCTION = YES; 488 | GCC_WARN_UNUSED_VARIABLE = YES; 489 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 490 | SDKROOT = iphoneos; 491 | TARGETED_DEVICE_FAMILY = "1,2"; 492 | VALIDATE_PRODUCT = YES; 493 | }; 494 | name = Release; 495 | }; 496 | 6003F5C0195388D20070C39A /* Debug */ = { 497 | isa = XCBuildConfiguration; 498 | baseConfigurationReference = 7EBE2A97B3E5A568A179AF9F /* Pods-GlobalTimer_Example.debug.xcconfig */; 499 | buildSettings = { 500 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 501 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 502 | GCC_PREFIX_HEADER = "GlobalTimer/GlobalTimer-Prefix.pch"; 503 | INFOPLIST_FILE = "GlobalTimer/GlobalTimer-Info.plist"; 504 | MODULE_NAME = ExampleApp; 505 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 506 | PRODUCT_NAME = "$(TARGET_NAME)"; 507 | SWIFT_VERSION = 4.0; 508 | WRAPPER_EXTENSION = app; 509 | }; 510 | name = Debug; 511 | }; 512 | 6003F5C1195388D20070C39A /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | baseConfigurationReference = D6B2647CB6D1761D7CBDD376 /* Pods-GlobalTimer_Example.release.xcconfig */; 515 | buildSettings = { 516 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 517 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 518 | GCC_PREFIX_HEADER = "GlobalTimer/GlobalTimer-Prefix.pch"; 519 | INFOPLIST_FILE = "GlobalTimer/GlobalTimer-Info.plist"; 520 | MODULE_NAME = ExampleApp; 521 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 522 | PRODUCT_NAME = "$(TARGET_NAME)"; 523 | SWIFT_VERSION = 4.0; 524 | WRAPPER_EXTENSION = app; 525 | }; 526 | name = Release; 527 | }; 528 | 6003F5C3195388D20070C39A /* Debug */ = { 529 | isa = XCBuildConfiguration; 530 | baseConfigurationReference = 50D78438CC030F7081C5568C /* Pods-GlobalTimer_Tests.debug.xcconfig */; 531 | buildSettings = { 532 | BUNDLE_LOADER = "$(TEST_HOST)"; 533 | FRAMEWORK_SEARCH_PATHS = ( 534 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 535 | "$(inherited)", 536 | "$(DEVELOPER_FRAMEWORKS_DIR)", 537 | ); 538 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 539 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 540 | GCC_PREPROCESSOR_DEFINITIONS = ( 541 | "DEBUG=1", 542 | "$(inherited)", 543 | ); 544 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 545 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 546 | PRODUCT_NAME = "$(TARGET_NAME)"; 547 | SWIFT_VERSION = 4.0; 548 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GlobalTimer_Example.app/GlobalTimer_Example"; 549 | WRAPPER_EXTENSION = xctest; 550 | }; 551 | name = Debug; 552 | }; 553 | 6003F5C4195388D20070C39A /* Release */ = { 554 | isa = XCBuildConfiguration; 555 | baseConfigurationReference = 4A22F99827BC12335FCD5946 /* Pods-GlobalTimer_Tests.release.xcconfig */; 556 | buildSettings = { 557 | BUNDLE_LOADER = "$(TEST_HOST)"; 558 | FRAMEWORK_SEARCH_PATHS = ( 559 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 560 | "$(inherited)", 561 | "$(DEVELOPER_FRAMEWORKS_DIR)", 562 | ); 563 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 564 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 565 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 566 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 567 | PRODUCT_NAME = "$(TARGET_NAME)"; 568 | SWIFT_VERSION = 4.0; 569 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GlobalTimer_Example.app/GlobalTimer_Example"; 570 | WRAPPER_EXTENSION = xctest; 571 | }; 572 | name = Release; 573 | }; 574 | /* End XCBuildConfiguration section */ 575 | 576 | /* Begin XCConfigurationList section */ 577 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "GlobalTimer" */ = { 578 | isa = XCConfigurationList; 579 | buildConfigurations = ( 580 | 6003F5BD195388D20070C39A /* Debug */, 581 | 6003F5BE195388D20070C39A /* Release */, 582 | ); 583 | defaultConfigurationIsVisible = 0; 584 | defaultConfigurationName = Release; 585 | }; 586 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "GlobalTimer_Example" */ = { 587 | isa = XCConfigurationList; 588 | buildConfigurations = ( 589 | 6003F5C0195388D20070C39A /* Debug */, 590 | 6003F5C1195388D20070C39A /* Release */, 591 | ); 592 | defaultConfigurationIsVisible = 0; 593 | defaultConfigurationName = Release; 594 | }; 595 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "GlobalTimer_Tests" */ = { 596 | isa = XCConfigurationList; 597 | buildConfigurations = ( 598 | 6003F5C3195388D20070C39A /* Debug */, 599 | 6003F5C4195388D20070C39A /* Release */, 600 | ); 601 | defaultConfigurationIsVisible = 0; 602 | defaultConfigurationName = Release; 603 | }; 604 | /* End XCConfigurationList section */ 605 | }; 606 | rootObject = 6003F582195388D10070C39A /* Project object */; 607 | } 608 | -------------------------------------------------------------------------------- /Example/GlobalTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/GlobalTimer.xcodeproj/xcshareddata/xcschemes/GlobalTimer-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 64 | 70 | 71 | 72 | 73 | 77 | 78 | 79 | 80 | 86 | 88 | 94 | 95 | 96 | 97 | 99 | 100 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /Example/GlobalTimer.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/GlobalTimer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/GlobalTimer.xcworkspace/xcuserdata/steve.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CNKCQ/GlobalTimer/a07c1e2ae82d3d1a0149ec9139eaf73950166855/Example/GlobalTimer.xcworkspace/xcuserdata/steve.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/GlobalTimer/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 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/GlobalTimer/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Example/GlobalTimer/GTAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTAppDelegate.h 3 | // GlobalTimer 4 | // 5 | // Created by wangchengqvan@gmail.com on 01/25/2018. 6 | // Copyright (c) 2018 wangchengqvan@gmail.com. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface GTAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/GlobalTimer/GTAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // GTAppDelegate.m 3 | // GlobalTimer 4 | // 5 | // Created by wangchengqvan@gmail.com on 01/25/2018. 6 | // Copyright (c) 2018 wangchengqvan@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "GTAppDelegate.h" 10 | 11 | @implementation GTAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/GlobalTimer/GTViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTViewController.h 3 | // GlobalTimer 4 | // 5 | // Created by wangchengqvan@gmail.com on 01/25/2018. 6 | // Copyright (c) 2018 wangchengqvan@gmail.com. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface GTViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/GlobalTimer/GTViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GTViewController.m 3 | // GlobalTimer 4 | // 5 | // Created by wangchengqvan@gmail.com on 01/25/2018. 6 | // Copyright (c) 2018 wangchengqvan@gmail.com. All rights reserved. 7 | // 8 | 9 | #import "GTViewController.h" 10 | #import 11 | 12 | @interface GTViewController () 13 | 14 | @end 15 | 16 | @implementation GTViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view, typically from a nib. 22 | // will spend 0.1 mb memory 23 | 24 | // UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(100, 120, 50, 30)]; 25 | // [button setBackgroundColor:[UIColor redColor]]; 26 | // [button addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside]; 27 | // [self.view addSubview:button]; 28 | // 29 | // [[GTimer shared] scheduledWith:@"first" timeInterval:2 repeat:YES block:^(NSDictionary *userinfo) { 30 | // NSLog(@"🇺🇸%@", userinfo[@"test"]); 31 | // } userinfo:@{@"test": @"ok"}]; 32 | // 33 | // [self performSelector:@selector(test) withObject:nil afterDelay:2]; 34 | 35 | // [[GTimer shared] scheduledWith:@"second" timeInterval:6 repeat:YES block:^(NSDictionary *userinfo) { 36 | // NSLog(@"🐯%@--%@", userinfo[@"cnkcq"], [NSThread currentThread]); 37 | // } userinfo:@{@"cnkcq": @"king"}]; 38 | 39 | // [[GTimer shared] scheduledWith:@"hello" timeInterval:4 repeat:YES block:^(NSDictionary *userinfo) { 40 | // NSLog(@"🌺%@--%@", userinfo[@"cnkcq"], [NSThread currentThread]); 41 | // } userinfo:@{}]; 42 | // 43 | [[GTimer shared] scheduledWith:@"seHcond" timeInterval:6 repeat:YES block:^(NSDictionary *userinfo) { 44 | NSInteger i = 0; 45 | while (i < 200) { 46 | NSString *blockqueueName = [NSString stringWithFormat:@"com.globaltimer.test.%.f", [self randomFloatBetween:0 andLargerFloat:100000.0]]; 47 | dispatch_queue_t blockqueue = dispatch_queue_create([blockqueueName cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT); 48 | dispatch_async(blockqueue, ^{ 49 | [[GTimer shared] scheduledWith:blockqueueName timeInterval:4 repeat:YES block:^(NSDictionary *userinfo) { 50 | NSTimeInterval interval = [self randomFloatBetween:1 andLargerFloat:50]; 51 | sleep(interval); 52 | NSLog(@"🌺%@--%@", userinfo[@"cnkcq"], [NSThread currentThread]); 53 | } userinfo:@{}]; 54 | }); 55 | i++; 56 | } 57 | } userinfo:@{@"cnkcq": @"king"}]; 58 | 59 | 60 | [[GTimer shared] scheduledWith:@"secondfk" timeInterval:9 repeat:YES block:^(NSDictionary *userinfo) { 61 | NSLog(@"🇺🇸%@--%@", userinfo[@"cnkcq"], [NSThread currentThread]); 62 | } userinfo:@{@"cnkcq": @"king"}]; 63 | 64 | 65 | [[GTimer shared] scheduledWith:@"dog" timeInterval:8 repeat:YES block:^(NSDictionary *userinfo) { 66 | NSLog(@"🐶%@", userinfo[@"dog"]); 67 | } userinfo:@{@"dog": @"旺财"}]; 68 | // for (int i = 1; i < 10000; i++) { 69 | // [[GTimer shared] scheduledWith:[NSString stringWithFormat:@"fourth%d", i] timeInterval:2 repeat:YES block:^(NSDictionary *userinfo) { 70 | // NSTimeInterval interval = [self randomFloatBetween:1 andLargerFloat:5]; 71 | // sleep(interval); 72 | // NSLog(@"🐱%@", userinfo[@"cat"]); 73 | // } userinfo:@{@"cat": @"咪咪"}]; 74 | // } 75 | 76 | } 77 | 78 | - (void)viewWillAppear:(BOOL)animated { 79 | [super viewWillAppear:animated]; 80 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"pausedog" style:UIBarButtonItemStylePlain target:self action:@selector(pauseDog)]; 81 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"activedog" style:UIBarButtonItemStylePlain target:self action:@selector(activeDog)]; 82 | } 83 | 84 | - (void)pauseDog { 85 | [[GTimer shared] pauseEventWith:@"dog"]; 86 | NSLog(@"%@", [[GTimer shared] eventList]); 87 | } 88 | 89 | - (void)activeDog { 90 | [[GTimer shared] activeEventWith:@"dog"]; 91 | [[GTimer shared] removeEventWith:@"fourth"]; 92 | } 93 | 94 | - (void)test { 95 | [[GTimer shared] scheduledWith:@"secondffuc" timeInterval:3 repeat:YES block:^(NSDictionary *userinfo) { 96 | NSLog(@"🚀%@--%@", userinfo[@"cnkcq"], [NSThread currentThread]); 97 | } userinfo:@{@"cnkcq": @"king"}]; 98 | NSInteger i = 0; 99 | while (i < 10) { 100 | [[GTimer shared] scheduledWith:@"seHcond" timeInterval:6 repeat:YES block:^(NSDictionary *userinfo) { 101 | NSLog(@"🐯%@--%@", userinfo[@"cnkcq"], [NSThread currentThread]); 102 | } userinfo:@{@"cnkcq": @"king"}]; 103 | i++; 104 | } 105 | 106 | } 107 | 108 | -(float)randomFloatBetween:(float)num1 andLargerFloat:(float)num2 109 | { 110 | int startVal = num1*10000; 111 | int endVal = num2*10000; 112 | 113 | int randomValue = startVal +(arc4random()%(endVal - startVal)); 114 | float a = randomValue; 115 | 116 | return(a /10000.0); 117 | } 118 | 119 | @end 120 | -------------------------------------------------------------------------------- /Example/GlobalTimer/GlobalTimer-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIBackgroundModes 28 | 29 | newsstand-content 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIMainStoryboardFile 34 | Main 35 | UIRequiredDeviceCapabilities 36 | 37 | armv7 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Example/GlobalTimer/GlobalTimer-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/GlobalTimer/Images.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 | } 99 | -------------------------------------------------------------------------------- /Example/GlobalTimer/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/GlobalTimer/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GlobalTimer 4 | // 5 | // Created by wangchengqvan@gmail.com on 01/25/2018. 6 | // Copyright (c) 2018 wangchengqvan@gmail.com. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "GTAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([GTAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'GlobalTimer_Example' do 4 | pod 'GlobalTimer', :path => '../' 5 | 6 | target 'GlobalTimer_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GlobalTimer (0.1.6) 3 | 4 | DEPENDENCIES: 5 | - GlobalTimer (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | GlobalTimer: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | GlobalTimer: 3ffb6217da17073498deba2258f47e4d15548156 13 | 14 | PODFILE CHECKSUM: af4182f92cc2bbc7a8d13ce05148fa1dea1013db 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Example/Pods/GlobalTimer/GlobalTimer/Classes/GTimer/GEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // GEvent.h 3 | // GlobalTimer 4 | // 5 | // Created by Steve on 26/01/2018. 6 | // 7 | 8 | #import 9 | 10 | typedef void(^GTBlock)(NSDictionary *userinfo); 11 | 12 | @interface GEvent : NSObject 13 | 14 | @property (nonatomic, strong) NSString *identifirer; 15 | 16 | @property (nonatomic, assign) NSTimeInterval interval; 17 | 18 | @property (nonatomic, copy) GTBlock block; 19 | 20 | @property (nonatomic, assign) BOOL repeat; 21 | 22 | @property (nonatomic, strong) NSDictionary *userinfo; 23 | 24 | @property (nonatomic, assign) BOOL isActive; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Example/Pods/GlobalTimer/GlobalTimer/Classes/GTimer/GEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // GEvent.m 3 | // GlobalTimer 4 | // 5 | // Created by Steve on 26/01/2018. 6 | // 7 | 8 | #import "GEvent.h" 9 | 10 | @implementation GEvent 11 | 12 | - (instancetype)init 13 | { 14 | self = [super init]; 15 | if (self) { 16 | self.repeat = YES; 17 | self.isActive = YES; 18 | } 19 | return self; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/Pods/GlobalTimer/GlobalTimer/Classes/GTimer/GTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTimer.h 3 | // Pods-GlobalTimer_Example 4 | // 5 | // Created by Steve on 25/01/2018. 6 | // 7 | 8 | #import 9 | #import "GEvent.h" 10 | 11 | 12 | @interface GTimer : NSObject 13 | 14 | + (instancetype _Nonnull )shard; 15 | 16 | - (void)scheduledWith: (NSString * _Nonnull )identifirer timeInterval: (NSTimeInterval)interval repeat:(BOOL)repeat block:(GTBlock _Nonnull )block userinfo:(NSDictionary * _Nullable)userinfo; 17 | 18 | - (void)pauseEventWith: (NSString * _Nonnull)identifirer; 19 | 20 | - (void)removeEventWith: (NSString * _Nonnull)identifirer; 21 | 22 | - (void)activeEventWith:(NSString * _Nonnull)identifirer; 23 | 24 | - (NSArray *_Nonnull)eventList; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Example/Pods/GlobalTimer/GlobalTimer/Classes/GTimer/GTimer.m: -------------------------------------------------------------------------------- 1 | 2 | // GTimer.m 3 | // Pods-GlobalTimer_Example 4 | // 5 | // Created by Steve on 25/01/2018. 6 | // 7 | 8 | #import "GTimer.h" 9 | #import 10 | #import 11 | #import 12 | 13 | #if !__has_feature(objc_arc) 14 | #error GTimer is ARC only. Either turn on ARC for the project or use -fobjc-arc flag 15 | #endif 16 | 17 | #if OS_OBJECT_USE_OBJC 18 | #define gt_gcd_property_qualifier strong 19 | #define gt_release_gcd_object(object) 20 | #else 21 | #define gt_gcd_property_qualifier assign 22 | #define gt_release_gcd_object(object) dispatch_release(object) 23 | #endif 24 | 25 | #define gtexecute_block_on_main_thread($block)\ 26 | if ($block) {\ 27 | if ([[NSThread currentThread] isMainThread]) {\ 28 | $block();\ 29 | } else {\ 30 | dispatch_sync(dispatch_get_main_queue(), ^{\ 31 | $block();\ 32 | });\ 33 | }\ 34 | }\ 35 | 36 | 37 | @interface GTimer() 38 | { 39 | struct 40 | { 41 | uint32_t timerIsInvalidated; 42 | } _timerFlags; 43 | } 44 | 45 | @property (nonatomic, assign) NSTimeInterval defaultTimeInterval; 46 | @property (nonatomic, strong) NSMutableArray *events; 47 | @property (nonatomic, assign) BOOL repeats; 48 | 49 | @property (nonatomic, gt_gcd_property_qualifier) dispatch_queue_t privateSerialQueue; 50 | 51 | @property (nonatomic, gt_gcd_property_qualifier) dispatch_source_t timer; 52 | 53 | @property (nonatomic, assign) NSTimeInterval indexInterval; 54 | 55 | @property (atomic, assign) NSTimeInterval tolerance; 56 | 57 | @end 58 | 59 | 60 | @implementation GTimer { 61 | pthread_mutex_t _lock; 62 | } 63 | 64 | @synthesize tolerance = _tolerance; 65 | 66 | + (instancetype)shard { 67 | static dispatch_once_t onceToken; 68 | static GTimer *_instance = nil; 69 | dispatch_once(&onceToken, ^{ 70 | _instance = [[GTimer alloc] init]; 71 | }); 72 | return _instance; 73 | } 74 | 75 | - (instancetype)init 76 | { 77 | self = [super init]; 78 | if (self) { 79 | [self setup]; 80 | } 81 | return self; 82 | } 83 | 84 | - (void)setup { 85 | if (self) { 86 | pthread_mutex_init(&_lock, NULL); 87 | self.defaultTimeInterval = 1; 88 | self.events = [NSMutableArray array]; 89 | self.privateSerialQueue = nil; 90 | NSString *privateQueueName = [NSString stringWithFormat:@"com.cnkcq.globaltimer.%p", self]; 91 | self.privateSerialQueue = dispatch_queue_create([privateQueueName cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_SERIAL); 92 | dispatch_set_target_queue(self.privateSerialQueue, nil); 93 | self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 94 | 0, 95 | 0, 96 | self.privateSerialQueue); 97 | [self schedule]; 98 | 99 | } 100 | } 101 | 102 | - (void)scheduledWith: (NSString *)identifirer timeInterval: (NSTimeInterval)interval repeat:(BOOL)repeat block:(GTBlock)block userinfo:(NSDictionary *)userinfo { 103 | if (!repeat) { 104 | [self fire]; 105 | } 106 | GEvent *event = [[GEvent alloc] init]; 107 | event.identifirer = identifirer; 108 | event.interval = interval; 109 | event.block = block; 110 | event.userinfo = userinfo; 111 | event.repeat = repeat; 112 | pthread_mutex_lock(&_lock); 113 | [self.events addObject:event]; 114 | pthread_mutex_unlock(&_lock); 115 | } 116 | 117 | - (void)activeEventWith:(NSString *)identifirer { 118 | pthread_mutex_lock(&_lock); 119 | NSArray *events = [self.events copy]; 120 | for (GEvent *event in events) { 121 | if ([event.identifirer isEqualToString:identifirer]) { 122 | event.isActive = YES; 123 | } 124 | } 125 | pthread_mutex_unlock(&_lock); 126 | } 127 | 128 | - (void)pauseEventWith:(NSString *)identifirer { 129 | pthread_mutex_lock(&_lock); 130 | NSArray *events = [self.events copy]; 131 | for (GEvent *event in events) { 132 | if ([event.identifirer isEqualToString:identifirer]) { 133 | event.isActive = NO; 134 | } 135 | } 136 | pthread_mutex_unlock(&_lock); 137 | } 138 | 139 | - (void)removeEventWith:(NSString *)identifirer { 140 | pthread_mutex_lock(&_lock); 141 | NSArray *events = [self.events copy]; 142 | for (GEvent *event in events) { 143 | if ([event.identifirer isEqualToString:identifirer]) { 144 | [self.events removeObject:event]; 145 | } 146 | } 147 | pthread_mutex_unlock(&_lock); 148 | } 149 | 150 | - (void)resetTimer 151 | { 152 | int64_t intervalInNanoseconds = (int64_t)(self.defaultTimeInterval * NSEC_PER_SEC); 153 | int64_t toleranceInNanoseconds = (int64_t)(self.tolerance * NSEC_PER_SEC); 154 | dispatch_source_set_timer( 155 | self.timer, 156 | dispatch_time(DISPATCH_TIME_NOW, intervalInNanoseconds), 157 | (uint64_t)intervalInNanoseconds, 158 | toleranceInNanoseconds 159 | ); 160 | } 161 | 162 | - (void)schedule 163 | { 164 | [self resetTimer]; 165 | @weakify(self); 166 | dispatch_source_set_event_handler(self.timer, ^{ 167 | @strongify(self); 168 | [self fire]; 169 | }); 170 | dispatch_resume(self.timer); 171 | } 172 | 173 | -(void)fire { 174 | // Checking attomatically if the timer has already been invalidated. 175 | if (OSAtomicAnd32OrigBarrier(1, &_timerFlags.timerIsInvalidated)) 176 | { 177 | return; 178 | } 179 | _indexInterval += 1; 180 | @weakify(self); 181 | [self.events enumerateObjectsUsingBlock:^(GEvent * _Nonnull event, NSUInteger idx, BOOL * _Nonnull stop) { 182 | @strongify(self); 183 | if ((NSInteger)self.indexInterval % (NSInteger)event.interval == 0 && event.isActive == YES) { 184 | gtexecute_block_on_main_thread(^{ 185 | event.block(event.userinfo); 186 | }); 187 | } 188 | }]; 189 | } 190 | 191 | -(void)invalidate { 192 | // We check with an atomic operation if it has already been invalidated. Ideally we would synchronize this on the private queue, 193 | // but since we can't know the context from which this method will be called, dispatch_sync might cause a deadlock. 194 | if (!OSAtomicTestAndSetBarrier(7, &_timerFlags.timerIsInvalidated)) 195 | { 196 | dispatch_source_t timer = self.timer; 197 | dispatch_async(self.privateSerialQueue, ^{ 198 | dispatch_source_cancel(timer); 199 | gt_release_gcd_object(timer); 200 | }); 201 | } 202 | } 203 | 204 | - (NSArray *)eventList { 205 | NSMutableArray *eventLists = [NSMutableArray array]; 206 | for (GEvent *event in self.events) { 207 | [eventLists addObject:event.identifirer]; 208 | } 209 | return eventLists; 210 | } 211 | 212 | -(void)dealloc { 213 | [self invalidate]; 214 | } 215 | 216 | @end 217 | -------------------------------------------------------------------------------- /Example/Pods/GlobalTimer/GlobalTimer/Classes/GlobalTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalTimer.h 3 | // GlobalTimer 4 | // 5 | // Created by Steve on 25/01/2018. 6 | // 7 | 8 | #import "GTimer.h" 9 | 10 | -------------------------------------------------------------------------------- /Example/Pods/GlobalTimer/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 wangchengqvan@gmail.com 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 | -------------------------------------------------------------------------------- /Example/Pods/GlobalTimer/README.md: -------------------------------------------------------------------------------- 1 | # GlobalTimer 2 | 3 | [![CI Status](http://img.shields.io/travis/wangchengqvan@gmail.com/GlobalTimer.svg?style=flat)](https://travis-ci.org/wangchengqvan@gmail.com/GlobalTimer) 4 | [![Version](https://img.shields.io/cocoapods/v/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer) 5 | [![License](https://img.shields.io/cocoapods/l/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer) 6 | [![Platform](https://img.shields.io/cocoapods/p/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer) 7 | 8 | ![images](https://user-images.githubusercontent.com/8440220/35437284-a5b4d8e6-02cc-11e8-92c3-d349a60a0e5e.jpeg) 9 | 10 | ## Example 11 | 12 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 13 | 14 | ## Requirements 15 | * Xcode 16 | * Objective-C 17 | 18 | ## Installation 19 | 20 | GlobalTimer is available through [CocoaPods](http://cocoapods.org). To install 21 | it, simply add the following line to your Podfile: 22 | 23 | ```ruby 24 | pod 'GlobalTimer' 25 | ``` 26 | 27 | ## Api 28 | ```Objective-C 29 | + (instancetype _Nonnull )shard; 30 | 31 | - (void)scheduledWith: (NSString * _Nonnull )identifirer timeInterval: (NSTimeInterval)interval repeat:(BOOL)repeat block:(GTBlock _Nonnull )block userinfo:(NSDictionary * _Nullable)userinfo; 32 | 33 | - (void)pauseEventWith: (NSString *_Nonnull)identifirer; 34 | 35 | - (void)removeEventWith: (NSString *_Nonnull)identifirer; 36 | 37 | - (void)activeEventWith:(NSString *_Nonnull)identifirer; 38 | 39 | - (NSArray *_Nonnull)eventList; 40 | ``` 41 | 42 | ## :book: Usage 43 | 44 | ```Objective-C 45 | [[GTimer shard] scheduledWith:@"first" timeInterval:2 repeat:YES block:^(NSDictionary *userinfo) { 46 | NSLog(@"🇺🇸%@", userinfo[@"test"]); 47 | } userinfo:@{@"test": @"ok"}]; 48 | 49 | [[GTimer shard] scheduledWith:@"second" timeInterval:5 repeat:YES block:^(NSDictionary *userinfo) { 50 | NSLog(@"🌺%@", userinfo[@"cnkcq"]); 51 | } userinfo:@{@"cnkcq": @"king"}]; 52 | [[GTimer shard] scheduledWith:@"dog" timeInterval:5 repeat:YES block:^(NSDictionary *userinfo) { 53 | NSLog(@"🐶%@", userinfo[@"dog"]); 54 | } userinfo:@{@"dog": @"旺财"}]; 55 | [[GTimer shard] scheduledWith:@"fourth" timeInterval:10 repeat:YES block:^(NSDictionary *userinfo) { 56 | NSLog(@"🐱%@", userinfo[@"cat"]); 57 | } userinfo:@{@"cat": @"咪咪"}]; 58 | 59 | ``` 60 | 61 | ```Objective-C 62 | [[GTimer shard] pauseEventWith:@"dog"]; 63 | NSLog(@"%@", [[GTimer shard] eventList]); 64 | [[GTimer shard] activeEventWith:@"dog"]; 65 | [[GTimer shard] removeEventWith:@"fourth"]; 66 | ``` 67 | ## Reprensent 68 | ![ti](https://user-images.githubusercontent.com/8440220/35437059-c17cdb56-02cb-11e8-9a3c-b3a5cec90be8.jpg) 69 | ## Author 70 | 71 | wangchengqvan@gmail.com, chengquan.wang@ele.me 72 | 73 | ## License 74 | 75 | GlobalTimer is available under the MIT license. See the LICENSE file for more info. 76 | 77 | 78 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/GlobalTimer.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "GlobalTimer", 3 | "version": "0.1.6", 4 | "summary": "A short description of GlobalTimer.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com/cnkcq/GlobalTimer", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "wangchengqvan@gmail.com": "chengquan.wang@ele.me" 13 | }, 14 | "source": { 15 | "git": "https://github.com/cnkcq/GlobalTimer.git", 16 | "tag": "0.1.6" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "GlobalTimer/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GlobalTimer (0.1.6) 3 | 4 | DEPENDENCIES: 5 | - GlobalTimer (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | GlobalTimer: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | GlobalTimer: 3ffb6217da17073498deba2258f47e4d15548156 13 | 14 | PODFILE CHECKSUM: af4182f92cc2bbc7a8d13ce05148fa1dea1013db 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 198C33BE5631B0ED601B6C0286038DFD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 11 | 2DC9160FB39627A5CD915511F925C6B5 /* Pods-GlobalTimer_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BAFDB1AA20E0C26F35467E984CABFDBD /* Pods-GlobalTimer_Tests-dummy.m */; }; 12 | 49A5AECCE966B646189FD11AE350DD14 /* Pods-GlobalTimer_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B89965C5DEFE3D5CC2278141D57D609 /* Pods-GlobalTimer_Example-dummy.m */; }; 13 | 4F4C525347E3CFDA624E5923A4418794 /* Pods-GlobalTimer_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BDBFFAB6A066C0187001048EF002BBC /* Pods-GlobalTimer_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 54178764A8E8B08A5543329AF3697B80 /* Pods-GlobalTimer_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B0CB813A91DEBBFAC6E649F6138C39F /* Pods-GlobalTimer_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | 548F4B7F465924528ECDF1018602475B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 16 | 5FBB0298475AD2C0E570451331625138 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 17 | 7B0097983D62A137131B30AB4BF81FAA /* GlobalTimer-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A540372D97D221675764BDAF1618DE87 /* GlobalTimer-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | 8362192E81E99FC5D1CE4506B8010FAA /* GEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 61A17126CC334587EA2091F22D58EC62 /* GEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | 8B87A7013A6B3EDC0EA99D5367416125 /* GTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5775D38F400A39049AF100AEF2C10443 /* GTimer.m */; }; 20 | 923F288358AEAC882B871917E1FD9105 /* GlobalTimer-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D5C2A5E9816E9261AD01E93C231D3DE3 /* GlobalTimer-dummy.m */; }; 21 | ABEA7E89F4D792C07B70B69790894792 /* GlobalTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = AF33D42695170B8AD3AE715328FDAE60 /* GlobalTimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 22 | ACBDE01C5C2DD72940476B0BF8A17BA0 /* GTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 47C94D09D198B0212CD266A9C49A4041 /* GTimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 23 | B7A8CA980C914AC3820A4C871441DB30 /* GEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C166AAB019D441C7562742D2E1E6570 /* GEvent.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 0AB7B1A41A7EDA6EC58BD0126E05E14A /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 7A2746F66E6684D001C8C3B95FACB964; 32 | remoteInfo = "Pods-GlobalTimer_Example"; 33 | }; 34 | 5EB766122D113D155C33AEAAEEA26E97 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 18003FD02CA6691B69C21201BFEADD7A; 39 | remoteInfo = GlobalTimer; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 107208E9CE16311F00C68398BD6A46E0 /* GlobalTimer.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = GlobalTimer.modulemap; sourceTree = ""; }; 45 | 1662528AA32C1BC4164802A0DBD6E599 /* Pods_GlobalTimer_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_GlobalTimer_Tests.framework; path = "Pods-GlobalTimer_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 1B0CB813A91DEBBFAC6E649F6138C39F /* Pods-GlobalTimer_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-GlobalTimer_Tests-umbrella.h"; sourceTree = ""; }; 47 | 1C166AAB019D441C7562742D2E1E6570 /* GEvent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = GEvent.m; sourceTree = ""; }; 48 | 1C4C2385BF003634C7ABEA01E8333B0C /* GlobalTimer.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GlobalTimer.xcconfig; sourceTree = ""; }; 49 | 24390EFD555DD124430DFF9724065945 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 50 | 277CD462A39E65672986FA763C8CF541 /* Pods-GlobalTimer_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-GlobalTimer_Tests-acknowledgements.plist"; sourceTree = ""; }; 51 | 2867689B062246A10B880C903D1D8401 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 2BDBFFAB6A066C0187001048EF002BBC /* Pods-GlobalTimer_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-GlobalTimer_Example-umbrella.h"; sourceTree = ""; }; 53 | 2BFAF9F5E186B6E485FC4A33B7B2B6C4 /* Pods-GlobalTimer_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GlobalTimer_Tests.debug.xcconfig"; sourceTree = ""; }; 54 | 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 55 | 3E68C2ABA4FB2DEAC8F4505BEF3ED6FF /* Pods-GlobalTimer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GlobalTimer_Example.debug.xcconfig"; sourceTree = ""; }; 56 | 402A49AFCBDBD7B1EBC3BEACAF79F3DB /* Pods-GlobalTimer_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-GlobalTimer_Example-acknowledgements.markdown"; sourceTree = ""; }; 57 | 47C94D09D198B0212CD266A9C49A4041 /* GTimer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = GTimer.h; sourceTree = ""; }; 58 | 4B89965C5DEFE3D5CC2278141D57D609 /* Pods-GlobalTimer_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-GlobalTimer_Example-dummy.m"; sourceTree = ""; }; 59 | 5775D38F400A39049AF100AEF2C10443 /* GTimer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = GTimer.m; sourceTree = ""; }; 60 | 5DEF49B47F3A1CCDDAF7D346052F3E1F /* Pods-GlobalTimer_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-GlobalTimer_Example-resources.sh"; sourceTree = ""; }; 61 | 61A17126CC334587EA2091F22D58EC62 /* GEvent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = GEvent.h; sourceTree = ""; }; 62 | 6559DC66B432A2A3F3F81EB3B09AA9C9 /* GlobalTimer.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = GlobalTimer.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 63 | 66DB18219877F441244B3EA3F6C5B4C7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | 759A6D832B189000802CCB02280C92A9 /* Pods-GlobalTimer_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-GlobalTimer_Tests-resources.sh"; sourceTree = ""; }; 65 | 8C01C836B98D7BE9C42CF3CC209B1391 /* GlobalTimer-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GlobalTimer-prefix.pch"; sourceTree = ""; }; 66 | 95E7AC6795B17E04DCEF844501DBAF3C /* Pods-GlobalTimer_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GlobalTimer_Tests.release.xcconfig"; sourceTree = ""; }; 67 | A18D71D543C464D2DEFA04974B29F493 /* GlobalTimer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = GlobalTimer.framework; path = GlobalTimer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | A524003B234A2FA93EF4465CCEFDD790 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | A540372D97D221675764BDAF1618DE87 /* GlobalTimer-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GlobalTimer-umbrella.h"; sourceTree = ""; }; 70 | AF33D42695170B8AD3AE715328FDAE60 /* GlobalTimer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GlobalTimer.h; path = GlobalTimer/Classes/GlobalTimer.h; sourceTree = ""; }; 71 | B561D3642E1107100ED17DBF2B72CBF4 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; 72 | B5DA072AAFE7D4851E9C20E0D5FEDFB6 /* Pods-GlobalTimer_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-GlobalTimer_Tests-acknowledgements.markdown"; sourceTree = ""; }; 73 | BAF80F33195C86938EC3C87F30D4D642 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; 74 | BAFDB1AA20E0C26F35467E984CABFDBD /* Pods-GlobalTimer_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-GlobalTimer_Tests-dummy.m"; sourceTree = ""; }; 75 | CD67D375A3F5DEC895D65C99D6C5B36D /* Pods-GlobalTimer_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-GlobalTimer_Tests.modulemap"; sourceTree = ""; }; 76 | D5C2A5E9816E9261AD01E93C231D3DE3 /* GlobalTimer-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "GlobalTimer-dummy.m"; sourceTree = ""; }; 77 | D9555F1648A2CEAAF1C5418FA59551A2 /* Pods-GlobalTimer_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-GlobalTimer_Example-frameworks.sh"; sourceTree = ""; }; 78 | DC470AAF68857CECFC52E799A63BE292 /* Pods-GlobalTimer_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-GlobalTimer_Example.modulemap"; sourceTree = ""; }; 79 | E640AB4FC3EC123CF8B244FD250B9CA5 /* Pods-GlobalTimer_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-GlobalTimer_Tests-frameworks.sh"; sourceTree = ""; }; 80 | E79EDE49B80A4C534B9530D6E15B65D7 /* Pods_GlobalTimer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_GlobalTimer_Example.framework; path = "Pods-GlobalTimer_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | EC9F4BB67307F76C413417AB2C0DE0A8 /* Pods-GlobalTimer_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GlobalTimer_Example.release.xcconfig"; sourceTree = ""; }; 82 | F2DA2788061915DA8AD60A4E4BF3DE3E /* Pods-GlobalTimer_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-GlobalTimer_Example-acknowledgements.plist"; sourceTree = ""; }; 83 | /* End PBXFileReference section */ 84 | 85 | /* Begin PBXFrameworksBuildPhase section */ 86 | 20C293F0C3937B9FDEF3E02FBC4FB0F3 /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | 548F4B7F465924528ECDF1018602475B /* Foundation.framework in Frameworks */, 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | 61451AF36D1E5A3701E08C4F11598665 /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | 198C33BE5631B0ED601B6C0286038DFD /* Foundation.framework in Frameworks */, 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | 8C2512AA9E82CCD1AE22C2C2C655F028 /* Frameworks */ = { 103 | isa = PBXFrameworksBuildPhase; 104 | buildActionMask = 2147483647; 105 | files = ( 106 | 5FBB0298475AD2C0E570451331625138 /* Foundation.framework in Frameworks */, 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | /* End PBXFrameworksBuildPhase section */ 111 | 112 | /* Begin PBXGroup section */ 113 | 00C58CCF4B06FB3F911859775706C330 /* GlobalTimer */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | AF33D42695170B8AD3AE715328FDAE60 /* GlobalTimer.h */, 117 | D522B683697C1D7810F4FF3DC92F5B52 /* GTimer */, 118 | 988F4667EEEBEA6CDCEE1F5C70594255 /* Pod */, 119 | F40EC583B8CA0DD371E431885284A2F8 /* Support Files */, 120 | ); 121 | name = GlobalTimer; 122 | path = ../..; 123 | sourceTree = ""; 124 | }; 125 | 2E2D65B0A115A917787FA3EB3D7913D4 /* Products */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | A18D71D543C464D2DEFA04974B29F493 /* GlobalTimer.framework */, 129 | E79EDE49B80A4C534B9530D6E15B65D7 /* Pods_GlobalTimer_Example.framework */, 130 | 1662528AA32C1BC4164802A0DBD6E599 /* Pods_GlobalTimer_Tests.framework */, 131 | ); 132 | name = Products; 133 | sourceTree = ""; 134 | }; 135 | 666275744EE447B43F57959119023185 /* Pods-GlobalTimer_Tests */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 2867689B062246A10B880C903D1D8401 /* Info.plist */, 139 | CD67D375A3F5DEC895D65C99D6C5B36D /* Pods-GlobalTimer_Tests.modulemap */, 140 | B5DA072AAFE7D4851E9C20E0D5FEDFB6 /* Pods-GlobalTimer_Tests-acknowledgements.markdown */, 141 | 277CD462A39E65672986FA763C8CF541 /* Pods-GlobalTimer_Tests-acknowledgements.plist */, 142 | BAFDB1AA20E0C26F35467E984CABFDBD /* Pods-GlobalTimer_Tests-dummy.m */, 143 | E640AB4FC3EC123CF8B244FD250B9CA5 /* Pods-GlobalTimer_Tests-frameworks.sh */, 144 | 759A6D832B189000802CCB02280C92A9 /* Pods-GlobalTimer_Tests-resources.sh */, 145 | 1B0CB813A91DEBBFAC6E649F6138C39F /* Pods-GlobalTimer_Tests-umbrella.h */, 146 | 2BFAF9F5E186B6E485FC4A33B7B2B6C4 /* Pods-GlobalTimer_Tests.debug.xcconfig */, 147 | 95E7AC6795B17E04DCEF844501DBAF3C /* Pods-GlobalTimer_Tests.release.xcconfig */, 148 | ); 149 | name = "Pods-GlobalTimer_Tests"; 150 | path = "Target Support Files/Pods-GlobalTimer_Tests"; 151 | sourceTree = ""; 152 | }; 153 | 88D28B9304885EB52A0A7E870D309B6D /* Targets Support Files */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | A028388BF7B7C6034E65E2445EAE28CF /* Pods-GlobalTimer_Example */, 157 | 666275744EE447B43F57959119023185 /* Pods-GlobalTimer_Tests */, 158 | ); 159 | name = "Targets Support Files"; 160 | sourceTree = ""; 161 | }; 162 | 988F4667EEEBEA6CDCEE1F5C70594255 /* Pod */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 6559DC66B432A2A3F3F81EB3B09AA9C9 /* GlobalTimer.podspec */, 166 | BAF80F33195C86938EC3C87F30D4D642 /* LICENSE */, 167 | B561D3642E1107100ED17DBF2B72CBF4 /* README.md */, 168 | ); 169 | name = Pod; 170 | sourceTree = ""; 171 | }; 172 | A016A79F8043FBE8B54681802354D986 /* Development Pods */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 00C58CCF4B06FB3F911859775706C330 /* GlobalTimer */, 176 | ); 177 | name = "Development Pods"; 178 | sourceTree = ""; 179 | }; 180 | A028388BF7B7C6034E65E2445EAE28CF /* Pods-GlobalTimer_Example */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | A524003B234A2FA93EF4465CCEFDD790 /* Info.plist */, 184 | DC470AAF68857CECFC52E799A63BE292 /* Pods-GlobalTimer_Example.modulemap */, 185 | 402A49AFCBDBD7B1EBC3BEACAF79F3DB /* Pods-GlobalTimer_Example-acknowledgements.markdown */, 186 | F2DA2788061915DA8AD60A4E4BF3DE3E /* Pods-GlobalTimer_Example-acknowledgements.plist */, 187 | 4B89965C5DEFE3D5CC2278141D57D609 /* Pods-GlobalTimer_Example-dummy.m */, 188 | D9555F1648A2CEAAF1C5418FA59551A2 /* Pods-GlobalTimer_Example-frameworks.sh */, 189 | 5DEF49B47F3A1CCDDAF7D346052F3E1F /* Pods-GlobalTimer_Example-resources.sh */, 190 | 2BDBFFAB6A066C0187001048EF002BBC /* Pods-GlobalTimer_Example-umbrella.h */, 191 | 3E68C2ABA4FB2DEAC8F4505BEF3ED6FF /* Pods-GlobalTimer_Example.debug.xcconfig */, 192 | EC9F4BB67307F76C413417AB2C0DE0A8 /* Pods-GlobalTimer_Example.release.xcconfig */, 193 | ); 194 | name = "Pods-GlobalTimer_Example"; 195 | path = "Target Support Files/Pods-GlobalTimer_Example"; 196 | sourceTree = ""; 197 | }; 198 | C0834CEBB1379A84116EF29F93051C60 /* iOS */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */, 202 | ); 203 | name = iOS; 204 | sourceTree = ""; 205 | }; 206 | CF1408CF629C7361332E53B88F7BD30C = { 207 | isa = PBXGroup; 208 | children = ( 209 | 24390EFD555DD124430DFF9724065945 /* Podfile */, 210 | A016A79F8043FBE8B54681802354D986 /* Development Pods */, 211 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, 212 | 2E2D65B0A115A917787FA3EB3D7913D4 /* Products */, 213 | 88D28B9304885EB52A0A7E870D309B6D /* Targets Support Files */, 214 | ); 215 | sourceTree = ""; 216 | }; 217 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | C0834CEBB1379A84116EF29F93051C60 /* iOS */, 221 | ); 222 | name = Frameworks; 223 | sourceTree = ""; 224 | }; 225 | D522B683697C1D7810F4FF3DC92F5B52 /* GTimer */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 61A17126CC334587EA2091F22D58EC62 /* GEvent.h */, 229 | 1C166AAB019D441C7562742D2E1E6570 /* GEvent.m */, 230 | 47C94D09D198B0212CD266A9C49A4041 /* GTimer.h */, 231 | 5775D38F400A39049AF100AEF2C10443 /* GTimer.m */, 232 | ); 233 | name = GTimer; 234 | path = GlobalTimer/Classes/GTimer; 235 | sourceTree = ""; 236 | }; 237 | F40EC583B8CA0DD371E431885284A2F8 /* Support Files */ = { 238 | isa = PBXGroup; 239 | children = ( 240 | 107208E9CE16311F00C68398BD6A46E0 /* GlobalTimer.modulemap */, 241 | 1C4C2385BF003634C7ABEA01E8333B0C /* GlobalTimer.xcconfig */, 242 | D5C2A5E9816E9261AD01E93C231D3DE3 /* GlobalTimer-dummy.m */, 243 | 8C01C836B98D7BE9C42CF3CC209B1391 /* GlobalTimer-prefix.pch */, 244 | A540372D97D221675764BDAF1618DE87 /* GlobalTimer-umbrella.h */, 245 | 66DB18219877F441244B3EA3F6C5B4C7 /* Info.plist */, 246 | ); 247 | name = "Support Files"; 248 | path = "Example/Pods/Target Support Files/GlobalTimer"; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXGroup section */ 252 | 253 | /* Begin PBXHeadersBuildPhase section */ 254 | 9972051ABDA8B7030A538AD767C4B5D7 /* Headers */ = { 255 | isa = PBXHeadersBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | 8362192E81E99FC5D1CE4506B8010FAA /* GEvent.h in Headers */, 259 | 7B0097983D62A137131B30AB4BF81FAA /* GlobalTimer-umbrella.h in Headers */, 260 | ABEA7E89F4D792C07B70B69790894792 /* GlobalTimer.h in Headers */, 261 | ACBDE01C5C2DD72940476B0BF8A17BA0 /* GTimer.h in Headers */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | ACF8AAE448672A0DBEC60DD91C0FFC2E /* Headers */ = { 266 | isa = PBXHeadersBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | 54178764A8E8B08A5543329AF3697B80 /* Pods-GlobalTimer_Tests-umbrella.h in Headers */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | BDAB3BE0643B814B44802A6AA4F57863 /* Headers */ = { 274 | isa = PBXHeadersBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | 4F4C525347E3CFDA624E5923A4418794 /* Pods-GlobalTimer_Example-umbrella.h in Headers */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | /* End PBXHeadersBuildPhase section */ 282 | 283 | /* Begin PBXNativeTarget section */ 284 | 18003FD02CA6691B69C21201BFEADD7A /* GlobalTimer */ = { 285 | isa = PBXNativeTarget; 286 | buildConfigurationList = 9A24508F5514A1A51A4E455BDED7E27C /* Build configuration list for PBXNativeTarget "GlobalTimer" */; 287 | buildPhases = ( 288 | 9972051ABDA8B7030A538AD767C4B5D7 /* Headers */, 289 | 5E391DE734CCDFB7E73534243BF57773 /* Sources */, 290 | 61451AF36D1E5A3701E08C4F11598665 /* Frameworks */, 291 | DC1D9DFA49C6EC19C3FB385B5194CB5F /* Resources */, 292 | ); 293 | buildRules = ( 294 | ); 295 | dependencies = ( 296 | ); 297 | name = GlobalTimer; 298 | productName = GlobalTimer; 299 | productReference = A18D71D543C464D2DEFA04974B29F493 /* GlobalTimer.framework */; 300 | productType = "com.apple.product-type.framework"; 301 | }; 302 | 7A2746F66E6684D001C8C3B95FACB964 /* Pods-GlobalTimer_Example */ = { 303 | isa = PBXNativeTarget; 304 | buildConfigurationList = 45E0209F260E500C0700FB8DC576AC97 /* Build configuration list for PBXNativeTarget "Pods-GlobalTimer_Example" */; 305 | buildPhases = ( 306 | BDAB3BE0643B814B44802A6AA4F57863 /* Headers */, 307 | 4D68CE161536EBB1237FC387EA41E656 /* Sources */, 308 | 20C293F0C3937B9FDEF3E02FBC4FB0F3 /* Frameworks */, 309 | CA1F32314E9C5E7166F6B815924E8748 /* Resources */, 310 | ); 311 | buildRules = ( 312 | ); 313 | dependencies = ( 314 | 0D7D6EF7570113F52133518386BD7DB4 /* PBXTargetDependency */, 315 | ); 316 | name = "Pods-GlobalTimer_Example"; 317 | productName = "Pods-GlobalTimer_Example"; 318 | productReference = E79EDE49B80A4C534B9530D6E15B65D7 /* Pods_GlobalTimer_Example.framework */; 319 | productType = "com.apple.product-type.framework"; 320 | }; 321 | C033418C5FE2D5DEEBAFA3F238F3A50E /* Pods-GlobalTimer_Tests */ = { 322 | isa = PBXNativeTarget; 323 | buildConfigurationList = 03729DC3320EAF3671427B2D137063FC /* Build configuration list for PBXNativeTarget "Pods-GlobalTimer_Tests" */; 324 | buildPhases = ( 325 | ACF8AAE448672A0DBEC60DD91C0FFC2E /* Headers */, 326 | 99424C2985869E0029DFB1D900880DB2 /* Sources */, 327 | 8C2512AA9E82CCD1AE22C2C2C655F028 /* Frameworks */, 328 | 5156EA30BFC880E351E319B6BFE899DF /* Resources */, 329 | ); 330 | buildRules = ( 331 | ); 332 | dependencies = ( 333 | E90548F38E0D10A439E2C276B8AF7A9E /* PBXTargetDependency */, 334 | ); 335 | name = "Pods-GlobalTimer_Tests"; 336 | productName = "Pods-GlobalTimer_Tests"; 337 | productReference = 1662528AA32C1BC4164802A0DBD6E599 /* Pods_GlobalTimer_Tests.framework */; 338 | productType = "com.apple.product-type.framework"; 339 | }; 340 | /* End PBXNativeTarget section */ 341 | 342 | /* Begin PBXProject section */ 343 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 344 | isa = PBXProject; 345 | attributes = { 346 | LastSwiftUpdateCheck = 1100; 347 | LastUpgradeCheck = 1100; 348 | }; 349 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 350 | compatibilityVersion = "Xcode 3.2"; 351 | developmentRegion = en; 352 | hasScannedForEncodings = 0; 353 | knownRegions = ( 354 | en, 355 | Base, 356 | ); 357 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 358 | productRefGroup = 2E2D65B0A115A917787FA3EB3D7913D4 /* Products */; 359 | projectDirPath = ""; 360 | projectRoot = ""; 361 | targets = ( 362 | 18003FD02CA6691B69C21201BFEADD7A /* GlobalTimer */, 363 | 7A2746F66E6684D001C8C3B95FACB964 /* Pods-GlobalTimer_Example */, 364 | C033418C5FE2D5DEEBAFA3F238F3A50E /* Pods-GlobalTimer_Tests */, 365 | ); 366 | }; 367 | /* End PBXProject section */ 368 | 369 | /* Begin PBXResourcesBuildPhase section */ 370 | 5156EA30BFC880E351E319B6BFE899DF /* Resources */ = { 371 | isa = PBXResourcesBuildPhase; 372 | buildActionMask = 2147483647; 373 | files = ( 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | }; 377 | CA1F32314E9C5E7166F6B815924E8748 /* Resources */ = { 378 | isa = PBXResourcesBuildPhase; 379 | buildActionMask = 2147483647; 380 | files = ( 381 | ); 382 | runOnlyForDeploymentPostprocessing = 0; 383 | }; 384 | DC1D9DFA49C6EC19C3FB385B5194CB5F /* Resources */ = { 385 | isa = PBXResourcesBuildPhase; 386 | buildActionMask = 2147483647; 387 | files = ( 388 | ); 389 | runOnlyForDeploymentPostprocessing = 0; 390 | }; 391 | /* End PBXResourcesBuildPhase section */ 392 | 393 | /* Begin PBXSourcesBuildPhase section */ 394 | 4D68CE161536EBB1237FC387EA41E656 /* Sources */ = { 395 | isa = PBXSourcesBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | 49A5AECCE966B646189FD11AE350DD14 /* Pods-GlobalTimer_Example-dummy.m in Sources */, 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | }; 402 | 5E391DE734CCDFB7E73534243BF57773 /* Sources */ = { 403 | isa = PBXSourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | B7A8CA980C914AC3820A4C871441DB30 /* GEvent.m in Sources */, 407 | 923F288358AEAC882B871917E1FD9105 /* GlobalTimer-dummy.m in Sources */, 408 | 8B87A7013A6B3EDC0EA99D5367416125 /* GTimer.m in Sources */, 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | }; 412 | 99424C2985869E0029DFB1D900880DB2 /* Sources */ = { 413 | isa = PBXSourcesBuildPhase; 414 | buildActionMask = 2147483647; 415 | files = ( 416 | 2DC9160FB39627A5CD915511F925C6B5 /* Pods-GlobalTimer_Tests-dummy.m in Sources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | /* End PBXSourcesBuildPhase section */ 421 | 422 | /* Begin PBXTargetDependency section */ 423 | 0D7D6EF7570113F52133518386BD7DB4 /* PBXTargetDependency */ = { 424 | isa = PBXTargetDependency; 425 | name = GlobalTimer; 426 | target = 18003FD02CA6691B69C21201BFEADD7A /* GlobalTimer */; 427 | targetProxy = 5EB766122D113D155C33AEAAEEA26E97 /* PBXContainerItemProxy */; 428 | }; 429 | E90548F38E0D10A439E2C276B8AF7A9E /* PBXTargetDependency */ = { 430 | isa = PBXTargetDependency; 431 | name = "Pods-GlobalTimer_Example"; 432 | target = 7A2746F66E6684D001C8C3B95FACB964 /* Pods-GlobalTimer_Example */; 433 | targetProxy = 0AB7B1A41A7EDA6EC58BD0126E05E14A /* PBXContainerItemProxy */; 434 | }; 435 | /* End PBXTargetDependency section */ 436 | 437 | /* Begin XCBuildConfiguration section */ 438 | 03808659B6DDB956DF515A4446154301 /* Debug */ = { 439 | isa = XCBuildConfiguration; 440 | baseConfigurationReference = 3E68C2ABA4FB2DEAC8F4505BEF3ED6FF /* Pods-GlobalTimer_Example.debug.xcconfig */; 441 | buildSettings = { 442 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 443 | CODE_SIGN_IDENTITY = ""; 444 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 445 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 446 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 447 | CURRENT_PROJECT_VERSION = 1; 448 | DEFINES_MODULE = YES; 449 | DYLIB_COMPATIBILITY_VERSION = 1; 450 | DYLIB_CURRENT_VERSION = 1; 451 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 452 | INFOPLIST_FILE = "Target Support Files/Pods-GlobalTimer_Example/Info.plist"; 453 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 454 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 456 | MACH_O_TYPE = staticlib; 457 | MODULEMAP_FILE = "Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example.modulemap"; 458 | OTHER_LDFLAGS = ""; 459 | OTHER_LIBTOOLFLAGS = ""; 460 | PODS_ROOT = "$(SRCROOT)"; 461 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 462 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 463 | SDKROOT = iphoneos; 464 | SKIP_INSTALL = YES; 465 | TARGETED_DEVICE_FAMILY = "1,2"; 466 | VERSIONING_SYSTEM = "apple-generic"; 467 | VERSION_INFO_PREFIX = ""; 468 | }; 469 | name = Debug; 470 | }; 471 | 14674CE743FF96CFA2E110BF2E35EDDB /* Release */ = { 472 | isa = XCBuildConfiguration; 473 | baseConfigurationReference = 1C4C2385BF003634C7ABEA01E8333B0C /* GlobalTimer.xcconfig */; 474 | buildSettings = { 475 | CODE_SIGN_IDENTITY = ""; 476 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 478 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 479 | CURRENT_PROJECT_VERSION = 1; 480 | DEFINES_MODULE = YES; 481 | DYLIB_COMPATIBILITY_VERSION = 1; 482 | DYLIB_CURRENT_VERSION = 1; 483 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 484 | GCC_PREFIX_HEADER = "Target Support Files/GlobalTimer/GlobalTimer-prefix.pch"; 485 | INFOPLIST_FILE = "Target Support Files/GlobalTimer/Info.plist"; 486 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 487 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 488 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 489 | MODULEMAP_FILE = "Target Support Files/GlobalTimer/GlobalTimer.modulemap"; 490 | PRODUCT_MODULE_NAME = GlobalTimer; 491 | PRODUCT_NAME = GlobalTimer; 492 | SDKROOT = iphoneos; 493 | SKIP_INSTALL = YES; 494 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 495 | SWIFT_VERSION = 4.0; 496 | TARGETED_DEVICE_FAMILY = "1,2"; 497 | VALIDATE_PRODUCT = YES; 498 | VERSIONING_SYSTEM = "apple-generic"; 499 | VERSION_INFO_PREFIX = ""; 500 | }; 501 | name = Release; 502 | }; 503 | 2A506743CF140B1834F797F766E2A82E /* Release */ = { 504 | isa = XCBuildConfiguration; 505 | buildSettings = { 506 | ALWAYS_SEARCH_USER_PATHS = NO; 507 | CLANG_ANALYZER_NONNULL = YES; 508 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 509 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 510 | CLANG_CXX_LIBRARY = "libc++"; 511 | CLANG_ENABLE_MODULES = YES; 512 | CLANG_ENABLE_OBJC_ARC = YES; 513 | CLANG_ENABLE_OBJC_WEAK = YES; 514 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 515 | CLANG_WARN_BOOL_CONVERSION = YES; 516 | CLANG_WARN_COMMA = YES; 517 | CLANG_WARN_CONSTANT_CONVERSION = YES; 518 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 519 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 520 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 521 | CLANG_WARN_EMPTY_BODY = YES; 522 | CLANG_WARN_ENUM_CONVERSION = YES; 523 | CLANG_WARN_INFINITE_RECURSION = YES; 524 | CLANG_WARN_INT_CONVERSION = YES; 525 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 526 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 527 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 528 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 529 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 530 | CLANG_WARN_STRICT_PROTOTYPES = YES; 531 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 532 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 533 | CLANG_WARN_UNREACHABLE_CODE = YES; 534 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 535 | CODE_SIGNING_ALLOWED = NO; 536 | CODE_SIGNING_REQUIRED = NO; 537 | COPY_PHASE_STRIP = NO; 538 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 539 | ENABLE_NS_ASSERTIONS = NO; 540 | ENABLE_STRICT_OBJC_MSGSEND = YES; 541 | GCC_C_LANGUAGE_STANDARD = gnu11; 542 | GCC_NO_COMMON_BLOCKS = YES; 543 | GCC_PREPROCESSOR_DEFINITIONS = ( 544 | "POD_CONFIGURATION_RELEASE=1", 545 | "$(inherited)", 546 | ); 547 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 548 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 549 | GCC_WARN_UNDECLARED_SELECTOR = YES; 550 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 551 | GCC_WARN_UNUSED_FUNCTION = YES; 552 | GCC_WARN_UNUSED_VARIABLE = YES; 553 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 554 | MTL_ENABLE_DEBUG_INFO = NO; 555 | MTL_FAST_MATH = YES; 556 | PRODUCT_NAME = "$(TARGET_NAME)"; 557 | STRIP_INSTALLED_PRODUCT = NO; 558 | SWIFT_COMPILATION_MODE = wholemodule; 559 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 560 | SWIFT_VERSION = 5.0; 561 | SYMROOT = "${SRCROOT}/../build"; 562 | }; 563 | name = Release; 564 | }; 565 | 3AD3F7183129119749FDFAD75516CD5B /* Debug */ = { 566 | isa = XCBuildConfiguration; 567 | baseConfigurationReference = 2BFAF9F5E186B6E485FC4A33B7B2B6C4 /* Pods-GlobalTimer_Tests.debug.xcconfig */; 568 | buildSettings = { 569 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 570 | CODE_SIGN_IDENTITY = ""; 571 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 572 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 573 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 574 | CURRENT_PROJECT_VERSION = 1; 575 | DEFINES_MODULE = YES; 576 | DYLIB_COMPATIBILITY_VERSION = 1; 577 | DYLIB_CURRENT_VERSION = 1; 578 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 579 | INFOPLIST_FILE = "Target Support Files/Pods-GlobalTimer_Tests/Info.plist"; 580 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 581 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 582 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 583 | MACH_O_TYPE = staticlib; 584 | MODULEMAP_FILE = "Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests.modulemap"; 585 | OTHER_LDFLAGS = ""; 586 | OTHER_LIBTOOLFLAGS = ""; 587 | PODS_ROOT = "$(SRCROOT)"; 588 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 589 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 590 | SDKROOT = iphoneos; 591 | SKIP_INSTALL = YES; 592 | TARGETED_DEVICE_FAMILY = "1,2"; 593 | VERSIONING_SYSTEM = "apple-generic"; 594 | VERSION_INFO_PREFIX = ""; 595 | }; 596 | name = Debug; 597 | }; 598 | A6A7DE9C902EFE38BE4A346301EA1DB9 /* Debug */ = { 599 | isa = XCBuildConfiguration; 600 | buildSettings = { 601 | ALWAYS_SEARCH_USER_PATHS = NO; 602 | CLANG_ANALYZER_NONNULL = YES; 603 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 604 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 605 | CLANG_CXX_LIBRARY = "libc++"; 606 | CLANG_ENABLE_MODULES = YES; 607 | CLANG_ENABLE_OBJC_ARC = YES; 608 | CLANG_ENABLE_OBJC_WEAK = YES; 609 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 610 | CLANG_WARN_BOOL_CONVERSION = YES; 611 | CLANG_WARN_COMMA = YES; 612 | CLANG_WARN_CONSTANT_CONVERSION = YES; 613 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 614 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 615 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 616 | CLANG_WARN_EMPTY_BODY = YES; 617 | CLANG_WARN_ENUM_CONVERSION = YES; 618 | CLANG_WARN_INFINITE_RECURSION = YES; 619 | CLANG_WARN_INT_CONVERSION = YES; 620 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 621 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 622 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 623 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 624 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 625 | CLANG_WARN_STRICT_PROTOTYPES = YES; 626 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 627 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 628 | CLANG_WARN_UNREACHABLE_CODE = YES; 629 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 630 | CODE_SIGNING_ALLOWED = NO; 631 | CODE_SIGNING_REQUIRED = NO; 632 | COPY_PHASE_STRIP = NO; 633 | DEBUG_INFORMATION_FORMAT = dwarf; 634 | ENABLE_STRICT_OBJC_MSGSEND = YES; 635 | ENABLE_TESTABILITY = YES; 636 | GCC_C_LANGUAGE_STANDARD = gnu11; 637 | GCC_DYNAMIC_NO_PIC = NO; 638 | GCC_NO_COMMON_BLOCKS = YES; 639 | GCC_OPTIMIZATION_LEVEL = 0; 640 | GCC_PREPROCESSOR_DEFINITIONS = ( 641 | "POD_CONFIGURATION_DEBUG=1", 642 | "DEBUG=1", 643 | "$(inherited)", 644 | ); 645 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 646 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 647 | GCC_WARN_UNDECLARED_SELECTOR = YES; 648 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 649 | GCC_WARN_UNUSED_FUNCTION = YES; 650 | GCC_WARN_UNUSED_VARIABLE = YES; 651 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 652 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 653 | MTL_FAST_MATH = YES; 654 | ONLY_ACTIVE_ARCH = YES; 655 | PRODUCT_NAME = "$(TARGET_NAME)"; 656 | STRIP_INSTALLED_PRODUCT = NO; 657 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 658 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 659 | SWIFT_VERSION = 5.0; 660 | SYMROOT = "${SRCROOT}/../build"; 661 | }; 662 | name = Debug; 663 | }; 664 | AECAA0301C80F7558AC86C92E4924337 /* Release */ = { 665 | isa = XCBuildConfiguration; 666 | baseConfigurationReference = 95E7AC6795B17E04DCEF844501DBAF3C /* Pods-GlobalTimer_Tests.release.xcconfig */; 667 | buildSettings = { 668 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 669 | CODE_SIGN_IDENTITY = ""; 670 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 671 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 672 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 673 | CURRENT_PROJECT_VERSION = 1; 674 | DEFINES_MODULE = YES; 675 | DYLIB_COMPATIBILITY_VERSION = 1; 676 | DYLIB_CURRENT_VERSION = 1; 677 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 678 | INFOPLIST_FILE = "Target Support Files/Pods-GlobalTimer_Tests/Info.plist"; 679 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 680 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 681 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 682 | MACH_O_TYPE = staticlib; 683 | MODULEMAP_FILE = "Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests.modulemap"; 684 | OTHER_LDFLAGS = ""; 685 | OTHER_LIBTOOLFLAGS = ""; 686 | PODS_ROOT = "$(SRCROOT)"; 687 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 688 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 689 | SDKROOT = iphoneos; 690 | SKIP_INSTALL = YES; 691 | TARGETED_DEVICE_FAMILY = "1,2"; 692 | VALIDATE_PRODUCT = YES; 693 | VERSIONING_SYSTEM = "apple-generic"; 694 | VERSION_INFO_PREFIX = ""; 695 | }; 696 | name = Release; 697 | }; 698 | F39354F9DF097098063337E3F6B1F15F /* Release */ = { 699 | isa = XCBuildConfiguration; 700 | baseConfigurationReference = EC9F4BB67307F76C413417AB2C0DE0A8 /* Pods-GlobalTimer_Example.release.xcconfig */; 701 | buildSettings = { 702 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 703 | CODE_SIGN_IDENTITY = ""; 704 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 705 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 706 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 707 | CURRENT_PROJECT_VERSION = 1; 708 | DEFINES_MODULE = YES; 709 | DYLIB_COMPATIBILITY_VERSION = 1; 710 | DYLIB_CURRENT_VERSION = 1; 711 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 712 | INFOPLIST_FILE = "Target Support Files/Pods-GlobalTimer_Example/Info.plist"; 713 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 714 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 715 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 716 | MACH_O_TYPE = staticlib; 717 | MODULEMAP_FILE = "Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example.modulemap"; 718 | OTHER_LDFLAGS = ""; 719 | OTHER_LIBTOOLFLAGS = ""; 720 | PODS_ROOT = "$(SRCROOT)"; 721 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 722 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 723 | SDKROOT = iphoneos; 724 | SKIP_INSTALL = YES; 725 | TARGETED_DEVICE_FAMILY = "1,2"; 726 | VALIDATE_PRODUCT = YES; 727 | VERSIONING_SYSTEM = "apple-generic"; 728 | VERSION_INFO_PREFIX = ""; 729 | }; 730 | name = Release; 731 | }; 732 | FD45F22C5CD0CB1081A80FDAFC25ACE5 /* Debug */ = { 733 | isa = XCBuildConfiguration; 734 | baseConfigurationReference = 1C4C2385BF003634C7ABEA01E8333B0C /* GlobalTimer.xcconfig */; 735 | buildSettings = { 736 | CODE_SIGN_IDENTITY = ""; 737 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 738 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 739 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 740 | CURRENT_PROJECT_VERSION = 1; 741 | DEFINES_MODULE = YES; 742 | DYLIB_COMPATIBILITY_VERSION = 1; 743 | DYLIB_CURRENT_VERSION = 1; 744 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 745 | GCC_PREFIX_HEADER = "Target Support Files/GlobalTimer/GlobalTimer-prefix.pch"; 746 | INFOPLIST_FILE = "Target Support Files/GlobalTimer/Info.plist"; 747 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 748 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 749 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 750 | MODULEMAP_FILE = "Target Support Files/GlobalTimer/GlobalTimer.modulemap"; 751 | PRODUCT_MODULE_NAME = GlobalTimer; 752 | PRODUCT_NAME = GlobalTimer; 753 | SDKROOT = iphoneos; 754 | SKIP_INSTALL = YES; 755 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 756 | SWIFT_VERSION = 4.0; 757 | TARGETED_DEVICE_FAMILY = "1,2"; 758 | VERSIONING_SYSTEM = "apple-generic"; 759 | VERSION_INFO_PREFIX = ""; 760 | }; 761 | name = Debug; 762 | }; 763 | /* End XCBuildConfiguration section */ 764 | 765 | /* Begin XCConfigurationList section */ 766 | 03729DC3320EAF3671427B2D137063FC /* Build configuration list for PBXNativeTarget "Pods-GlobalTimer_Tests" */ = { 767 | isa = XCConfigurationList; 768 | buildConfigurations = ( 769 | 3AD3F7183129119749FDFAD75516CD5B /* Debug */, 770 | AECAA0301C80F7558AC86C92E4924337 /* Release */, 771 | ); 772 | defaultConfigurationIsVisible = 0; 773 | defaultConfigurationName = Release; 774 | }; 775 | 45E0209F260E500C0700FB8DC576AC97 /* Build configuration list for PBXNativeTarget "Pods-GlobalTimer_Example" */ = { 776 | isa = XCConfigurationList; 777 | buildConfigurations = ( 778 | 03808659B6DDB956DF515A4446154301 /* Debug */, 779 | F39354F9DF097098063337E3F6B1F15F /* Release */, 780 | ); 781 | defaultConfigurationIsVisible = 0; 782 | defaultConfigurationName = Release; 783 | }; 784 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 785 | isa = XCConfigurationList; 786 | buildConfigurations = ( 787 | A6A7DE9C902EFE38BE4A346301EA1DB9 /* Debug */, 788 | 2A506743CF140B1834F797F766E2A82E /* Release */, 789 | ); 790 | defaultConfigurationIsVisible = 0; 791 | defaultConfigurationName = Release; 792 | }; 793 | 9A24508F5514A1A51A4E455BDED7E27C /* Build configuration list for PBXNativeTarget "GlobalTimer" */ = { 794 | isa = XCConfigurationList; 795 | buildConfigurations = ( 796 | FD45F22C5CD0CB1081A80FDAFC25ACE5 /* Debug */, 797 | 14674CE743FF96CFA2E110BF2E35EDDB /* Release */, 798 | ); 799 | defaultConfigurationIsVisible = 0; 800 | defaultConfigurationName = Release; 801 | }; 802 | /* End XCConfigurationList section */ 803 | }; 804 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 805 | } 806 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/GlobalTimer/GlobalTimer-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_GlobalTimer : NSObject 3 | @end 4 | @implementation PodsDummy_GlobalTimer 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/GlobalTimer/GlobalTimer-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/GlobalTimer/GlobalTimer-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "GlobalTimer.h" 14 | #import "GEvent.h" 15 | #import "GTimer.h" 16 | 17 | FOUNDATION_EXPORT double GlobalTimerVersionNumber; 18 | FOUNDATION_EXPORT const unsigned char GlobalTimerVersionString[]; 19 | 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/GlobalTimer/GlobalTimer.modulemap: -------------------------------------------------------------------------------- 1 | framework module GlobalTimer { 2 | umbrella header "GlobalTimer-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/GlobalTimer/GlobalTimer.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/GlobalTimer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.6 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## GlobalTimer 5 | 6 | Copyright (c) 2018 wangchengqvan@gmail.com 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2018 wangchengqvan@gmail.com <chengquan.wang@ele.me> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | GlobalTimer 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_GlobalTimer_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_GlobalTimer_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/GlobalTimer/GlobalTimer.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${BUILT_PRODUCTS_DIR}/GlobalTimer/GlobalTimer.framework" 150 | fi 151 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 152 | wait 153 | fi 154 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_GlobalTimer_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_GlobalTimer_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer/GlobalTimer.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "GlobalTimer" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_GlobalTimer_Example { 2 | umbrella header "Pods-GlobalTimer_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Example/Pods-GlobalTimer_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer/GlobalTimer.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "GlobalTimer" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_GlobalTimer_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_GlobalTimer_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_GlobalTimer_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_GlobalTimer_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer/GlobalTimer.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_GlobalTimer_Tests { 2 | umbrella header "Pods-GlobalTimer_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-GlobalTimer_Tests/Pods-GlobalTimer_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/GlobalTimer/GlobalTimer.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Tests/Tests-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 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalTimerTests.m 3 | // GlobalTimerTests 4 | // 5 | // Created by wangchengqvan@gmail.com on 01/25/2018. 6 | // Copyright (c) 2018 wangchengqvan@gmail.com. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /GlobalTimer.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint GlobalTimer.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 = 'GlobalTimer' 11 | s.version = '0.1.6' 12 | s.summary = 'A short description of GlobalTimer.' 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 | TODO: Add long description of the pod here. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/cnkcq/GlobalTimer' 25 | s.license = { :type => 'MIT', :file => 'LICENSE' } 26 | s.author = { 'wangchengqvan@gmail.com' => 'chengquan.wang@ele.me' } 27 | s.source = { :git => 'https://github.com/cnkcq/GlobalTimer.git', :tag => s.version.to_s } 28 | 29 | s.ios.deployment_target = '8.0' 30 | 31 | s.source_files = 'GlobalTimer/Classes/**/*' 32 | 33 | end 34 | -------------------------------------------------------------------------------- /GlobalTimer/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CNKCQ/GlobalTimer/a07c1e2ae82d3d1a0149ec9139eaf73950166855/GlobalTimer/Assets/.gitkeep -------------------------------------------------------------------------------- /GlobalTimer/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CNKCQ/GlobalTimer/a07c1e2ae82d3d1a0149ec9139eaf73950166855/GlobalTimer/Classes/.gitkeep -------------------------------------------------------------------------------- /GlobalTimer/Classes/GTimer/GEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // GEvent.h 3 | // GlobalTimer 4 | // 5 | // Created by Steve on 26/01/2018. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface GEvent : NSObject 12 | 13 | typedef void(^GTBlock)(NSDictionary *userinfo); 14 | 15 | @property (nonatomic, copy, readonly) NSString *identifirer; 16 | 17 | @property (nonatomic, assign) NSInteger interval; 18 | 19 | @property (nonatomic, assign) NSInteger creatAt; 20 | 21 | @property (nonatomic, copy) GTBlock block; 22 | 23 | @property (nonatomic, assign) BOOL repeat; 24 | 25 | @property (nonatomic, copy) NSDictionary *userinfo; 26 | 27 | @property (nonatomic, assign) BOOL isActive; 28 | 29 | + (instancetype)eventWith: (NSString *)identifirer; 30 | 31 | - (instancetype)init NS_UNAVAILABLE; 32 | 33 | @end 34 | 35 | 36 | -------------------------------------------------------------------------------- /GlobalTimer/Classes/GTimer/GEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // GEvent.m 3 | // GlobalTimer 4 | // 5 | // Created by Steve on 26/01/2018. 6 | // 7 | 8 | #import "GEvent.h" 9 | 10 | @interface GEvent() 11 | 12 | @property (nonatomic, copy) NSString *identifirer; 13 | 14 | @end 15 | 16 | @implementation GEvent 17 | 18 | + (instancetype)eventWith: (NSString *)identifirer { 19 | GEvent *event = [[self alloc] init]; 20 | event.identifirer = identifirer; 21 | return event; 22 | } 23 | 24 | - (instancetype)init 25 | { 26 | self = [super init]; 27 | if (self) { 28 | self.repeat = YES; 29 | self.isActive = YES; 30 | self.creatAt = 0; 31 | self.interval = 0; 32 | self.userinfo = @{}; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)setCreatAt:(NSInteger)creatAt { 38 | if (creatAt) { 39 | _creatAt = creatAt; 40 | } 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /GlobalTimer/Classes/GTimer/GTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTimer.h 3 | // Pods-GlobalTimer_Example 4 | // 5 | // Created by Steve on 25/01/2018. 6 | // 7 | 8 | #import 9 | #import "GEvent.h" 10 | 11 | @interface GTimer : NSObject 12 | 13 | /** 14 | Create and schedule a timer, execute only once. 15 | 16 | @return the GTimer object 17 | */ 18 | + (instancetype _Nonnull )shared; 19 | 20 | /** 21 | add an event that will call `block` repeatedly in specified time intervals. 22 | 23 | @param identifirer a flag of the event 24 | @param interval time interval for the loop event 25 | @param repeat the property for the event 26 | @param block the `block` that would been called 27 | @param userinfo the specified params 28 | */ 29 | - (void)scheduledWith: (NSString * _Nonnull )identifirer timeInterval: (NSInteger)interval repeat:(BOOL)repeat block:(GTBlock _Nonnull )block userinfo:(NSDictionary * _Nullable)userinfo; 30 | 31 | /** 32 | update an event with the specified params. 33 | 34 | @param identifirer a flag of the event 35 | @param interval time interval for the loop event 36 | @param repeat the property for the event 37 | @param block the `block` that would been called 38 | @param userinfo the specified params 39 | */ 40 | - (void)updateEventWith: (NSString * _Nonnull )identifirer timeInterval: (NSInteger)interval repeat:(BOOL)repeat block:(GTBlock _Nullable)block userinfo:(NSDictionary * _Nullable)userinfo; 41 | 42 | /** 43 | update an event with the specified params. 44 | 45 | @param identifirer a flag of the event 46 | @param interval time interval for the loop event 47 | */ 48 | - (void)updateEventWith: (NSString * _Nonnull )identifirer timeInterval: (NSInteger)interval; 49 | 50 | /** 51 | pause an event with the specified flag. 52 | 53 | @param identifirer a flag of the event 54 | */ 55 | - (void)pauseEventWith: (NSString * _Nonnull)identifirer; 56 | 57 | /** 58 | remove an event with the specified flag. 59 | 60 | @param identifirer a flag of the event 61 | */ 62 | - (void)removeEventWith: (NSString * _Nonnull)identifirer; 63 | 64 | /** 65 | active an event with the specified flag. 66 | 67 | @param identifirer a flag of the event 68 | */ 69 | - (void)activeEventWith: (NSString * _Nonnull)identifirer; 70 | 71 | /** 72 | return a list of the event. 73 | 74 | @return list of event flag 75 | */ 76 | - (NSArray *_Nonnull)eventList; 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /GlobalTimer/Classes/GTimer/GTimer.m: -------------------------------------------------------------------------------- 1 | 2 | // GTimer.m 3 | // Pods-GlobalTimer_Example 4 | // 5 | // Created by Steve on 25/01/2018. 6 | // 7 | 8 | #import "GTimer.h" 9 | #import "GEvent.h" 10 | #import 11 | #import 12 | #import 13 | 14 | #if !__has_feature(objc_arc) 15 | #error GTimer is ARC only. Either turn on ARC for the project or use -fobjc-arc flag 16 | #endif 17 | 18 | #if OS_OBJECT_USE_OBJC 19 | #define gt_gcd_property_qualifier strong 20 | #define gt_release_gcd_object(object) 21 | #else 22 | #define gt_gcd_property_qualifier assign 23 | #define gt_release_gcd_object(object) dispatch_release(object) 24 | #endif 25 | 26 | #define gtweakify(var) __weak typeof(var) gtweak_##var = var; 27 | 28 | #define gtstrongify(var) \ 29 | _Pragma("clang diagnostic push") \ 30 | _Pragma("clang diagnostic ignored \"-Wshadow\"") \ 31 | __strong typeof(var) var = gtweak_##var; \ 32 | _Pragma("clang diagnostic pop") 33 | 34 | #define LOCK(...) do {\ 35 | dispatch_semaphore_wait(_lock, DISPATCH_TIME_FOREVER);\ 36 | __VA_ARGS__;\ 37 | dispatch_semaphore_signal(_lock);\ 38 | } while (0); 39 | 40 | 41 | // Function to return gcd of a and b 42 | int gcd(int a, int b) 43 | { 44 | if (a == 0) 45 | return b; 46 | return gcd(b % a, a); 47 | } 48 | 49 | // Function to find gcd of array of 50 | // numbers 51 | NS_INLINE int findGCD(int arr[], NSUInteger n) 52 | { 53 | int result = arr[0]; 54 | for (int i=1; i *events; 87 | 88 | @property (nonatomic, assign) BOOL repeats; 89 | 90 | @property (nonatomic, gt_gcd_property_qualifier) dispatch_queue_t privateConcurrentQueue; 91 | 92 | @property (nonatomic, gt_gcd_property_qualifier) dispatch_source_t timer; 93 | 94 | @property (atomic, assign) NSInteger indexInterval; 95 | 96 | @property (atomic, assign) NSTimeInterval tolerance; 97 | 98 | 99 | @end 100 | 101 | 102 | @implementation GTimer { 103 | pthread_mutex_t pLock; 104 | } 105 | 106 | @synthesize tolerance = _tolerance; 107 | 108 | 109 | + (instancetype)shared { 110 | static dispatch_once_t onceToken; 111 | static GTimer *_instance = nil; 112 | dispatch_once(&onceToken, ^{ 113 | _instance = [[GTimer alloc] init]; 114 | }); 115 | return _instance; 116 | } 117 | 118 | - (instancetype)init 119 | { 120 | self = [super init]; 121 | if (self) { 122 | [self setup]; 123 | } 124 | return self; 125 | } 126 | 127 | - (void)setup { 128 | if (self) { 129 | pthread_mutex_init(&pLock, NULL); 130 | self.defaultTimeInterval = 1; 131 | self.indexInterval = 0; 132 | self.events = [NSMutableArray array]; 133 | self.privateConcurrentQueue = nil; 134 | NSString *privateQueueName = [NSString stringWithFormat:@"com.globaltimer.%p", self]; 135 | self.privateConcurrentQueue = dispatch_queue_create([privateQueueName cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT); 136 | self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 137 | 0, 138 | 0, 139 | self.privateConcurrentQueue); 140 | [self schedule]; 141 | } 142 | } 143 | 144 | - (void)scheduledWith: (NSString *)identifirer timeInterval: (NSInteger)interval repeat:(BOOL)repeat block:(GTBlock)block userinfo:(NSDictionary *)userinfo { 145 | @autoreleasepool { 146 | pthread_mutex_lock(&pLock); 147 | NSArray *tempEvents = [self.events copy]; 148 | BOOL shouldSkip = NO; 149 | for(GEvent *obj in tempEvents) { 150 | //#ifdef DEBUG 151 | // NSString *desc = [NSString stringWithFormat:@"Duplicate rawValue definition for identifirer '%@'", identifirer]; 152 | // NSAssert(obj.identifirer != identifirer, desc); 153 | //#else 154 | shouldSkip = obj.identifirer == identifirer; 155 | if (shouldSkip == YES) { 156 | break; 157 | } 158 | //#endif 159 | } 160 | if (shouldSkip == YES) { 161 | return; 162 | }; 163 | dispatch_async(self.privateConcurrentQueue, ^{ 164 | block(userinfo); 165 | }); 166 | if (!repeat) { 167 | return; 168 | } 169 | GEvent *event = [GEvent eventWith:identifirer]; 170 | event.interval = interval; 171 | event.creatAt = self.indexInterval % interval; 172 | event.block = block; 173 | event.userinfo = userinfo; 174 | event.repeat = repeat; 175 | [self.events addObject:event]; 176 | pthread_mutex_unlock(&pLock); 177 | } 178 | } 179 | 180 | - (void)updateEventWith: (NSString * _Nonnull )identifirer timeInterval: (NSInteger)interval { 181 | [self updateEventWith:identifirer timeInterval:interval repeat:YES block:nil userinfo:nil]; 182 | } 183 | 184 | 185 | - (void)updateEventWith: (NSString * _Nonnull )identifirer timeInterval: (NSInteger)interval repeat:(BOOL)repeat block:(GTBlock _Nullable )block userinfo:(NSDictionary * _Nullable)userinfo { 186 | pthread_mutex_lock(&pLock); 187 | NSArray *tempEvents = [self.events copy]; 188 | for (GEvent *event in tempEvents) { 189 | if ([event.identifirer isEqualToString:identifirer]) { 190 | event.interval = interval != 0 ? interval : event.interval; 191 | event.repeat = repeat; 192 | event.block = block != nil ? block : event.block; 193 | event.userinfo = userinfo != nil ? userinfo : event.userinfo; 194 | } 195 | } 196 | pthread_mutex_unlock(&pLock); 197 | } 198 | 199 | - (void)activeEventWith:(NSString *)identifirer { 200 | pthread_mutex_lock(&pLock); 201 | NSArray *tempEvents = [self.events copy]; 202 | for (GEvent *event in tempEvents) { 203 | if ([event.identifirer isEqualToString:identifirer]) { 204 | event.isActive = YES; 205 | } 206 | } 207 | pthread_mutex_unlock(&pLock); 208 | } 209 | 210 | - (void)pauseEventWith:(NSString *)identifirer { 211 | pthread_mutex_lock(&pLock); 212 | NSArray *tempEvents = [self.events copy]; 213 | for (GEvent *event in tempEvents) { 214 | if ([event.identifirer isEqualToString:identifirer]) { 215 | event.isActive = NO; 216 | } 217 | } 218 | pthread_mutex_unlock(&pLock); 219 | } 220 | 221 | - (void)removeEventWith:(NSString *)identifirer { 222 | pthread_mutex_lock(&pLock); 223 | NSArray *tempEvents = [self.events copy]; 224 | for (GEvent *event in tempEvents) { 225 | if ([event.identifirer isEqualToString:identifirer]) { 226 | [self.events removeObject:event]; 227 | } 228 | } 229 | pthread_mutex_unlock(&pLock); 230 | } 231 | 232 | - (int)gcdInterval { 233 | pthread_mutex_lock(&pLock); 234 | NSArray *tempEvents = [self.events copy]; 235 | NSUInteger count = [tempEvents count]; 236 | int intervals[sizeof(int)*count]; 237 | for (int i = 0; i < tempEvents.count; i++) { 238 | intervals[i] = (int)tempEvents[i].interval; 239 | } 240 | int gcd = findGCD(intervals, count); 241 | pthread_mutex_unlock(&pLock); 242 | return gcd; 243 | } 244 | 245 | - (int)lcmInterval { 246 | pthread_mutex_lock(&pLock); 247 | NSArray *tempEvents = [self.events copy]; 248 | NSUInteger count = [tempEvents count]; 249 | int intervals[sizeof(int)*count]; 250 | for (NSUInteger i = 0; i < tempEvents.count; i++) { 251 | intervals[i] = (int)tempEvents[i].interval; 252 | } 253 | int lcm = findLCM(intervals, count); 254 | pthread_mutex_unlock(&pLock); 255 | return lcm; 256 | } 257 | 258 | - (void)resetTimer 259 | { 260 | int64_t intervalInNanoseconds = (int64_t)(self.defaultTimeInterval * NSEC_PER_SEC); 261 | int64_t toleranceInNanoseconds = (int64_t)(self.tolerance * NSEC_PER_SEC); 262 | dispatch_source_set_timer( 263 | self.timer, 264 | dispatch_time(DISPATCH_TIME_NOW, intervalInNanoseconds), 265 | (uint64_t)intervalInNanoseconds, 266 | toleranceInNanoseconds 267 | ); 268 | } 269 | 270 | - (void)schedule 271 | { 272 | [self resetTimer]; 273 | dispatch_source_set_event_handler(self.timer, ^{ 274 | [self fire]; 275 | }); 276 | dispatch_resume(self.timer); 277 | } 278 | 279 | -(void)fire { 280 | // Checking attomatically if the timer has already been invalidated. 281 | if (OSAtomicAnd32OrigBarrier(1, &_timerFlags.timerIsInvalidated)) 282 | { 283 | return; 284 | } 285 | @autoreleasepool { 286 | pthread_mutex_lock(&pLock); 287 | self.indexInterval += self.defaultTimeInterval; 288 | NSArray *tempEvents = [self.events copy]; 289 | pthread_mutex_unlock(&pLock); 290 | [tempEvents enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(GEvent * _Nonnull event, NSUInteger idx, BOOL * _Nonnull stop) { 291 | NSString *blockqueueName = [NSString stringWithFormat:@"com.globaltimer.%@", event.identifirer]; 292 | dispatch_queue_t blockqueue = dispatch_queue_create([blockqueueName cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT); 293 | dispatch_async(blockqueue, ^{ 294 | BOOL executeable = event.interval != 0 && (self.indexInterval - event.creatAt) % event.interval == 0 && event.isActive == YES && event.block != nil; 295 | if (executeable) { 296 | event.block(event.userinfo); 297 | } 298 | }); 299 | }]; 300 | if (self.indexInterval > [self lcmInterval] && [self lcmInterval] != 0) { 301 | self.indexInterval = self.indexInterval % [self lcmInterval]; 302 | } 303 | } 304 | } 305 | 306 | -(void)invalidate { 307 | // We check with an atomic operation if it has already been invalidated. Ideally we would synchronize this on the private queue, 308 | // but since we can't know the context from which this method will be called, dispatch_sync might cause a deadlock. 309 | if (!OSAtomicTestAndSetBarrier(7, &_timerFlags.timerIsInvalidated)) 310 | { 311 | dispatch_source_t timer = self.timer; 312 | dispatch_async(self.privateConcurrentQueue, ^{ 313 | dispatch_source_cancel(timer); 314 | gt_release_gcd_object(timer); 315 | }); 316 | } 317 | } 318 | 319 | - (NSArray *)eventList { 320 | NSMutableArray *eventLists = [NSMutableArray array]; 321 | NSArray *tempEvents = [self.events copy]; 322 | for (GEvent *event in tempEvents) { 323 | [eventLists addObject:event.identifirer]; 324 | } 325 | return [eventLists copy]; 326 | } 327 | 328 | -(void)dealloc { 329 | [self invalidate]; 330 | } 331 | 332 | @end 333 | -------------------------------------------------------------------------------- /GlobalTimer/Classes/GlobalTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalTimer.h 3 | // GlobalTimer 4 | // 5 | // Created by Steve on 25/01/2018. 6 | // 7 | 8 | #import "GTimer.h" 9 | 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 wangchengqvan@gmail.com 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GlobalTimer 2 | 3 | [![CI Status](http://img.shields.io/travis/wangchengqvan@gmail.com/GlobalTimer.svg?style=flat)](https://travis-ci.org/wangchengqvan@gmail.com/GlobalTimer) 4 | [![Version](https://img.shields.io/cocoapods/v/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer) 5 | [![License](https://img.shields.io/cocoapods/l/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer) 6 | [![Platform](https://img.shields.io/cocoapods/p/GlobalTimer.svg?style=flat)](http://cocoapods.org/pods/GlobalTimer) 7 | 8 | ![images](https://user-images.githubusercontent.com/8440220/35437284-a5b4d8e6-02cc-11e8-92c3-d349a60a0e5e.jpeg) 9 | 10 | ## Example 11 | 12 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 13 | 14 | ## Requirements 15 | * Xcode 16 | * Objective-C 17 | 18 | ## Features 19 | 20 | - [x] start a loop with an event. 21 | - [x] pause a specific loop. 22 | - [x] active a specific loop. 23 | - [x] remove a specific loop. 24 | - [x] update a loop with a new interval 25 | 26 | ## Installation 27 | 28 | GlobalTimer is available through [CocoaPods](http://cocoapods.org). To install 29 | it, simply add the following line to your Podfile: 30 | 31 | ```ruby 32 | pod 'GlobalTimer' 33 | ``` 34 | 35 | ## Api 36 | ```Objective-C 37 | + (instancetype _Nonnull )shared; 38 | 39 | - (void)scheduledWith: (NSString * _Nonnull )identifirer timeInterval: (NSTimeInterval)interval repeat:(BOOL)repeat block:(GTBlock _Nonnull )block userinfo:(NSDictionary * _Nullable)userinfo; 40 | 41 | - (void)updateEventWith: (NSString * _Nonnull )identifirer timeInterval: (NSTimeInterval)interval repeat:(BOOL)repeat block:(GTBlock _Nonnull )block userinfo:(NSDictionary * _Nullable)userinfo; 42 | 43 | - (void)pauseEventWith: (NSString *_Nonnull)identifirer; 44 | 45 | - (void)removeEventWith: (NSString *_Nonnull)identifirer; 46 | 47 | - (void)activeEventWith:(NSString *_Nonnull)identifirer; 48 | 49 | - (NSArray *_Nonnull)eventList; 50 | ``` 51 | 52 | ## :book: Usage 53 | 54 | ```Objective-C 55 | [[GTimer shared] scheduledWith:@"first" timeInterval:2 repeat:YES block:^(NSDictionary *userinfo) { 56 | NSLog(@"🇺🇸%@", userinfo[@"test"]); 57 | } userinfo:@{@"test": @"ok"}]; 58 | 59 | [[GTimer shared] scheduledWith:@"second" timeInterval:5 repeat:YES block:^(NSDictionary *userinfo) { 60 | NSLog(@"🌺%@", userinfo[@"cnkcq"]); 61 | } userinfo:@{@"cnkcq": @"king"}]; 62 | [[GTimer shared] scheduledWith:@"dog" timeInterval:5 repeat:YES block:^(NSDictionary *userinfo) { 63 | NSLog(@"🐶%@", userinfo[@"dog"]); 64 | } userinfo:@{@"dog": @"旺财"}]; 65 | [[GTimer shared] scheduledWith:@"fourth" timeInterval:10 repeat:YES block:^(NSDictionary *userinfo) { 66 | NSLog(@"🐱%@", userinfo[@"cat"]); 67 | } userinfo:@{@"cat": @"咪咪"}]; 68 | 69 | ``` 70 | 71 | ```Objective-C 72 | [[GTimer shared] pauseEventWith:@"dog"]; 73 | NSLog(@"%@", [[GTimer shared] eventList]); 74 | [[GTimer shared] activeEventWith:@"dog"]; 75 | [[GTimer shared] removeEventWith:@"fourth"]; 76 | ``` 77 | ## Reprensent 78 | ![ti](https://user-images.githubusercontent.com/8440220/35437059-c17cdb56-02cb-11e8-9a3c-b3a5cec90be8.jpg) 79 | ## Author 80 | 81 | wangchengqvan@gmail.com, chengquan.wang@ele.me 82 | 83 | ## License 84 | 85 | GlobalTimer is available under the MIT license. See the LICENSE file for more info. 86 | 87 | 88 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | > ℹ Please fill out this template when filing an issue. 2 | > All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info. 3 | > 4 | > bugs and feature requests, not general support. 5 | > 6 | > Please remove this line and everything above it before submitting. 7 | 8 | * [ ] I've read, understood, and done my best to follow the steps. 9 | 10 | ## What did you do? 11 | 12 | ℹ Please replace this with what you did. 13 | 14 | ## What did you expect to happen? 15 | 16 | ℹ Please replace this with what you expected to happen. 17 | 18 | ## What happened instead? 19 | 20 | ℹ Please replace this with of what happened instead. 21 | 22 | ## GlobalTimer Environment 23 | 24 | **GlobalTimer version:** 25 | **Xcode version:** 26 | **Platform(s) running GlobalTimer:** 27 | **macOS version running Xcode:** 28 | 29 | ## Demo Project 30 | 31 | ℹ Please link to or upload a project we can download that reproduces the issue. 32 | 33 | 34 | 35 | --------------------------------------------------------------------------------