├── .gitignore ├── .swift-version ├── ActivityRings.podspec ├── ActivityRings.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── ActivityRings iOS.xcscheme │ ├── ActivityRings macOS.xcscheme │ ├── ActivityRings tvOS.xcscheme │ └── ActivityRings watchOS.xcscheme ├── CHANGELOG.md ├── Examples ├── iOS Example │ ├── ActivityRings iOS Example.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── ActivityRings iOS Example.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Sources │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-1024.png │ │ │ │ ├── Icon-20@2x.png │ │ │ │ ├── Icon-20@3x.png │ │ │ │ ├── Icon-29@2x.png │ │ │ │ ├── Icon-29@3x.png │ │ │ │ ├── Icon-40@2x.png │ │ │ │ ├── Icon-40@3x.png │ │ │ │ ├── Icon-60@2x.png │ │ │ │ └── Icon-60@3x.png │ │ ├── Base.lproj │ │ │ └── LaunchScreen.storyboard │ │ ├── Supporting Files │ │ │ └── Info.plist │ │ └── ViewController.swift │ ├── Supporting Files │ │ └── Activity Rings.sketch │ └── Tests │ │ ├── ActivityRingsExampleUITests.swift │ │ └── Supporting Files │ │ └── Info.plist ├── macOS Example │ ├── ActivityRings macOS Example.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── ActivityRings macOS Example.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Sources │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-128@1x.png │ │ │ │ ├── Icon-128@2x.png │ │ │ │ ├── Icon-16@1x.png │ │ │ │ ├── Icon-16@2x.png │ │ │ │ ├── Icon-256@1x.png │ │ │ │ ├── Icon-256@2x.png │ │ │ │ ├── Icon-32@1x.png │ │ │ │ ├── Icon-32@2x.png │ │ │ │ ├── Icon-512@1x.png │ │ │ │ └── Icon-512@2x.png │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ ├── Supporting Files │ │ │ ├── ActivityRings_macOS_Example.entitlements │ │ │ └── Info.plist │ │ └── ViewController.swift │ ├── Supporting Files │ │ └── Activity Rings.sketch │ └── Tests │ │ ├── ActivityRings_macOS_ExampleUITests.swift │ │ └── Supporting Files │ │ └── Info.plist ├── tvOS Example │ ├── ActivityRings tvOS Example.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── ActivityRings tvOS Example.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Sources │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── App Icon & Top Shelf Image.brandassets │ │ │ │ ├── App Icon - App Store.imagestack │ │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── App Icon.imagestack │ │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ │ ├── Icon-Background@1x.png │ │ │ │ │ │ │ └── Icon-Background@2x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ │ ├── Icon-Foreground@1x.png │ │ │ │ │ │ │ └── Icon-Foreground@2x.png │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Top Shelf Image Wide.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── Top Shelf Image.imageset │ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── LaunchImage.launchimage │ │ │ │ └── Contents.json │ │ ├── Supporting Files │ │ │ └── Info.plist │ │ └── ViewController.swift │ ├── Supporting Files │ │ └── Activity Rings.sketch │ └── Tests │ │ ├── ActivityRingsExampleUITests.swift │ │ └── Supporting Files │ │ └── Info.plist └── watchOS Example │ ├── Activity Rings watchOS Example.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ ├── ActivityRings watchOS Example WatchKit App │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ └── Interface.storyboard │ └── Info.plist │ ├── ActivityRings watchOS Example WatchKit Extension │ ├── Assets.xcassets │ │ ├── Complication.complicationset │ │ │ ├── Circular.imageset │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Extra Large.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Bezel.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Circular.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Corner.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Large Rectangular.imageset │ │ │ │ └── Contents.json │ │ │ ├── Modular.imageset │ │ │ │ └── Contents.json │ │ │ └── Utilitarian.imageset │ │ │ │ └── Contents.json │ │ └── Contents.json │ ├── ExtensionDelegate.swift │ ├── Info.plist │ └── InterfaceController.swift │ ├── ActivityRings watchOS Example.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── ActivityRings watchOS Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── LICENSE.md ├── README.md ├── Resources └── demo.gif ├── Sources ├── Shared │ ├── ActivityRingScene.swift │ ├── ActivityRingView.swift │ ├── Animator │ │ ├── Animatable.swift │ │ ├── Animator.swift │ │ └── Double+Animatable.swift │ └── Typealias.swift ├── Supporting Files │ ├── ActivityRings.h │ ├── Info-tvOS.plist │ └── Info.plist ├── iOS │ └── UIColor+RGBA.swift ├── macOS │ ├── NSBezierPath+CGPath.swift │ ├── NSBezierPath+InitWithArc.swift │ └── NSColor+RGBA.swift └── watchOS │ └── CACurrentMediaTime.swift └── Tests ├── ActivityRingsTests.swift ├── AnimatorTests.swift └── Supporting Files ├── Info-tvOS.plist └── Info.plist /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore pods from example app 2 | Example/Pods/ 3 | 4 | ## OS X Finder 5 | .DS_Store 6 | 7 | ## Build generated 8 | build/ 9 | DerivedData 10 | 11 | ## Various settings 12 | *.pbxuser 13 | !default.pbxuser 14 | *.mode1v3 15 | !default.mode1v3 16 | *.mode2v3 17 | !default.mode2v3 18 | *.perspectivev3 19 | !default.perspectivev3 20 | xcuserdata 21 | 22 | ## Other 23 | *.xccheckout 24 | *.moved-aside 25 | *.xcuserstate 26 | *.xcscmblueprint 27 | 28 | ## Obj-C/Swift specific 29 | *.hmap 30 | *.ipa 31 | 32 | ## Playgrounds 33 | timeline.xctimeline 34 | playground.xcworkspace 35 | 36 | # Swift Package Manager 37 | # 38 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 39 | # Packages/ 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | Pods/ 48 | 49 | # Carthage 50 | # 51 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 52 | Carthage/ 53 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.2 2 | -------------------------------------------------------------------------------- /ActivityRings.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | 3 | spec.name = 'ActivityRings' 4 | spec.version = '2.0.1' 5 | spec.summary = 'An attempt to recreate the ring controls in Apple’s Activity app' 6 | spec.description = <<-DESC 7 | ActivityRings is an attempt to recreate the ring controls used in Apple’s iOS and watchOS Activity app 8 | DESC 9 | spec.homepage = 'https://github.com/HarshilShah/ActivityRings' 10 | spec.license = { type: 'MIT', file: 'LICENSE.md' } 11 | spec.author = { 'Harshil Shah' => 'harshilshah1910@me.com' } 12 | spec.social_media_url = 'https://twitter.com/HarshilShah1910' 13 | 14 | spec.source = { git: 'https://github.com/HarshilShah/ActivityRings.git', tag: spec.version.to_s } 15 | spec.frameworks = 'SpriteKit' 16 | 17 | spec.source_files = 'Sources/Shared/**/*.swift', 'Sources/Supporting\ Files/ActivityRings.h' 18 | spec.ios.source_files = 'Sources/iOS/**/*.swift' 19 | spec.osx.source_files = 'Sources/macOS/**/*.swift' 20 | spec.tvos.source_files = 'Sources/iOS/**/*.swift' 21 | spec.watchos.source_files = 'Sources/iOS/**/*.swift', 'Sources/watchOS/**/*.swift' 22 | 23 | spec.ios.deployment_target = '8.0' 24 | spec.osx.deployment_target = '10.10' 25 | spec.tvos.deployment_target = '9.0' 26 | spec.watchos.deployment_target = '4.0' 27 | 28 | spec.ios.pod_target_xcconfig = { 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'SKVIEW_AVAILABLE $(inherited)' } 29 | spec.osx.pod_target_xcconfig = { 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'SKVIEW_AVAILABLE $(inherited)' } 30 | spec.tvos.pod_target_xcconfig = { 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'SKVIEW_AVAILABLE $(inherited)' } 31 | 32 | end 33 | -------------------------------------------------------------------------------- /ActivityRings.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ActivityRings.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ActivityRings.xcodeproj/xcshareddata/xcschemes/ActivityRings iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /ActivityRings.xcodeproj/xcshareddata/xcschemes/ActivityRings macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /ActivityRings.xcodeproj/xcshareddata/xcschemes/ActivityRings tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /ActivityRings.xcodeproj/xcshareddata/xcschemes/ActivityRings watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Changelog 2 | 3 | ## 2.0.1 Release notes (26/10/2018) 4 | ---- 5 | 6 | - Fixed some antialiasing issues 7 | - Fixed a bug where ActivityRingView wasn’t visible on available platforms 8 | 9 | ## 2.0.0 Release notes (17/10/2018) 10 | ---- 11 | 12 | - Updated for Swift 4.2 13 | - Adds support for watchOS 14 | 15 | ## 1.1.0 Release notes (2/11/2017) 16 | ---- 17 | 18 | - Adds support for macOS and tvOS 19 | 20 | ## 1.0.0 Release notes (18/10/2017) 21 | ---- 22 | 23 | - Initial release 24 | -------------------------------------------------------------------------------- /Examples/iOS Example/ActivityRings iOS Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 287D0A721C4B7877004566D6 /* ActivityRingsExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 287D0A711C4B7877004566D6 /* ActivityRingsExampleUITests.swift */; }; 11 | 28F828D01C4B714D00330CF4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28F828CF1C4B714D00330CF4 /* AppDelegate.swift */; }; 12 | 28F828D21C4B714D00330CF4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28F828D11C4B714D00330CF4 /* ViewController.swift */; }; 13 | 28F828D71C4B714D00330CF4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 28F828D61C4B714D00330CF4 /* Assets.xcassets */; }; 14 | 28F828DA1C4B714D00330CF4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 28F828D81C4B714D00330CF4 /* LaunchScreen.storyboard */; }; 15 | E818F2401F9265F700525BB6 /* ActivityRings.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E818F2411F9265F700525BB6 /* ActivityRings.framework */; }; 16 | E818F2421F9265FD00525BB6 /* ActivityRings.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E818F2411F9265F700525BB6 /* ActivityRings.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | E842521F1F93C53B009B36BA /* Activity Rings.sketch in Resources */ = {isa = PBXBuildFile; fileRef = E842521E1F93C53B009B36BA /* Activity Rings.sketch */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 28F828E11C4B714D00330CF4 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 28F828C41C4B714D00330CF4 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 28F828CB1C4B714D00330CF4; 26 | remoteInfo = ActivityRingsExample; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXCopyFilesBuildPhase section */ 31 | 287D0A811C4B7B55004566D6 /* Embed Frameworks */ = { 32 | isa = PBXCopyFilesBuildPhase; 33 | buildActionMask = 2147483647; 34 | dstPath = ""; 35 | dstSubfolderSpec = 10; 36 | files = ( 37 | E818F2421F9265FD00525BB6 /* ActivityRings.framework in Embed Frameworks */, 38 | ); 39 | name = "Embed Frameworks"; 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 287D0A711C4B7877004566D6 /* ActivityRingsExampleUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityRingsExampleUITests.swift; sourceTree = ""; }; 46 | 28F828CC1C4B714D00330CF4 /* ActivityRings iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ActivityRings iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 28F828CF1C4B714D00330CF4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 48 | 28F828D11C4B714D00330CF4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 49 | 28F828D61C4B714D00330CF4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | 28F828D91C4B714D00330CF4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 28F828DB1C4B714D00330CF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 28F828E01C4B714D00330CF4 /* ActivityRings iOS ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ActivityRings iOS ExampleUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 28F828E61C4B714D00330CF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | E818F2411F9265F700525BB6 /* ActivityRings.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ActivityRings.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | E842521E1F93C53B009B36BA /* Activity Rings.sketch */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Activity Rings.sketch"; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 28F828C91C4B714D00330CF4 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | E818F2401F9265F700525BB6 /* ActivityRings.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 28F828DD1C4B714D00330CF4 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 28F828C31C4B714D00330CF4 = { 78 | isa = PBXGroup; 79 | children = ( 80 | E84252201F93C549009B36BA /* Supporting Files */, 81 | 28F828CE1C4B714D00330CF4 /* Sources */, 82 | 28F828E31C4B714D00330CF4 /* Tests */, 83 | 28F828CD1C4B714D00330CF4 /* Products */, 84 | E818F2391F9265BC00525BB6 /* Frameworks */, 85 | ); 86 | sourceTree = ""; 87 | }; 88 | 28F828CD1C4B714D00330CF4 /* Products */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 28F828CC1C4B714D00330CF4 /* ActivityRings iOS Example.app */, 92 | 28F828E01C4B714D00330CF4 /* ActivityRings iOS ExampleUITests.xctest */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | 28F828CE1C4B714D00330CF4 /* Sources */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 28F828CF1C4B714D00330CF4 /* AppDelegate.swift */, 101 | 28F828D11C4B714D00330CF4 /* ViewController.swift */, 102 | 28F828D61C4B714D00330CF4 /* Assets.xcassets */, 103 | 28F828D81C4B714D00330CF4 /* LaunchScreen.storyboard */, 104 | E818F2371F9264F900525BB6 /* Supporting Files */, 105 | ); 106 | path = Sources; 107 | sourceTree = ""; 108 | }; 109 | 28F828E31C4B714D00330CF4 /* Tests */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 287D0A711C4B7877004566D6 /* ActivityRingsExampleUITests.swift */, 113 | E818F2381F92650100525BB6 /* Supporting Files */, 114 | ); 115 | path = Tests; 116 | sourceTree = ""; 117 | }; 118 | E818F2371F9264F900525BB6 /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 28F828DB1C4B714D00330CF4 /* Info.plist */, 122 | ); 123 | path = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | E818F2381F92650100525BB6 /* Supporting Files */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 28F828E61C4B714D00330CF4 /* Info.plist */, 130 | ); 131 | path = "Supporting Files"; 132 | sourceTree = ""; 133 | }; 134 | E818F2391F9265BC00525BB6 /* Frameworks */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | E818F2411F9265F700525BB6 /* ActivityRings.framework */, 138 | ); 139 | name = Frameworks; 140 | sourceTree = ""; 141 | }; 142 | E84252201F93C549009B36BA /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | E842521E1F93C53B009B36BA /* Activity Rings.sketch */, 146 | ); 147 | path = "Supporting Files"; 148 | sourceTree = ""; 149 | }; 150 | /* End PBXGroup section */ 151 | 152 | /* Begin PBXNativeTarget section */ 153 | 28F828CB1C4B714D00330CF4 /* ActivityRings iOS Example */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 28F828E91C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "ActivityRings iOS Example" */; 156 | buildPhases = ( 157 | 28F828C81C4B714D00330CF4 /* Sources */, 158 | 28F828C91C4B714D00330CF4 /* Frameworks */, 159 | 28F828CA1C4B714D00330CF4 /* Resources */, 160 | 287D0A811C4B7B55004566D6 /* Embed Frameworks */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | ); 166 | name = "ActivityRings iOS Example"; 167 | productName = ActivityRingsExample; 168 | productReference = 28F828CC1C4B714D00330CF4 /* ActivityRings iOS Example.app */; 169 | productType = "com.apple.product-type.application"; 170 | }; 171 | 28F828DF1C4B714D00330CF4 /* ActivityRings iOS ExampleUITests */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = 28F828EC1C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "ActivityRings iOS ExampleUITests" */; 174 | buildPhases = ( 175 | 28F828DC1C4B714D00330CF4 /* Sources */, 176 | 28F828DD1C4B714D00330CF4 /* Frameworks */, 177 | 28F828DE1C4B714D00330CF4 /* Resources */, 178 | ); 179 | buildRules = ( 180 | ); 181 | dependencies = ( 182 | 28F828E21C4B714D00330CF4 /* PBXTargetDependency */, 183 | ); 184 | name = "ActivityRings iOS ExampleUITests"; 185 | productName = ActivityRingsExampleUITests; 186 | productReference = 28F828E01C4B714D00330CF4 /* ActivityRings iOS ExampleUITests.xctest */; 187 | productType = "com.apple.product-type.bundle.ui-testing"; 188 | }; 189 | /* End PBXNativeTarget section */ 190 | 191 | /* Begin PBXProject section */ 192 | 28F828C41C4B714D00330CF4 /* Project object */ = { 193 | isa = PBXProject; 194 | attributes = { 195 | LastSwiftUpdateCheck = 0720; 196 | LastUpgradeCheck = 0910; 197 | ORGANIZATIONNAME = "Harshil Shah"; 198 | TargetAttributes = { 199 | 28F828CB1C4B714D00330CF4 = { 200 | CreatedOnToolsVersion = 7.2; 201 | DevelopmentTeam = BM5Y87HJ2F; 202 | LastSwiftMigration = 0910; 203 | }; 204 | 28F828DF1C4B714D00330CF4 = { 205 | CreatedOnToolsVersion = 7.2; 206 | LastSwiftMigration = 0910; 207 | TestTargetID = 28F828CB1C4B714D00330CF4; 208 | }; 209 | }; 210 | }; 211 | buildConfigurationList = 28F828C71C4B714D00330CF4 /* Build configuration list for PBXProject "ActivityRings iOS Example" */; 212 | compatibilityVersion = "Xcode 3.2"; 213 | developmentRegion = English; 214 | hasScannedForEncodings = 0; 215 | knownRegions = ( 216 | en, 217 | Base, 218 | ); 219 | mainGroup = 28F828C31C4B714D00330CF4; 220 | productRefGroup = 28F828CD1C4B714D00330CF4 /* Products */; 221 | projectDirPath = ""; 222 | projectRoot = ""; 223 | targets = ( 224 | 28F828CB1C4B714D00330CF4 /* ActivityRings iOS Example */, 225 | 28F828DF1C4B714D00330CF4 /* ActivityRings iOS ExampleUITests */, 226 | ); 227 | }; 228 | /* End PBXProject section */ 229 | 230 | /* Begin PBXResourcesBuildPhase section */ 231 | 28F828CA1C4B714D00330CF4 /* Resources */ = { 232 | isa = PBXResourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | 28F828DA1C4B714D00330CF4 /* LaunchScreen.storyboard in Resources */, 236 | 28F828D71C4B714D00330CF4 /* Assets.xcassets in Resources */, 237 | E842521F1F93C53B009B36BA /* Activity Rings.sketch in Resources */, 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | 28F828DE1C4B714D00330CF4 /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | /* End PBXResourcesBuildPhase section */ 249 | 250 | /* Begin PBXSourcesBuildPhase section */ 251 | 28F828C81C4B714D00330CF4 /* Sources */ = { 252 | isa = PBXSourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | 28F828D21C4B714D00330CF4 /* ViewController.swift in Sources */, 256 | 28F828D01C4B714D00330CF4 /* AppDelegate.swift in Sources */, 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | }; 260 | 28F828DC1C4B714D00330CF4 /* Sources */ = { 261 | isa = PBXSourcesBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | 287D0A721C4B7877004566D6 /* ActivityRingsExampleUITests.swift in Sources */, 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | /* End PBXSourcesBuildPhase section */ 269 | 270 | /* Begin PBXTargetDependency section */ 271 | 28F828E21C4B714D00330CF4 /* PBXTargetDependency */ = { 272 | isa = PBXTargetDependency; 273 | target = 28F828CB1C4B714D00330CF4 /* ActivityRings iOS Example */; 274 | targetProxy = 28F828E11C4B714D00330CF4 /* PBXContainerItemProxy */; 275 | }; 276 | /* End PBXTargetDependency section */ 277 | 278 | /* Begin PBXVariantGroup section */ 279 | 28F828D81C4B714D00330CF4 /* LaunchScreen.storyboard */ = { 280 | isa = PBXVariantGroup; 281 | children = ( 282 | 28F828D91C4B714D00330CF4 /* Base */, 283 | ); 284 | name = LaunchScreen.storyboard; 285 | sourceTree = ""; 286 | }; 287 | /* End PBXVariantGroup section */ 288 | 289 | /* Begin XCBuildConfiguration section */ 290 | 28F828E71C4B714D00330CF4 /* Debug */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | ALWAYS_SEARCH_USER_PATHS = NO; 294 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 295 | CLANG_CXX_LIBRARY = "libc++"; 296 | CLANG_ENABLE_MODULES = YES; 297 | CLANG_ENABLE_OBJC_ARC = YES; 298 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 299 | CLANG_WARN_BOOL_CONVERSION = YES; 300 | CLANG_WARN_COMMA = YES; 301 | CLANG_WARN_CONSTANT_CONVERSION = YES; 302 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 303 | CLANG_WARN_EMPTY_BODY = YES; 304 | CLANG_WARN_ENUM_CONVERSION = YES; 305 | CLANG_WARN_INFINITE_RECURSION = YES; 306 | CLANG_WARN_INT_CONVERSION = YES; 307 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 308 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 309 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 310 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 311 | CLANG_WARN_STRICT_PROTOTYPES = YES; 312 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 313 | CLANG_WARN_UNREACHABLE_CODE = YES; 314 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 315 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 316 | COPY_PHASE_STRIP = NO; 317 | DEBUG_INFORMATION_FORMAT = dwarf; 318 | ENABLE_STRICT_OBJC_MSGSEND = YES; 319 | ENABLE_TESTABILITY = YES; 320 | GCC_C_LANGUAGE_STANDARD = gnu99; 321 | GCC_DYNAMIC_NO_PIC = NO; 322 | GCC_NO_COMMON_BLOCKS = YES; 323 | GCC_OPTIMIZATION_LEVEL = 0; 324 | GCC_PREPROCESSOR_DEFINITIONS = ( 325 | "DEBUG=1", 326 | "$(inherited)", 327 | ); 328 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 329 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 330 | GCC_WARN_UNDECLARED_SELECTOR = YES; 331 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 332 | GCC_WARN_UNUSED_FUNCTION = YES; 333 | GCC_WARN_UNUSED_VARIABLE = YES; 334 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 335 | MTL_ENABLE_DEBUG_INFO = YES; 336 | ONLY_ACTIVE_ARCH = YES; 337 | SDKROOT = iphoneos; 338 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 339 | }; 340 | name = Debug; 341 | }; 342 | 28F828E81C4B714D00330CF4 /* Release */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 351 | CLANG_WARN_BOOL_CONVERSION = YES; 352 | CLANG_WARN_COMMA = YES; 353 | CLANG_WARN_CONSTANT_CONVERSION = YES; 354 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 355 | CLANG_WARN_EMPTY_BODY = YES; 356 | CLANG_WARN_ENUM_CONVERSION = YES; 357 | CLANG_WARN_INFINITE_RECURSION = YES; 358 | CLANG_WARN_INT_CONVERSION = YES; 359 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 361 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 362 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 363 | CLANG_WARN_STRICT_PROTOTYPES = YES; 364 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 368 | COPY_PHASE_STRIP = NO; 369 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 370 | ENABLE_NS_ASSERTIONS = NO; 371 | ENABLE_STRICT_OBJC_MSGSEND = YES; 372 | GCC_C_LANGUAGE_STANDARD = gnu99; 373 | GCC_NO_COMMON_BLOCKS = YES; 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 381 | MTL_ENABLE_DEBUG_INFO = NO; 382 | SDKROOT = iphoneos; 383 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 384 | VALIDATE_PRODUCT = YES; 385 | }; 386 | name = Release; 387 | }; 388 | 28F828EA1C4B714D00330CF4 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 392 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 393 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 394 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist"; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 396 | PRODUCT_BUNDLE_IDENTIFIER = com.harshilshah.ActivityRingsExample; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 399 | SWIFT_VERSION = 4.0; 400 | }; 401 | name = Debug; 402 | }; 403 | 28F828EB1C4B714D00330CF4 /* Release */ = { 404 | isa = XCBuildConfiguration; 405 | buildSettings = { 406 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 407 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 408 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 409 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist"; 410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 411 | PRODUCT_BUNDLE_IDENTIFIER = com.harshilshah.ActivityRingsExample; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 414 | SWIFT_VERSION = 4.0; 415 | }; 416 | name = Release; 417 | }; 418 | 28F828ED1C4B714D00330CF4 /* Debug */ = { 419 | isa = XCBuildConfiguration; 420 | buildSettings = { 421 | CLANG_ENABLE_MODULES = YES; 422 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; 423 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 424 | PRODUCT_BUNDLE_IDENTIFIER = com.harshilshah.ActivityRingsExampleUITests; 425 | PRODUCT_NAME = "$(TARGET_NAME)"; 426 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 427 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 428 | SWIFT_VERSION = 4.0; 429 | TEST_TARGET_NAME = ActivityRingsExample; 430 | USES_XCTRUNNER = YES; 431 | }; 432 | name = Debug; 433 | }; 434 | 28F828EE1C4B714D00330CF4 /* Release */ = { 435 | isa = XCBuildConfiguration; 436 | buildSettings = { 437 | CLANG_ENABLE_MODULES = YES; 438 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 440 | PRODUCT_BUNDLE_IDENTIFIER = com.harshilshah.ActivityRingsExampleUITests; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 443 | SWIFT_VERSION = 4.0; 444 | TEST_TARGET_NAME = Example; 445 | USES_XCTRUNNER = YES; 446 | }; 447 | name = Release; 448 | }; 449 | /* End XCBuildConfiguration section */ 450 | 451 | /* Begin XCConfigurationList section */ 452 | 28F828C71C4B714D00330CF4 /* Build configuration list for PBXProject "ActivityRings iOS Example" */ = { 453 | isa = XCConfigurationList; 454 | buildConfigurations = ( 455 | 28F828E71C4B714D00330CF4 /* Debug */, 456 | 28F828E81C4B714D00330CF4 /* Release */, 457 | ); 458 | defaultConfigurationIsVisible = 0; 459 | defaultConfigurationName = Release; 460 | }; 461 | 28F828E91C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "ActivityRings iOS Example" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 28F828EA1C4B714D00330CF4 /* Debug */, 465 | 28F828EB1C4B714D00330CF4 /* Release */, 466 | ); 467 | defaultConfigurationIsVisible = 0; 468 | defaultConfigurationName = Release; 469 | }; 470 | 28F828EC1C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "ActivityRings iOS ExampleUITests" */ = { 471 | isa = XCConfigurationList; 472 | buildConfigurations = ( 473 | 28F828ED1C4B714D00330CF4 /* Debug */, 474 | 28F828EE1C4B714D00330CF4 /* Release */, 475 | ); 476 | defaultConfigurationIsVisible = 0; 477 | defaultConfigurationName = Release; 478 | }; 479 | /* End XCConfigurationList section */ 480 | }; 481 | rootObject = 28F828C41C4B714D00330CF4 /* Project object */; 482 | } 483 | -------------------------------------------------------------------------------- /Examples/iOS Example/ActivityRings iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/iOS Example/ActivityRings iOS Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/iOS Example/ActivityRings iOS Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/iOS Example/ActivityRings iOS Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ActivityRings iOS Example 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | window = UIWindow(frame: UIScreen.main.bounds) 18 | window?.rootViewController = ViewController() 19 | window?.makeKeyAndVisible() 20 | return true 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "1024x1024", 53 | "idiom" : "ios-marketing", 54 | "filename" : "Icon-1024.png", 55 | "scale" : "1x" 56 | } 57 | ], 58 | "info" : { 59 | "version" : 1, 60 | "author" : "xcode" 61 | } 62 | } -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-20@2x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-20@3x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Activity Rings 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 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarStyle 34 | UIStatusBarStyleLightContent 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UIViewControllerBasedStatusBarAppearance 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Examples/iOS Example/Sources/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ActivityRings iOS Example 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ActivityRings 11 | 12 | class ViewController: UIViewController { 13 | 14 | private lazy var activityRingView = ActivityRingView() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | view.backgroundColor = .black 20 | 21 | activityRingView.progress = 0.75 22 | activityRingView.translatesAutoresizingMaskIntoConstraints = false 23 | view.addSubview(activityRingView) 24 | NSLayoutConstraint.activate([ 25 | activityRingView.centerXAnchor.constraint(equalTo: view.centerXAnchor), 26 | activityRingView.centerYAnchor.constraint(equalTo: view.centerYAnchor), 27 | activityRingView.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.9), 28 | activityRingView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.9), 29 | ]) 30 | } 31 | 32 | override func viewDidAppear(_ animated: Bool) { 33 | super.viewDidAppear(animated) 34 | 35 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in 36 | self?.activityRingView.animateProgress(to: 1.5, withDuration: 2) 37 | } 38 | } 39 | 40 | override var preferredStatusBarStyle: UIStatusBarStyle { 41 | return .lightContent 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Examples/iOS Example/Supporting Files/Activity Rings.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/iOS Example/Supporting Files/Activity Rings.sketch -------------------------------------------------------------------------------- /Examples/iOS Example/Tests/ActivityRingsExampleUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityRingsExampleUITests.swift 3 | // ActivityRings iOS ExampleUITests 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ActivityRingsExampleUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Examples/iOS Example/Tests/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Examples/macOS Example/ActivityRings macOS Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E82D7A981FAA3E0800392EE7 /* Activity Rings.sketch in Resources */ = {isa = PBXBuildFile; fileRef = E82D7A971FAA3E0800392EE7 /* Activity Rings.sketch */; }; 11 | E8F5AD711FAA0AED002910E6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8F5AD701FAA0AED002910E6 /* AppDelegate.swift */; }; 12 | E8F5AD731FAA0AED002910E6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8F5AD721FAA0AED002910E6 /* ViewController.swift */; }; 13 | E8F5AD751FAA0AED002910E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E8F5AD741FAA0AED002910E6 /* Assets.xcassets */; }; 14 | E8F5AD781FAA0AED002910E6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E8F5AD761FAA0AED002910E6 /* Main.storyboard */; }; 15 | E8F5AD8F1FAA0AED002910E6 /* ActivityRings_macOS_ExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8F5AD8E1FAA0AED002910E6 /* ActivityRings_macOS_ExampleUITests.swift */; }; 16 | E8F5AD9D1FAA0B83002910E6 /* ActivityRings.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8F5AD9C1FAA0B83002910E6 /* ActivityRings.framework */; }; 17 | E8F5AD9E1FAA0B83002910E6 /* ActivityRings.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E8F5AD9C1FAA0B83002910E6 /* ActivityRings.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | E8F5AD8B1FAA0AED002910E6 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = E8F5AD651FAA0AED002910E6 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = E8F5AD6C1FAA0AED002910E6; 26 | remoteInfo = "ActivityRings macOS Example"; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXCopyFilesBuildPhase section */ 31 | E8F5AD9F1FAA0B83002910E6 /* Embed Frameworks */ = { 32 | isa = PBXCopyFilesBuildPhase; 33 | buildActionMask = 2147483647; 34 | dstPath = ""; 35 | dstSubfolderSpec = 10; 36 | files = ( 37 | E8F5AD9E1FAA0B83002910E6 /* ActivityRings.framework in Embed Frameworks */, 38 | ); 39 | name = "Embed Frameworks"; 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | E82D7A971FAA3E0800392EE7 /* Activity Rings.sketch */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Activity Rings.sketch"; path = "Supporing Files/Activity Rings.sketch"; sourceTree = SOURCE_ROOT; }; 46 | E8F5AD6D1FAA0AED002910E6 /* ActivityRings macOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ActivityRings macOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | E8F5AD701FAA0AED002910E6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 48 | E8F5AD721FAA0AED002910E6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 49 | E8F5AD741FAA0AED002910E6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | E8F5AD771FAA0AED002910E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | E8F5AD791FAA0AED002910E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | E8F5AD7A1FAA0AED002910E6 /* ActivityRings_macOS_Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ActivityRings_macOS_Example.entitlements; sourceTree = ""; }; 53 | E8F5AD8A1FAA0AED002910E6 /* ActivityRings macOS ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ActivityRings macOS ExampleUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | E8F5AD8E1FAA0AED002910E6 /* ActivityRings_macOS_ExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityRings_macOS_ExampleUITests.swift; sourceTree = ""; }; 55 | E8F5AD901FAA0AED002910E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | E8F5AD9C1FAA0B83002910E6 /* ActivityRings.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ActivityRings.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | E8F5AD6A1FAA0AED002910E6 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | E8F5AD9D1FAA0B83002910E6 /* ActivityRings.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | E8F5AD871FAA0AED002910E6 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | E82D7A951FAA3BFE00392EE7 /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | E8F5AD901FAA0AED002910E6 /* Info.plist */, 82 | ); 83 | path = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | E82D7A961FAA3CD800392EE7 /* Supporting Files */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | E8F5AD791FAA0AED002910E6 /* Info.plist */, 90 | E8F5AD7A1FAA0AED002910E6 /* ActivityRings_macOS_Example.entitlements */, 91 | ); 92 | path = "Supporting Files"; 93 | sourceTree = ""; 94 | }; 95 | E82D7A991FAA3E1000392EE7 /* Supporting Files */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | E82D7A971FAA3E0800392EE7 /* Activity Rings.sketch */, 99 | ); 100 | path = "Supporting Files"; 101 | sourceTree = ""; 102 | }; 103 | E8F5AD641FAA0AED002910E6 = { 104 | isa = PBXGroup; 105 | children = ( 106 | E8F5AD9C1FAA0B83002910E6 /* ActivityRings.framework */, 107 | E82D7A991FAA3E1000392EE7 /* Supporting Files */, 108 | E8F5AD6F1FAA0AED002910E6 /* Sources */, 109 | E8F5AD8D1FAA0AED002910E6 /* Tests */, 110 | E8F5AD6E1FAA0AED002910E6 /* Products */, 111 | ); 112 | sourceTree = ""; 113 | }; 114 | E8F5AD6E1FAA0AED002910E6 /* Products */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | E8F5AD6D1FAA0AED002910E6 /* ActivityRings macOS Example.app */, 118 | E8F5AD8A1FAA0AED002910E6 /* ActivityRings macOS ExampleUITests.xctest */, 119 | ); 120 | name = Products; 121 | sourceTree = ""; 122 | }; 123 | E8F5AD6F1FAA0AED002910E6 /* Sources */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | E8F5AD701FAA0AED002910E6 /* AppDelegate.swift */, 127 | E8F5AD721FAA0AED002910E6 /* ViewController.swift */, 128 | E8F5AD741FAA0AED002910E6 /* Assets.xcassets */, 129 | E8F5AD761FAA0AED002910E6 /* Main.storyboard */, 130 | E82D7A961FAA3CD800392EE7 /* Supporting Files */, 131 | ); 132 | path = Sources; 133 | sourceTree = ""; 134 | }; 135 | E8F5AD8D1FAA0AED002910E6 /* Tests */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | E8F5AD8E1FAA0AED002910E6 /* ActivityRings_macOS_ExampleUITests.swift */, 139 | E82D7A951FAA3BFE00392EE7 /* Supporting Files */, 140 | ); 141 | path = Tests; 142 | sourceTree = ""; 143 | }; 144 | /* End PBXGroup section */ 145 | 146 | /* Begin PBXNativeTarget section */ 147 | E8F5AD6C1FAA0AED002910E6 /* ActivityRings macOS Example */ = { 148 | isa = PBXNativeTarget; 149 | buildConfigurationList = E8F5AD931FAA0AED002910E6 /* Build configuration list for PBXNativeTarget "ActivityRings macOS Example" */; 150 | buildPhases = ( 151 | E8F5AD691FAA0AED002910E6 /* Sources */, 152 | E8F5AD6A1FAA0AED002910E6 /* Frameworks */, 153 | E8F5AD6B1FAA0AED002910E6 /* Resources */, 154 | E8F5AD9F1FAA0B83002910E6 /* Embed Frameworks */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | ); 160 | name = "ActivityRings macOS Example"; 161 | productName = "ActivityRings macOS Example"; 162 | productReference = E8F5AD6D1FAA0AED002910E6 /* ActivityRings macOS Example.app */; 163 | productType = "com.apple.product-type.application"; 164 | }; 165 | E8F5AD891FAA0AED002910E6 /* ActivityRings macOS ExampleUITests */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = E8F5AD991FAA0AED002910E6 /* Build configuration list for PBXNativeTarget "ActivityRings macOS ExampleUITests" */; 168 | buildPhases = ( 169 | E8F5AD861FAA0AED002910E6 /* Sources */, 170 | E8F5AD871FAA0AED002910E6 /* Frameworks */, 171 | E8F5AD881FAA0AED002910E6 /* Resources */, 172 | ); 173 | buildRules = ( 174 | ); 175 | dependencies = ( 176 | E8F5AD8C1FAA0AED002910E6 /* PBXTargetDependency */, 177 | ); 178 | name = "ActivityRings macOS ExampleUITests"; 179 | productName = "ActivityRings macOS ExampleUITests"; 180 | productReference = E8F5AD8A1FAA0AED002910E6 /* ActivityRings macOS ExampleUITests.xctest */; 181 | productType = "com.apple.product-type.bundle.ui-testing"; 182 | }; 183 | /* End PBXNativeTarget section */ 184 | 185 | /* Begin PBXProject section */ 186 | E8F5AD651FAA0AED002910E6 /* Project object */ = { 187 | isa = PBXProject; 188 | attributes = { 189 | LastSwiftUpdateCheck = 0910; 190 | LastUpgradeCheck = 0910; 191 | ORGANIZATIONNAME = "Harshil Shah"; 192 | TargetAttributes = { 193 | E8F5AD6C1FAA0AED002910E6 = { 194 | CreatedOnToolsVersion = 9.1; 195 | ProvisioningStyle = Automatic; 196 | }; 197 | E8F5AD891FAA0AED002910E6 = { 198 | CreatedOnToolsVersion = 9.1; 199 | ProvisioningStyle = Automatic; 200 | TestTargetID = E8F5AD6C1FAA0AED002910E6; 201 | }; 202 | }; 203 | }; 204 | buildConfigurationList = E8F5AD681FAA0AED002910E6 /* Build configuration list for PBXProject "ActivityRings macOS Example" */; 205 | compatibilityVersion = "Xcode 8.0"; 206 | developmentRegion = en; 207 | hasScannedForEncodings = 0; 208 | knownRegions = ( 209 | en, 210 | Base, 211 | ); 212 | mainGroup = E8F5AD641FAA0AED002910E6; 213 | productRefGroup = E8F5AD6E1FAA0AED002910E6 /* Products */; 214 | projectDirPath = ""; 215 | projectRoot = ""; 216 | targets = ( 217 | E8F5AD6C1FAA0AED002910E6 /* ActivityRings macOS Example */, 218 | E8F5AD891FAA0AED002910E6 /* ActivityRings macOS ExampleUITests */, 219 | ); 220 | }; 221 | /* End PBXProject section */ 222 | 223 | /* Begin PBXResourcesBuildPhase section */ 224 | E8F5AD6B1FAA0AED002910E6 /* Resources */ = { 225 | isa = PBXResourcesBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | E8F5AD751FAA0AED002910E6 /* Assets.xcassets in Resources */, 229 | E8F5AD781FAA0AED002910E6 /* Main.storyboard in Resources */, 230 | E82D7A981FAA3E0800392EE7 /* Activity Rings.sketch in Resources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | E8F5AD881FAA0AED002910E6 /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | /* End PBXResourcesBuildPhase section */ 242 | 243 | /* Begin PBXSourcesBuildPhase section */ 244 | E8F5AD691FAA0AED002910E6 /* Sources */ = { 245 | isa = PBXSourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | E8F5AD731FAA0AED002910E6 /* ViewController.swift in Sources */, 249 | E8F5AD711FAA0AED002910E6 /* AppDelegate.swift in Sources */, 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | E8F5AD861FAA0AED002910E6 /* Sources */ = { 254 | isa = PBXSourcesBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | E8F5AD8F1FAA0AED002910E6 /* ActivityRings_macOS_ExampleUITests.swift in Sources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | /* End PBXSourcesBuildPhase section */ 262 | 263 | /* Begin PBXTargetDependency section */ 264 | E8F5AD8C1FAA0AED002910E6 /* PBXTargetDependency */ = { 265 | isa = PBXTargetDependency; 266 | target = E8F5AD6C1FAA0AED002910E6 /* ActivityRings macOS Example */; 267 | targetProxy = E8F5AD8B1FAA0AED002910E6 /* PBXContainerItemProxy */; 268 | }; 269 | /* End PBXTargetDependency section */ 270 | 271 | /* Begin PBXVariantGroup section */ 272 | E8F5AD761FAA0AED002910E6 /* Main.storyboard */ = { 273 | isa = PBXVariantGroup; 274 | children = ( 275 | E8F5AD771FAA0AED002910E6 /* Base */, 276 | ); 277 | name = Main.storyboard; 278 | sourceTree = ""; 279 | }; 280 | /* End PBXVariantGroup section */ 281 | 282 | /* Begin XCBuildConfiguration section */ 283 | E8F5AD911FAA0AED002910E6 /* Debug */ = { 284 | isa = XCBuildConfiguration; 285 | buildSettings = { 286 | ALWAYS_SEARCH_USER_PATHS = NO; 287 | CLANG_ANALYZER_NONNULL = YES; 288 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 290 | CLANG_CXX_LIBRARY = "libc++"; 291 | CLANG_ENABLE_MODULES = YES; 292 | CLANG_ENABLE_OBJC_ARC = YES; 293 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_COMMA = YES; 296 | CLANG_WARN_CONSTANT_CONVERSION = YES; 297 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 298 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 299 | CLANG_WARN_EMPTY_BODY = YES; 300 | CLANG_WARN_ENUM_CONVERSION = YES; 301 | CLANG_WARN_INFINITE_RECURSION = YES; 302 | CLANG_WARN_INT_CONVERSION = YES; 303 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 304 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 305 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 306 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 307 | CLANG_WARN_STRICT_PROTOTYPES = YES; 308 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 309 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 310 | CLANG_WARN_UNREACHABLE_CODE = YES; 311 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 312 | CODE_SIGN_IDENTITY = "Mac Developer"; 313 | COPY_PHASE_STRIP = NO; 314 | DEBUG_INFORMATION_FORMAT = dwarf; 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | ENABLE_TESTABILITY = YES; 317 | GCC_C_LANGUAGE_STANDARD = gnu11; 318 | GCC_DYNAMIC_NO_PIC = NO; 319 | GCC_NO_COMMON_BLOCKS = YES; 320 | GCC_OPTIMIZATION_LEVEL = 0; 321 | GCC_PREPROCESSOR_DEFINITIONS = ( 322 | "DEBUG=1", 323 | "$(inherited)", 324 | ); 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 327 | GCC_WARN_UNDECLARED_SELECTOR = YES; 328 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 329 | GCC_WARN_UNUSED_FUNCTION = YES; 330 | GCC_WARN_UNUSED_VARIABLE = YES; 331 | MACOSX_DEPLOYMENT_TARGET = 10.13; 332 | MTL_ENABLE_DEBUG_INFO = YES; 333 | ONLY_ACTIVE_ARCH = YES; 334 | SDKROOT = macosx; 335 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 336 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 337 | }; 338 | name = Debug; 339 | }; 340 | E8F5AD921FAA0AED002910E6 /* Release */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | ALWAYS_SEARCH_USER_PATHS = NO; 344 | CLANG_ANALYZER_NONNULL = YES; 345 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 351 | CLANG_WARN_BOOL_CONVERSION = YES; 352 | CLANG_WARN_COMMA = YES; 353 | CLANG_WARN_CONSTANT_CONVERSION = YES; 354 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 355 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 356 | CLANG_WARN_EMPTY_BODY = YES; 357 | CLANG_WARN_ENUM_CONVERSION = YES; 358 | CLANG_WARN_INFINITE_RECURSION = YES; 359 | CLANG_WARN_INT_CONVERSION = YES; 360 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 361 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 362 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 363 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 364 | CLANG_WARN_STRICT_PROTOTYPES = YES; 365 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 366 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 367 | CLANG_WARN_UNREACHABLE_CODE = YES; 368 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 369 | CODE_SIGN_IDENTITY = "Mac Developer"; 370 | COPY_PHASE_STRIP = NO; 371 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 372 | ENABLE_NS_ASSERTIONS = NO; 373 | ENABLE_STRICT_OBJC_MSGSEND = YES; 374 | GCC_C_LANGUAGE_STANDARD = gnu11; 375 | GCC_NO_COMMON_BLOCKS = YES; 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | MACOSX_DEPLOYMENT_TARGET = 10.13; 383 | MTL_ENABLE_DEBUG_INFO = NO; 384 | SDKROOT = macosx; 385 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 386 | }; 387 | name = Release; 388 | }; 389 | E8F5AD941FAA0AED002910E6 /* Debug */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 393 | CODE_SIGN_ENTITLEMENTS = "Sources/Supporting Files/ActivityRings_macOS_Example.entitlements"; 394 | CODE_SIGN_STYLE = Automatic; 395 | COMBINE_HIDPI_IMAGES = YES; 396 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 397 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist"; 398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 399 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-macOS-Example"; 400 | PRODUCT_NAME = "$(TARGET_NAME)"; 401 | SWIFT_VERSION = 4.0; 402 | }; 403 | name = Debug; 404 | }; 405 | E8F5AD951FAA0AED002910E6 /* Release */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 409 | CODE_SIGN_ENTITLEMENTS = "Sources/Supporting Files/ActivityRings_macOS_Example.entitlements"; 410 | CODE_SIGN_STYLE = Automatic; 411 | COMBINE_HIDPI_IMAGES = YES; 412 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 413 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist"; 414 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 415 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-macOS-Example"; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | SWIFT_VERSION = 4.0; 418 | }; 419 | name = Release; 420 | }; 421 | E8F5AD9A1FAA0AED002910E6 /* Debug */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 425 | CODE_SIGN_STYLE = Automatic; 426 | COMBINE_HIDPI_IMAGES = YES; 427 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 428 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; 429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 430 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-macOS-ExampleUITests"; 431 | PRODUCT_NAME = "$(TARGET_NAME)"; 432 | SWIFT_VERSION = 4.0; 433 | TEST_TARGET_NAME = "ActivityRings macOS Example"; 434 | }; 435 | name = Debug; 436 | }; 437 | E8F5AD9B1FAA0AED002910E6 /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 441 | CODE_SIGN_STYLE = Automatic; 442 | COMBINE_HIDPI_IMAGES = YES; 443 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 444 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; 445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 446 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-macOS-ExampleUITests"; 447 | PRODUCT_NAME = "$(TARGET_NAME)"; 448 | SWIFT_VERSION = 4.0; 449 | TEST_TARGET_NAME = "ActivityRings macOS Example"; 450 | }; 451 | name = Release; 452 | }; 453 | /* End XCBuildConfiguration section */ 454 | 455 | /* Begin XCConfigurationList section */ 456 | E8F5AD681FAA0AED002910E6 /* Build configuration list for PBXProject "ActivityRings macOS Example" */ = { 457 | isa = XCConfigurationList; 458 | buildConfigurations = ( 459 | E8F5AD911FAA0AED002910E6 /* Debug */, 460 | E8F5AD921FAA0AED002910E6 /* Release */, 461 | ); 462 | defaultConfigurationIsVisible = 0; 463 | defaultConfigurationName = Release; 464 | }; 465 | E8F5AD931FAA0AED002910E6 /* Build configuration list for PBXNativeTarget "ActivityRings macOS Example" */ = { 466 | isa = XCConfigurationList; 467 | buildConfigurations = ( 468 | E8F5AD941FAA0AED002910E6 /* Debug */, 469 | E8F5AD951FAA0AED002910E6 /* Release */, 470 | ); 471 | defaultConfigurationIsVisible = 0; 472 | defaultConfigurationName = Release; 473 | }; 474 | E8F5AD991FAA0AED002910E6 /* Build configuration list for PBXNativeTarget "ActivityRings macOS ExampleUITests" */ = { 475 | isa = XCConfigurationList; 476 | buildConfigurations = ( 477 | E8F5AD9A1FAA0AED002910E6 /* Debug */, 478 | E8F5AD9B1FAA0AED002910E6 /* Release */, 479 | ); 480 | defaultConfigurationIsVisible = 0; 481 | defaultConfigurationName = Release; 482 | }; 483 | /* End XCConfigurationList section */ 484 | }; 485 | rootObject = E8F5AD651FAA0AED002910E6 /* Project object */; 486 | } 487 | -------------------------------------------------------------------------------- /Examples/macOS Example/ActivityRings macOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/macOS Example/ActivityRings macOS Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ActivityRings macOS Example 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | func applicationDidFinishLaunching(_ aNotification: Notification) { 15 | // Insert code here to initialize your application 16 | } 17 | 18 | func applicationWillTerminate(_ aNotification: Notification) { 19 | // Insert code here to tear down your application 20 | } 21 | 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "Icon-16@1x.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "Icon-16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "Icon-32@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "Icon-32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "Icon-128@1x.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "Icon-128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "Icon-256@1x.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "Icon-256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "Icon-512@1x.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "Icon-512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-128@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-128@1x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-128@2x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-16@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-16@1x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-16@2x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-256@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-256@1x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-256@2x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-32@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-32@1x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-32@2x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-512@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-512@1x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Sources/Assets.xcassets/AppIcon.appiconset/Icon-512@2x.png -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Supporting Files/ActivityRings_macOS_Example.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2017 Harshil Shah. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Examples/macOS Example/Sources/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ActivityRings macOS Example 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import ActivityRings 11 | 12 | class ViewController: NSViewController { 13 | 14 | private lazy var activityRingView = ActivityRingView() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | activityRingView.translatesAutoresizingMaskIntoConstraints = false 20 | view.addSubview(activityRingView) 21 | NSLayoutConstraint.activate([ 22 | activityRingView.centerXAnchor.constraint(equalTo: view.centerXAnchor), 23 | activityRingView.centerYAnchor.constraint(equalTo: view.centerYAnchor), 24 | activityRingView.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.9), 25 | activityRingView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.9), 26 | ]) 27 | } 28 | 29 | override func viewDidAppear() { 30 | super.viewDidAppear() 31 | 32 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in 33 | self?.activityRingView.animateProgress(to: 1, withDuration: 3) 34 | } 35 | } 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /Examples/macOS Example/Supporting Files/Activity Rings.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/macOS Example/Supporting Files/Activity Rings.sketch -------------------------------------------------------------------------------- /Examples/macOS Example/Tests/ActivityRings_macOS_ExampleUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityRingsExampleUITests.swift 3 | // ActivityRings macOS ExampleUITests 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ActivityRingsExampleUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Examples/macOS Example/Tests/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Examples/tvOS Example/ActivityRings tvOS Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E813BA271FAB42A400501DB1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E813BA261FAB42A400501DB1 /* AppDelegate.swift */; }; 11 | E813BA291FAB42A400501DB1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E813BA281FAB42A400501DB1 /* ViewController.swift */; }; 12 | E813BA2E1FAB42A400501DB1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E813BA2D1FAB42A400501DB1 /* Assets.xcassets */; }; 13 | E813BA441FAB42A400501DB1 /* ActivityRingsExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E813BA431FAB42A400501DB1 /* ActivityRingsExampleUITests.swift */; }; 14 | E86A02DE1FAB44E50043C23E /* ActivityRings.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E86A02DD1FAB44E50043C23E /* ActivityRings.framework */; }; 15 | E86A02DF1FAB44E50043C23E /* ActivityRings.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E86A02DD1FAB44E50043C23E /* ActivityRings.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | E87CC4211FAB4DF800DB65E7 /* Activity Rings.sketch in Resources */ = {isa = PBXBuildFile; fileRef = E87CC4201FAB4DF800DB65E7 /* Activity Rings.sketch */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | E813BA401FAB42A400501DB1 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = E813BA1B1FAB42A400501DB1 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = E813BA221FAB42A400501DB1; 25 | remoteInfo = "ActivityRings tvOS Example"; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXCopyFilesBuildPhase section */ 30 | E86A02E01FAB44E50043C23E /* Embed Frameworks */ = { 31 | isa = PBXCopyFilesBuildPhase; 32 | buildActionMask = 2147483647; 33 | dstPath = ""; 34 | dstSubfolderSpec = 10; 35 | files = ( 36 | E86A02DF1FAB44E50043C23E /* ActivityRings.framework in Embed Frameworks */, 37 | ); 38 | name = "Embed Frameworks"; 39 | runOnlyForDeploymentPostprocessing = 0; 40 | }; 41 | /* End PBXCopyFilesBuildPhase section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | E813BA231FAB42A400501DB1 /* ActivityRings tvOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ActivityRings tvOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | E813BA261FAB42A400501DB1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 46 | E813BA281FAB42A400501DB1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 47 | E813BA2D1FAB42A400501DB1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 48 | E813BA2F1FAB42A400501DB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | E813BA3F1FAB42A400501DB1 /* ActivityRings tvOS ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ActivityRings tvOS ExampleUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | E813BA431FAB42A400501DB1 /* ActivityRingsExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityRingsExampleUITests.swift; sourceTree = ""; }; 51 | E813BA451FAB42A400501DB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | E86A02DD1FAB44E50043C23E /* ActivityRings.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ActivityRings.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | E87CC4201FAB4DF800DB65E7 /* Activity Rings.sketch */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Activity Rings.sketch"; path = "Supporting Files/Activity Rings.sketch"; sourceTree = SOURCE_ROOT; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | E813BA201FAB42A400501DB1 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | E86A02DE1FAB44E50043C23E /* ActivityRings.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | E813BA3C1FAB42A400501DB1 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | E813BA1A1FAB42A400501DB1 = { 76 | isa = PBXGroup; 77 | children = ( 78 | E86A02DD1FAB44E50043C23E /* ActivityRings.framework */, 79 | E87CC4221FAB4DFF00DB65E7 /* Supporting Files */, 80 | E813BA251FAB42A400501DB1 /* Sources */, 81 | E813BA421FAB42A400501DB1 /* Tests */, 82 | E813BA241FAB42A400501DB1 /* Products */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | E813BA241FAB42A400501DB1 /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | E813BA231FAB42A400501DB1 /* ActivityRings tvOS Example.app */, 90 | E813BA3F1FAB42A400501DB1 /* ActivityRings tvOS ExampleUITests.xctest */, 91 | ); 92 | name = Products; 93 | sourceTree = ""; 94 | }; 95 | E813BA251FAB42A400501DB1 /* Sources */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | E813BA261FAB42A400501DB1 /* AppDelegate.swift */, 99 | E813BA281FAB42A400501DB1 /* ViewController.swift */, 100 | E813BA2D1FAB42A400501DB1 /* Assets.xcassets */, 101 | E86A02DB1FAB44360043C23E /* Supporting Files */, 102 | ); 103 | path = Sources; 104 | sourceTree = ""; 105 | }; 106 | E813BA421FAB42A400501DB1 /* Tests */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | E813BA431FAB42A400501DB1 /* ActivityRingsExampleUITests.swift */, 110 | E86A02DC1FAB443E0043C23E /* Supporting Files */, 111 | ); 112 | path = Tests; 113 | sourceTree = ""; 114 | }; 115 | E86A02DB1FAB44360043C23E /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | E813BA2F1FAB42A400501DB1 /* Info.plist */, 119 | ); 120 | path = "Supporting Files"; 121 | sourceTree = ""; 122 | }; 123 | E86A02DC1FAB443E0043C23E /* Supporting Files */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | E813BA451FAB42A400501DB1 /* Info.plist */, 127 | ); 128 | path = "Supporting Files"; 129 | sourceTree = ""; 130 | }; 131 | E87CC4221FAB4DFF00DB65E7 /* Supporting Files */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | E87CC4201FAB4DF800DB65E7 /* Activity Rings.sketch */, 135 | ); 136 | path = "Supporting Files"; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | E813BA221FAB42A400501DB1 /* ActivityRings tvOS Example */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = E813BA481FAB42A400501DB1 /* Build configuration list for PBXNativeTarget "ActivityRings tvOS Example" */; 145 | buildPhases = ( 146 | E813BA1F1FAB42A400501DB1 /* Sources */, 147 | E813BA201FAB42A400501DB1 /* Frameworks */, 148 | E813BA211FAB42A400501DB1 /* Resources */, 149 | E86A02E01FAB44E50043C23E /* Embed Frameworks */, 150 | ); 151 | buildRules = ( 152 | ); 153 | dependencies = ( 154 | ); 155 | name = "ActivityRings tvOS Example"; 156 | productName = "ActivityRings tvOS Example"; 157 | productReference = E813BA231FAB42A400501DB1 /* ActivityRings tvOS Example.app */; 158 | productType = "com.apple.product-type.application"; 159 | }; 160 | E813BA3E1FAB42A400501DB1 /* ActivityRings tvOS ExampleUITests */ = { 161 | isa = PBXNativeTarget; 162 | buildConfigurationList = E813BA4E1FAB42A400501DB1 /* Build configuration list for PBXNativeTarget "ActivityRings tvOS ExampleUITests" */; 163 | buildPhases = ( 164 | E813BA3B1FAB42A400501DB1 /* Sources */, 165 | E813BA3C1FAB42A400501DB1 /* Frameworks */, 166 | E813BA3D1FAB42A400501DB1 /* Resources */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | E813BA411FAB42A400501DB1 /* PBXTargetDependency */, 172 | ); 173 | name = "ActivityRings tvOS ExampleUITests"; 174 | productName = "ActivityRings tvOS ExampleUITests"; 175 | productReference = E813BA3F1FAB42A400501DB1 /* ActivityRings tvOS ExampleUITests.xctest */; 176 | productType = "com.apple.product-type.bundle.ui-testing"; 177 | }; 178 | /* End PBXNativeTarget section */ 179 | 180 | /* Begin PBXProject section */ 181 | E813BA1B1FAB42A400501DB1 /* Project object */ = { 182 | isa = PBXProject; 183 | attributes = { 184 | LastSwiftUpdateCheck = 0910; 185 | LastUpgradeCheck = 0910; 186 | ORGANIZATIONNAME = "Harshil Shah"; 187 | TargetAttributes = { 188 | E813BA221FAB42A400501DB1 = { 189 | CreatedOnToolsVersion = 9.1; 190 | ProvisioningStyle = Automatic; 191 | }; 192 | E813BA3E1FAB42A400501DB1 = { 193 | CreatedOnToolsVersion = 9.1; 194 | ProvisioningStyle = Automatic; 195 | TestTargetID = E813BA221FAB42A400501DB1; 196 | }; 197 | }; 198 | }; 199 | buildConfigurationList = E813BA1E1FAB42A400501DB1 /* Build configuration list for PBXProject "ActivityRings tvOS Example" */; 200 | compatibilityVersion = "Xcode 8.0"; 201 | developmentRegion = en; 202 | hasScannedForEncodings = 0; 203 | knownRegions = ( 204 | en, 205 | Base, 206 | ); 207 | mainGroup = E813BA1A1FAB42A400501DB1; 208 | productRefGroup = E813BA241FAB42A400501DB1 /* Products */; 209 | projectDirPath = ""; 210 | projectRoot = ""; 211 | targets = ( 212 | E813BA221FAB42A400501DB1 /* ActivityRings tvOS Example */, 213 | E813BA3E1FAB42A400501DB1 /* ActivityRings tvOS ExampleUITests */, 214 | ); 215 | }; 216 | /* End PBXProject section */ 217 | 218 | /* Begin PBXResourcesBuildPhase section */ 219 | E813BA211FAB42A400501DB1 /* Resources */ = { 220 | isa = PBXResourcesBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | E813BA2E1FAB42A400501DB1 /* Assets.xcassets in Resources */, 224 | E87CC4211FAB4DF800DB65E7 /* Activity Rings.sketch in Resources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | E813BA3D1FAB42A400501DB1 /* Resources */ = { 229 | isa = PBXResourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | }; 235 | /* End PBXResourcesBuildPhase section */ 236 | 237 | /* Begin PBXSourcesBuildPhase section */ 238 | E813BA1F1FAB42A400501DB1 /* Sources */ = { 239 | isa = PBXSourcesBuildPhase; 240 | buildActionMask = 2147483647; 241 | files = ( 242 | E813BA291FAB42A400501DB1 /* ViewController.swift in Sources */, 243 | E813BA271FAB42A400501DB1 /* AppDelegate.swift in Sources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | E813BA3B1FAB42A400501DB1 /* Sources */ = { 248 | isa = PBXSourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | E813BA441FAB42A400501DB1 /* ActivityRingsExampleUITests.swift in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXSourcesBuildPhase section */ 256 | 257 | /* Begin PBXTargetDependency section */ 258 | E813BA411FAB42A400501DB1 /* PBXTargetDependency */ = { 259 | isa = PBXTargetDependency; 260 | target = E813BA221FAB42A400501DB1 /* ActivityRings tvOS Example */; 261 | targetProxy = E813BA401FAB42A400501DB1 /* PBXContainerItemProxy */; 262 | }; 263 | /* End PBXTargetDependency section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | E813BA461FAB42A400501DB1 /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | ALWAYS_SEARCH_USER_PATHS = NO; 270 | CLANG_ANALYZER_NONNULL = YES; 271 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 282 | CLANG_WARN_EMPTY_BODY = YES; 283 | CLANG_WARN_ENUM_CONVERSION = YES; 284 | CLANG_WARN_INFINITE_RECURSION = YES; 285 | CLANG_WARN_INT_CONVERSION = YES; 286 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 287 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 288 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 289 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 290 | CLANG_WARN_STRICT_PROTOTYPES = YES; 291 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 292 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 293 | CLANG_WARN_UNREACHABLE_CODE = YES; 294 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 295 | COPY_PHASE_STRIP = NO; 296 | DEBUG_INFORMATION_FORMAT = dwarf; 297 | ENABLE_STRICT_OBJC_MSGSEND = YES; 298 | ENABLE_TESTABILITY = YES; 299 | GCC_C_LANGUAGE_STANDARD = gnu11; 300 | GCC_DYNAMIC_NO_PIC = NO; 301 | GCC_NO_COMMON_BLOCKS = YES; 302 | GCC_OPTIMIZATION_LEVEL = 0; 303 | GCC_PREPROCESSOR_DEFINITIONS = ( 304 | "DEBUG=1", 305 | "$(inherited)", 306 | ); 307 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 308 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 309 | GCC_WARN_UNDECLARED_SELECTOR = YES; 310 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 311 | GCC_WARN_UNUSED_FUNCTION = YES; 312 | GCC_WARN_UNUSED_VARIABLE = YES; 313 | MTL_ENABLE_DEBUG_INFO = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = appletvos; 316 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 317 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 318 | TVOS_DEPLOYMENT_TARGET = 11.0; 319 | }; 320 | name = Debug; 321 | }; 322 | E813BA471FAB42A400501DB1 /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | ALWAYS_SEARCH_USER_PATHS = NO; 326 | CLANG_ANALYZER_NONNULL = YES; 327 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 328 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 329 | CLANG_CXX_LIBRARY = "libc++"; 330 | CLANG_ENABLE_MODULES = YES; 331 | CLANG_ENABLE_OBJC_ARC = YES; 332 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 333 | CLANG_WARN_BOOL_CONVERSION = YES; 334 | CLANG_WARN_COMMA = YES; 335 | CLANG_WARN_CONSTANT_CONVERSION = YES; 336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 337 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 338 | CLANG_WARN_EMPTY_BODY = YES; 339 | CLANG_WARN_ENUM_CONVERSION = YES; 340 | CLANG_WARN_INFINITE_RECURSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 343 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 345 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 346 | CLANG_WARN_STRICT_PROTOTYPES = YES; 347 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 348 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 349 | CLANG_WARN_UNREACHABLE_CODE = YES; 350 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 351 | COPY_PHASE_STRIP = NO; 352 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 353 | ENABLE_NS_ASSERTIONS = NO; 354 | ENABLE_STRICT_OBJC_MSGSEND = YES; 355 | GCC_C_LANGUAGE_STANDARD = gnu11; 356 | GCC_NO_COMMON_BLOCKS = YES; 357 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 358 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 359 | GCC_WARN_UNDECLARED_SELECTOR = YES; 360 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 361 | GCC_WARN_UNUSED_FUNCTION = YES; 362 | GCC_WARN_UNUSED_VARIABLE = YES; 363 | MTL_ENABLE_DEBUG_INFO = NO; 364 | SDKROOT = appletvos; 365 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 366 | TVOS_DEPLOYMENT_TARGET = 11.0; 367 | VALIDATE_PRODUCT = YES; 368 | }; 369 | name = Release; 370 | }; 371 | E813BA491FAB42A400501DB1 /* Debug */ = { 372 | isa = XCBuildConfiguration; 373 | buildSettings = { 374 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 375 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 376 | CODE_SIGN_STYLE = Automatic; 377 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 378 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist"; 379 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 380 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-tvOS-Example"; 381 | PRODUCT_NAME = "$(TARGET_NAME)"; 382 | SWIFT_VERSION = 4.0; 383 | TARGETED_DEVICE_FAMILY = 3; 384 | }; 385 | name = Debug; 386 | }; 387 | E813BA4A1FAB42A400501DB1 /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 391 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 392 | CODE_SIGN_STYLE = Automatic; 393 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 394 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist"; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 396 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-tvOS-Example"; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | SWIFT_VERSION = 4.0; 399 | TARGETED_DEVICE_FAMILY = 3; 400 | }; 401 | name = Release; 402 | }; 403 | E813BA4F1FAB42A400501DB1 /* Debug */ = { 404 | isa = XCBuildConfiguration; 405 | buildSettings = { 406 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 407 | CODE_SIGN_STYLE = Automatic; 408 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 409 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; 410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 411 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-tvOS-ExampleUITests"; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | SWIFT_VERSION = 4.0; 414 | TARGETED_DEVICE_FAMILY = 3; 415 | TEST_TARGET_NAME = "ActivityRings tvOS Example"; 416 | }; 417 | name = Debug; 418 | }; 419 | E813BA501FAB42A400501DB1 /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | buildSettings = { 422 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 423 | CODE_SIGN_STYLE = Automatic; 424 | DEVELOPMENT_TEAM = BM5Y87HJ2F; 425 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; 426 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 427 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-tvOS-ExampleUITests"; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | SWIFT_VERSION = 4.0; 430 | TARGETED_DEVICE_FAMILY = 3; 431 | TEST_TARGET_NAME = "ActivityRings tvOS Example"; 432 | }; 433 | name = Release; 434 | }; 435 | /* End XCBuildConfiguration section */ 436 | 437 | /* Begin XCConfigurationList section */ 438 | E813BA1E1FAB42A400501DB1 /* Build configuration list for PBXProject "ActivityRings tvOS Example" */ = { 439 | isa = XCConfigurationList; 440 | buildConfigurations = ( 441 | E813BA461FAB42A400501DB1 /* Debug */, 442 | E813BA471FAB42A400501DB1 /* Release */, 443 | ); 444 | defaultConfigurationIsVisible = 0; 445 | defaultConfigurationName = Release; 446 | }; 447 | E813BA481FAB42A400501DB1 /* Build configuration list for PBXNativeTarget "ActivityRings tvOS Example" */ = { 448 | isa = XCConfigurationList; 449 | buildConfigurations = ( 450 | E813BA491FAB42A400501DB1 /* Debug */, 451 | E813BA4A1FAB42A400501DB1 /* Release */, 452 | ); 453 | defaultConfigurationIsVisible = 0; 454 | defaultConfigurationName = Release; 455 | }; 456 | E813BA4E1FAB42A400501DB1 /* Build configuration list for PBXNativeTarget "ActivityRings tvOS ExampleUITests" */ = { 457 | isa = XCConfigurationList; 458 | buildConfigurations = ( 459 | E813BA4F1FAB42A400501DB1 /* Debug */, 460 | E813BA501FAB42A400501DB1 /* Release */, 461 | ); 462 | defaultConfigurationIsVisible = 0; 463 | defaultConfigurationName = Release; 464 | }; 465 | /* End XCConfigurationList section */ 466 | }; 467 | rootObject = E813BA1B1FAB42A400501DB1 /* Project object */; 468 | } 469 | -------------------------------------------------------------------------------- /Examples/tvOS Example/ActivityRings tvOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/tvOS Example/ActivityRings tvOS Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ActivityRings tvOS Example 4 | // 5 | // Created by Harshil Shah on 02/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | window = UIWindow(frame: UIScreen.main.bounds) 18 | window?.rootViewController = ViewController() 19 | window?.makeKeyAndVisible() 20 | return true 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "Icon-Background@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "tv", 10 | "filename" : "Icon-Background@2x.png", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Icon-Background@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Icon-Background@1x.png -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Icon-Background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Icon-Background@2x.png -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "Icon-Foreground@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "tv", 10 | "filename" : "Icon-Foreground@2x.png", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Icon-Foreground@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Icon-Foreground@1x.png -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Icon-Foreground@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Icon-Foreground@2x.png -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - App Store.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "2320x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image Wide.imageset", 19 | "role" : "top-shelf-image-wide" 20 | }, 21 | { 22 | "size" : "1920x720", 23 | "idiom" : "tv", 24 | "filename" : "Top Shelf Image.imageset", 25 | "role" : "top-shelf-image" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "landscape", 5 | "idiom" : "tv", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "11.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "landscape", 12 | "idiom" : "tv", 13 | "extent" : "full-screen", 14 | "minimum-system-version" : "9.0", 15 | "scale" : "1x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | UIUserInterfaceStyle 28 | Automatic 29 | 30 | 31 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Sources/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ActivityRings tvOS Example 4 | // 5 | // Created by Harshil Shah on 02/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ActivityRings 11 | 12 | class ViewController: UIViewController { 13 | 14 | private lazy var activityRingView = ActivityRingView() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | activityRingView.progress = 0.75 20 | activityRingView.translatesAutoresizingMaskIntoConstraints = false 21 | view.addSubview(activityRingView) 22 | NSLayoutConstraint.activate([ 23 | activityRingView.centerXAnchor.constraint(equalTo: view.centerXAnchor), 24 | activityRingView.centerYAnchor.constraint(equalTo: view.centerYAnchor), 25 | activityRingView.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.75), 26 | activityRingView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.75), 27 | ]) 28 | } 29 | 30 | override func viewDidAppear(_ animated: Bool) { 31 | super.viewDidAppear(animated) 32 | 33 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in 34 | self?.activityRingView.animateProgress(to: 1.5, withDuration: 2) 35 | } 36 | } 37 | 38 | override func viewDidLayoutSubviews() { 39 | super.viewDidLayoutSubviews() 40 | activityRingView.ringWidth = min(activityRingView.frame.height, activityRingView.frame.width) / 6 41 | } 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Supporting Files/Activity Rings.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Examples/tvOS Example/Supporting Files/Activity Rings.sketch -------------------------------------------------------------------------------- /Examples/tvOS Example/Tests/ActivityRingsExampleUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityRingsExampleUITests.swift 3 | // ActivityRings tvOS ExampleUITests 4 | // 5 | // Created by Harshil Shah on 02/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ActivityRingsExampleUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Examples/tvOS Example/Tests/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Examples/watchOS Example/Activity Rings watchOS Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/watchOS Example/Activity Rings watchOS Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "24x24", 5 | "idiom" : "watch", 6 | "scale" : "2x", 7 | "role" : "notificationCenter", 8 | "subtype" : "38mm" 9 | }, 10 | { 11 | "size" : "27.5x27.5", 12 | "idiom" : "watch", 13 | "scale" : "2x", 14 | "role" : "notificationCenter", 15 | "subtype" : "42mm" 16 | }, 17 | { 18 | "size" : "29x29", 19 | "idiom" : "watch", 20 | "role" : "companionSettings", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "size" : "29x29", 25 | "idiom" : "watch", 26 | "role" : "companionSettings", 27 | "scale" : "3x" 28 | }, 29 | { 30 | "size" : "40x40", 31 | "idiom" : "watch", 32 | "scale" : "2x", 33 | "role" : "appLauncher", 34 | "subtype" : "38mm" 35 | }, 36 | { 37 | "size" : "44x44", 38 | "idiom" : "watch", 39 | "scale" : "2x", 40 | "role" : "appLauncher", 41 | "subtype" : "40mm" 42 | }, 43 | { 44 | "size" : "50x50", 45 | "idiom" : "watch", 46 | "scale" : "2x", 47 | "role" : "appLauncher", 48 | "subtype" : "44mm" 49 | }, 50 | { 51 | "size" : "86x86", 52 | "idiom" : "watch", 53 | "scale" : "2x", 54 | "role" : "quickLook", 55 | "subtype" : "38mm" 56 | }, 57 | { 58 | "size" : "98x98", 59 | "idiom" : "watch", 60 | "scale" : "2x", 61 | "role" : "quickLook", 62 | "subtype" : "42mm" 63 | }, 64 | { 65 | "size" : "108x108", 66 | "idiom" : "watch", 67 | "scale" : "2x", 68 | "role" : "quickLook", 69 | "subtype" : "44mm" 70 | }, 71 | { 72 | "idiom" : "watch-marketing", 73 | "size" : "1024x1024", 74 | "scale" : "1x" 75 | } 76 | ], 77 | "info" : { 78 | "version" : 1, 79 | "author" : "xcode" 80 | } 81 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit App/Base.lproj/Interface.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 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | ActivityRings watchOS Example WatchKit App 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | UISupportedInterfaceOrientations 24 | 25 | UIInterfaceOrientationPortrait 26 | UIInterfaceOrientationPortraitUpsideDown 27 | 28 | WKCompanionAppBundleIdentifier 29 | com.harshilshah.ActivityRings-watchOS-Example 30 | WKWatchKitApp 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "idiom" : "watch", 5 | "filename" : "Circular.imageset", 6 | "role" : "circular" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "filename" : "Extra Large.imageset", 11 | "role" : "extra-large" 12 | }, 13 | { 14 | "idiom" : "watch", 15 | "filename" : "Graphic Bezel.imageset", 16 | "role" : "graphic-bezel" 17 | }, 18 | { 19 | "idiom" : "watch", 20 | "filename" : "Graphic Circular.imageset", 21 | "role" : "graphic-circular" 22 | }, 23 | { 24 | "idiom" : "watch", 25 | "filename" : "Graphic Corner.imageset", 26 | "role" : "graphic-corner" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "filename" : "Graphic Large Rectangular.imageset", 31 | "role" : "graphic-large-rectangular" 32 | }, 33 | { 34 | "idiom" : "watch", 35 | "filename" : "Modular.imageset", 36 | "role" : "modular" 37 | }, 38 | { 39 | "idiom" : "watch", 40 | "filename" : "Utilitarian.imageset", 41 | "role" : "utilitarian" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">145" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/ExtensionDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExtensionDelegate.swift 3 | // ActivityRings watchOS Example WatchKit Extension 4 | // 5 | // Created by Cal Stephens on 10/25/18. 6 | // Copyright © 2018 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import WatchKit 10 | 11 | class ExtensionDelegate: NSObject, WKExtensionDelegate { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | ActivityRings watchOS Example WatchKit Extension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionAttributes 26 | 27 | WKAppBundleIdentifier 28 | com.harshilshah.ActivityRings-watchOS-Example.watchkitapp 29 | 30 | NSExtensionPointIdentifier 31 | com.apple.watchkit 32 | 33 | WKExtensionDelegateClassName 34 | $(PRODUCT_MODULE_NAME).ExtensionDelegate 35 | 36 | 37 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example WatchKit Extension/InterfaceController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.swift 3 | // ActivityRings watchOS Example WatchKit Extension 4 | // 5 | // Created by Cal Stephens on 10/25/18. 6 | // Copyright © 2018 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import WatchKit 10 | import Foundation 11 | import ActivityRings_watchOS 12 | 13 | class InterfaceController: WKInterfaceController { 14 | 15 | @IBOutlet weak var smallInterfaceScene: WKInterfaceSKScene! 16 | @IBOutlet weak var mediumInterfaceScene: WKInterfaceSKScene! 17 | @IBOutlet weak var largeInterfaceScene: WKInterfaceSKScene! 18 | 19 | var sceneMapping = [WKInterfaceSKScene: ActivityRingScene]() 20 | 21 | override func willActivate() { 22 | sceneMapping[smallInterfaceScene] = ActivityRingScene(size: CGSize(width: 50, height: 50)) 23 | sceneMapping[mediumInterfaceScene] = ActivityRingScene(size: CGSize(width: 100, height: 100)) 24 | sceneMapping[largeInterfaceScene] = ActivityRingScene(size: CGSize(width: 130, height: 130)) 25 | 26 | for (interfaceScene, ringScene) in sceneMapping { 27 | interfaceScene.presentScene(ringScene) 28 | ringScene.animateProgress(to: 0.75, withDuration: 2.0) 29 | ringScene.ringWidth = 8 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2E10AAC52181E47500A1ED77 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E10AAC42181E47500A1ED77 /* AppDelegate.swift */; }; 11 | 2E10AAC72181E47500A1ED77 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E10AAC62181E47500A1ED77 /* ViewController.swift */; }; 12 | 2E10AACA2181E47500A1ED77 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2E10AAC82181E47500A1ED77 /* Main.storyboard */; }; 13 | 2E10AACC2181E47500A1ED77 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E10AACB2181E47500A1ED77 /* Assets.xcassets */; }; 14 | 2E10AACF2181E47500A1ED77 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2E10AACD2181E47500A1ED77 /* LaunchScreen.storyboard */; }; 15 | 2E10AAD42181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 2E10AAD32181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App.app */; }; 16 | 2E10AADA2181E47500A1ED77 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2E10AAD82181E47500A1ED77 /* Interface.storyboard */; }; 17 | 2E10AADC2181E47600A1ED77 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E10AADB2181E47600A1ED77 /* Assets.xcassets */; }; 18 | 2E10AAE32181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 2E10AAE22181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 19 | 2E10AAE82181E47600A1ED77 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E10AAE72181E47600A1ED77 /* InterfaceController.swift */; }; 20 | 2E10AAEA2181E47600A1ED77 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E10AAE92181E47600A1ED77 /* ExtensionDelegate.swift */; }; 21 | 2E10AAEC2181E47600A1ED77 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E10AAEB2181E47600A1ED77 /* Assets.xcassets */; }; 22 | 2E10AB012181E61800A1ED77 /* ActivityRings_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E10AB002181E61800A1ED77 /* ActivityRings_watchOS.framework */; }; 23 | 2E10AB032181E62D00A1ED77 /* ActivityRings_watchOS.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2E10AB002181E61800A1ED77 /* ActivityRings_watchOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 2E10AAD52181E47500A1ED77 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 2E10AAB92181E47500A1ED77 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 2E10AAD22181E47500A1ED77; 32 | remoteInfo = "ActivityRings watchOS Example WatchKit App"; 33 | }; 34 | 2E10AAE42181E47600A1ED77 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 2E10AAB92181E47500A1ED77 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 2E10AAE12181E47600A1ED77; 39 | remoteInfo = "ActivityRings watchOS Example WatchKit Extension"; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXCopyFilesBuildPhase section */ 44 | 2E10AAF32181E47600A1ED77 /* Embed App Extensions */ = { 45 | isa = PBXCopyFilesBuildPhase; 46 | buildActionMask = 2147483647; 47 | dstPath = ""; 48 | dstSubfolderSpec = 13; 49 | files = ( 50 | 2E10AAE32181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension.appex in Embed App Extensions */, 51 | ); 52 | name = "Embed App Extensions"; 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | 2E10AAF72181E47600A1ED77 /* Embed Watch Content */ = { 56 | isa = PBXCopyFilesBuildPhase; 57 | buildActionMask = 2147483647; 58 | dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; 59 | dstSubfolderSpec = 16; 60 | files = ( 61 | 2E10AAD42181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App.app in Embed Watch Content */, 62 | ); 63 | name = "Embed Watch Content"; 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | 2E10AAFE2181E5A800A1ED77 /* Embed Frameworks */ = { 67 | isa = PBXCopyFilesBuildPhase; 68 | buildActionMask = 2147483647; 69 | dstPath = ""; 70 | dstSubfolderSpec = 10; 71 | files = ( 72 | 2E10AB032181E62D00A1ED77 /* ActivityRings_watchOS.framework in Embed Frameworks */, 73 | ); 74 | name = "Embed Frameworks"; 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | /* End PBXCopyFilesBuildPhase section */ 78 | 79 | /* Begin PBXFileReference section */ 80 | 2E10AAC12181E47500A1ED77 /* ActivityRings watchOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ActivityRings watchOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | 2E10AAC42181E47500A1ED77 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 82 | 2E10AAC62181E47500A1ED77 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 83 | 2E10AAC92181E47500A1ED77 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 84 | 2E10AACB2181E47500A1ED77 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 85 | 2E10AACE2181E47500A1ED77 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 86 | 2E10AAD02181E47500A1ED77 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 87 | 2E10AAD32181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ActivityRings watchOS Example WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 88 | 2E10AAD92181E47500A1ED77 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; 89 | 2E10AADB2181E47600A1ED77 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 90 | 2E10AADD2181E47600A1ED77 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 91 | 2E10AAE22181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "ActivityRings watchOS Example WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 92 | 2E10AAE72181E47600A1ED77 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; 93 | 2E10AAE92181E47600A1ED77 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; 94 | 2E10AAEB2181E47600A1ED77 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 95 | 2E10AAED2181E47600A1ED77 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 96 | 2E10AB002181E61800A1ED77 /* ActivityRings_watchOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ActivityRings_watchOS.framework; path = "../Debug-watchsimulator/ActivityRings_watchOS.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 97 | /* End PBXFileReference section */ 98 | 99 | /* Begin PBXFrameworksBuildPhase section */ 100 | 2E10AABE2181E47500A1ED77 /* Frameworks */ = { 101 | isa = PBXFrameworksBuildPhase; 102 | buildActionMask = 2147483647; 103 | files = ( 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | 2E10AADF2181E47600A1ED77 /* Frameworks */ = { 108 | isa = PBXFrameworksBuildPhase; 109 | buildActionMask = 2147483647; 110 | files = ( 111 | 2E10AB012181E61800A1ED77 /* ActivityRings_watchOS.framework in Frameworks */, 112 | ); 113 | runOnlyForDeploymentPostprocessing = 0; 114 | }; 115 | /* End PBXFrameworksBuildPhase section */ 116 | 117 | /* Begin PBXGroup section */ 118 | 2E10AAB82181E47500A1ED77 = { 119 | isa = PBXGroup; 120 | children = ( 121 | 2E10AAC32181E47500A1ED77 /* ActivityRings watchOS Example */, 122 | 2E10AAD72181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App */, 123 | 2E10AAE62181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension */, 124 | 2E10AAC22181E47500A1ED77 /* Products */, 125 | 2E10AB002181E61800A1ED77 /* ActivityRings_watchOS.framework */, 126 | ); 127 | sourceTree = ""; 128 | }; 129 | 2E10AAC22181E47500A1ED77 /* Products */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 2E10AAC12181E47500A1ED77 /* ActivityRings watchOS Example.app */, 133 | 2E10AAD32181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App.app */, 134 | 2E10AAE22181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension.appex */, 135 | ); 136 | name = Products; 137 | sourceTree = ""; 138 | }; 139 | 2E10AAC32181E47500A1ED77 /* ActivityRings watchOS Example */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 2E10AAC42181E47500A1ED77 /* AppDelegate.swift */, 143 | 2E10AAC62181E47500A1ED77 /* ViewController.swift */, 144 | 2E10AAC82181E47500A1ED77 /* Main.storyboard */, 145 | 2E10AACB2181E47500A1ED77 /* Assets.xcassets */, 146 | 2E10AACD2181E47500A1ED77 /* LaunchScreen.storyboard */, 147 | 2E10AAD02181E47500A1ED77 /* Info.plist */, 148 | ); 149 | path = "ActivityRings watchOS Example"; 150 | sourceTree = ""; 151 | }; 152 | 2E10AAD72181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 2E10AAD82181E47500A1ED77 /* Interface.storyboard */, 156 | 2E10AADB2181E47600A1ED77 /* Assets.xcassets */, 157 | 2E10AADD2181E47600A1ED77 /* Info.plist */, 158 | ); 159 | path = "ActivityRings watchOS Example WatchKit App"; 160 | sourceTree = ""; 161 | }; 162 | 2E10AAE62181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 2E10AAE72181E47600A1ED77 /* InterfaceController.swift */, 166 | 2E10AAE92181E47600A1ED77 /* ExtensionDelegate.swift */, 167 | 2E10AAEB2181E47600A1ED77 /* Assets.xcassets */, 168 | 2E10AAED2181E47600A1ED77 /* Info.plist */, 169 | ); 170 | path = "ActivityRings watchOS Example WatchKit Extension"; 171 | sourceTree = ""; 172 | }; 173 | /* End PBXGroup section */ 174 | 175 | /* Begin PBXNativeTarget section */ 176 | 2E10AAC02181E47500A1ED77 /* ActivityRings watchOS Example */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 2E10AAF82181E47600A1ED77 /* Build configuration list for PBXNativeTarget "ActivityRings watchOS Example" */; 179 | buildPhases = ( 180 | 2E10AABD2181E47500A1ED77 /* Sources */, 181 | 2E10AABE2181E47500A1ED77 /* Frameworks */, 182 | 2E10AABF2181E47500A1ED77 /* Resources */, 183 | 2E10AAF72181E47600A1ED77 /* Embed Watch Content */, 184 | ); 185 | buildRules = ( 186 | ); 187 | dependencies = ( 188 | 2E10AAD62181E47500A1ED77 /* PBXTargetDependency */, 189 | ); 190 | name = "ActivityRings watchOS Example"; 191 | productName = "ActivityRings watchOS Example"; 192 | productReference = 2E10AAC12181E47500A1ED77 /* ActivityRings watchOS Example.app */; 193 | productType = "com.apple.product-type.application"; 194 | }; 195 | 2E10AAD22181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = 2E10AAF42181E47600A1ED77 /* Build configuration list for PBXNativeTarget "ActivityRings watchOS Example WatchKit App" */; 198 | buildPhases = ( 199 | 2E10AAD12181E47500A1ED77 /* Resources */, 200 | 2E10AAF32181E47600A1ED77 /* Embed App Extensions */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | 2E10AAE52181E47600A1ED77 /* PBXTargetDependency */, 206 | ); 207 | name = "ActivityRings watchOS Example WatchKit App"; 208 | productName = "ActivityRings watchOS Example WatchKit App"; 209 | productReference = 2E10AAD32181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App.app */; 210 | productType = "com.apple.product-type.application.watchapp2"; 211 | }; 212 | 2E10AAE12181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = 2E10AAF02181E47600A1ED77 /* Build configuration list for PBXNativeTarget "ActivityRings watchOS Example WatchKit Extension" */; 215 | buildPhases = ( 216 | 2E10AADE2181E47600A1ED77 /* Sources */, 217 | 2E10AADF2181E47600A1ED77 /* Frameworks */, 218 | 2E10AAE02181E47600A1ED77 /* Resources */, 219 | 2E10AAFE2181E5A800A1ED77 /* Embed Frameworks */, 220 | ); 221 | buildRules = ( 222 | ); 223 | dependencies = ( 224 | ); 225 | name = "ActivityRings watchOS Example WatchKit Extension"; 226 | productName = "ActivityRings watchOS Example WatchKit Extension"; 227 | productReference = 2E10AAE22181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension.appex */; 228 | productType = "com.apple.product-type.watchkit2-extension"; 229 | }; 230 | /* End PBXNativeTarget section */ 231 | 232 | /* Begin PBXProject section */ 233 | 2E10AAB92181E47500A1ED77 /* Project object */ = { 234 | isa = PBXProject; 235 | attributes = { 236 | LastSwiftUpdateCheck = 1000; 237 | LastUpgradeCheck = 1000; 238 | ORGANIZATIONNAME = "Harshil Shah"; 239 | TargetAttributes = { 240 | 2E10AAC02181E47500A1ED77 = { 241 | CreatedOnToolsVersion = 10.0; 242 | }; 243 | 2E10AAD22181E47500A1ED77 = { 244 | CreatedOnToolsVersion = 10.0; 245 | }; 246 | 2E10AAE12181E47600A1ED77 = { 247 | CreatedOnToolsVersion = 10.0; 248 | }; 249 | }; 250 | }; 251 | buildConfigurationList = 2E10AABC2181E47500A1ED77 /* Build configuration list for PBXProject "ActivityRings watchOS Example" */; 252 | compatibilityVersion = "Xcode 9.3"; 253 | developmentRegion = en; 254 | hasScannedForEncodings = 0; 255 | knownRegions = ( 256 | en, 257 | Base, 258 | ); 259 | mainGroup = 2E10AAB82181E47500A1ED77; 260 | productRefGroup = 2E10AAC22181E47500A1ED77 /* Products */; 261 | projectDirPath = ""; 262 | projectRoot = ""; 263 | targets = ( 264 | 2E10AAC02181E47500A1ED77 /* ActivityRings watchOS Example */, 265 | 2E10AAD22181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App */, 266 | 2E10AAE12181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension */, 267 | ); 268 | }; 269 | /* End PBXProject section */ 270 | 271 | /* Begin PBXResourcesBuildPhase section */ 272 | 2E10AABF2181E47500A1ED77 /* Resources */ = { 273 | isa = PBXResourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | 2E10AACF2181E47500A1ED77 /* LaunchScreen.storyboard in Resources */, 277 | 2E10AACC2181E47500A1ED77 /* Assets.xcassets in Resources */, 278 | 2E10AACA2181E47500A1ED77 /* Main.storyboard in Resources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | 2E10AAD12181E47500A1ED77 /* Resources */ = { 283 | isa = PBXResourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | 2E10AADC2181E47600A1ED77 /* Assets.xcassets in Resources */, 287 | 2E10AADA2181E47500A1ED77 /* Interface.storyboard in Resources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | 2E10AAE02181E47600A1ED77 /* Resources */ = { 292 | isa = PBXResourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 2E10AAEC2181E47600A1ED77 /* Assets.xcassets in Resources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | /* End PBXResourcesBuildPhase section */ 300 | 301 | /* Begin PBXSourcesBuildPhase section */ 302 | 2E10AABD2181E47500A1ED77 /* Sources */ = { 303 | isa = PBXSourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | 2E10AAC72181E47500A1ED77 /* ViewController.swift in Sources */, 307 | 2E10AAC52181E47500A1ED77 /* AppDelegate.swift in Sources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | 2E10AADE2181E47600A1ED77 /* Sources */ = { 312 | isa = PBXSourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | 2E10AAEA2181E47600A1ED77 /* ExtensionDelegate.swift in Sources */, 316 | 2E10AAE82181E47600A1ED77 /* InterfaceController.swift in Sources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | /* End PBXSourcesBuildPhase section */ 321 | 322 | /* Begin PBXTargetDependency section */ 323 | 2E10AAD62181E47500A1ED77 /* PBXTargetDependency */ = { 324 | isa = PBXTargetDependency; 325 | target = 2E10AAD22181E47500A1ED77 /* ActivityRings watchOS Example WatchKit App */; 326 | targetProxy = 2E10AAD52181E47500A1ED77 /* PBXContainerItemProxy */; 327 | }; 328 | 2E10AAE52181E47600A1ED77 /* PBXTargetDependency */ = { 329 | isa = PBXTargetDependency; 330 | target = 2E10AAE12181E47600A1ED77 /* ActivityRings watchOS Example WatchKit Extension */; 331 | targetProxy = 2E10AAE42181E47600A1ED77 /* PBXContainerItemProxy */; 332 | }; 333 | /* End PBXTargetDependency section */ 334 | 335 | /* Begin PBXVariantGroup section */ 336 | 2E10AAC82181E47500A1ED77 /* Main.storyboard */ = { 337 | isa = PBXVariantGroup; 338 | children = ( 339 | 2E10AAC92181E47500A1ED77 /* Base */, 340 | ); 341 | name = Main.storyboard; 342 | sourceTree = ""; 343 | }; 344 | 2E10AACD2181E47500A1ED77 /* LaunchScreen.storyboard */ = { 345 | isa = PBXVariantGroup; 346 | children = ( 347 | 2E10AACE2181E47500A1ED77 /* Base */, 348 | ); 349 | name = LaunchScreen.storyboard; 350 | sourceTree = ""; 351 | }; 352 | 2E10AAD82181E47500A1ED77 /* Interface.storyboard */ = { 353 | isa = PBXVariantGroup; 354 | children = ( 355 | 2E10AAD92181E47500A1ED77 /* Base */, 356 | ); 357 | name = Interface.storyboard; 358 | sourceTree = ""; 359 | }; 360 | /* End PBXVariantGroup section */ 361 | 362 | /* Begin XCBuildConfiguration section */ 363 | 2E10AAEE2181E47600A1ED77 /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | CLANG_ANALYZER_NONNULL = YES; 368 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 370 | CLANG_CXX_LIBRARY = "libc++"; 371 | CLANG_ENABLE_MODULES = YES; 372 | CLANG_ENABLE_OBJC_ARC = YES; 373 | CLANG_ENABLE_OBJC_WEAK = YES; 374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_COMMA = YES; 377 | CLANG_WARN_CONSTANT_CONVERSION = YES; 378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 381 | CLANG_WARN_EMPTY_BODY = YES; 382 | CLANG_WARN_ENUM_CONVERSION = YES; 383 | CLANG_WARN_INFINITE_RECURSION = YES; 384 | CLANG_WARN_INT_CONVERSION = YES; 385 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 386 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 387 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 388 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 389 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 390 | CLANG_WARN_STRICT_PROTOTYPES = YES; 391 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 392 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 393 | CLANG_WARN_UNREACHABLE_CODE = YES; 394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 395 | CODE_SIGN_IDENTITY = "iPhone Developer"; 396 | COPY_PHASE_STRIP = NO; 397 | DEBUG_INFORMATION_FORMAT = dwarf; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | ENABLE_TESTABILITY = YES; 400 | GCC_C_LANGUAGE_STANDARD = gnu11; 401 | GCC_DYNAMIC_NO_PIC = NO; 402 | GCC_NO_COMMON_BLOCKS = YES; 403 | GCC_OPTIMIZATION_LEVEL = 0; 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 415 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 416 | MTL_FAST_MATH = YES; 417 | ONLY_ACTIVE_ARCH = YES; 418 | SDKROOT = iphoneos; 419 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 420 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 421 | }; 422 | name = Debug; 423 | }; 424 | 2E10AAEF2181E47600A1ED77 /* Release */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | ALWAYS_SEARCH_USER_PATHS = NO; 428 | CLANG_ANALYZER_NONNULL = YES; 429 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 430 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 431 | CLANG_CXX_LIBRARY = "libc++"; 432 | CLANG_ENABLE_MODULES = YES; 433 | CLANG_ENABLE_OBJC_ARC = YES; 434 | CLANG_ENABLE_OBJC_WEAK = YES; 435 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 436 | CLANG_WARN_BOOL_CONVERSION = YES; 437 | CLANG_WARN_COMMA = YES; 438 | CLANG_WARN_CONSTANT_CONVERSION = YES; 439 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 440 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 441 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 442 | CLANG_WARN_EMPTY_BODY = YES; 443 | CLANG_WARN_ENUM_CONVERSION = YES; 444 | CLANG_WARN_INFINITE_RECURSION = YES; 445 | CLANG_WARN_INT_CONVERSION = YES; 446 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 447 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 448 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 449 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 450 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 451 | CLANG_WARN_STRICT_PROTOTYPES = YES; 452 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 453 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 454 | CLANG_WARN_UNREACHABLE_CODE = YES; 455 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 456 | CODE_SIGN_IDENTITY = "iPhone Developer"; 457 | COPY_PHASE_STRIP = NO; 458 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 459 | ENABLE_NS_ASSERTIONS = NO; 460 | ENABLE_STRICT_OBJC_MSGSEND = YES; 461 | GCC_C_LANGUAGE_STANDARD = gnu11; 462 | GCC_NO_COMMON_BLOCKS = YES; 463 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 464 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 465 | GCC_WARN_UNDECLARED_SELECTOR = YES; 466 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 467 | GCC_WARN_UNUSED_FUNCTION = YES; 468 | GCC_WARN_UNUSED_VARIABLE = YES; 469 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 470 | MTL_ENABLE_DEBUG_INFO = NO; 471 | MTL_FAST_MATH = YES; 472 | SDKROOT = iphoneos; 473 | SWIFT_COMPILATION_MODE = wholemodule; 474 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 475 | VALIDATE_PRODUCT = YES; 476 | }; 477 | name = Release; 478 | }; 479 | 2E10AAF12181E47600A1ED77 /* Debug */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; 483 | CODE_SIGN_STYLE = Automatic; 484 | INFOPLIST_FILE = "ActivityRings watchOS Example WatchKit Extension/Info.plist"; 485 | LD_RUNPATH_SEARCH_PATHS = ( 486 | "$(inherited)", 487 | "@executable_path/Frameworks", 488 | "@executable_path/../../Frameworks", 489 | ); 490 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-watchOS-Example.watchkitapp.watchkitextension"; 491 | PRODUCT_NAME = "${TARGET_NAME}"; 492 | SDKROOT = watchos; 493 | SKIP_INSTALL = YES; 494 | SWIFT_VERSION = 4.2; 495 | TARGETED_DEVICE_FAMILY = 4; 496 | WATCHOS_DEPLOYMENT_TARGET = 5.0; 497 | }; 498 | name = Debug; 499 | }; 500 | 2E10AAF22181E47600A1ED77 /* Release */ = { 501 | isa = XCBuildConfiguration; 502 | buildSettings = { 503 | ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; 504 | CODE_SIGN_STYLE = Automatic; 505 | INFOPLIST_FILE = "ActivityRings watchOS Example WatchKit Extension/Info.plist"; 506 | LD_RUNPATH_SEARCH_PATHS = ( 507 | "$(inherited)", 508 | "@executable_path/Frameworks", 509 | "@executable_path/../../Frameworks", 510 | ); 511 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-watchOS-Example.watchkitapp.watchkitextension"; 512 | PRODUCT_NAME = "${TARGET_NAME}"; 513 | SDKROOT = watchos; 514 | SKIP_INSTALL = YES; 515 | SWIFT_VERSION = 4.2; 516 | TARGETED_DEVICE_FAMILY = 4; 517 | WATCHOS_DEPLOYMENT_TARGET = 5.0; 518 | }; 519 | name = Release; 520 | }; 521 | 2E10AAF52181E47600A1ED77 /* Debug */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 525 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 526 | CODE_SIGN_STYLE = Automatic; 527 | IBSC_MODULE = ActivityRings_watchOS_Example_WatchKit_Extension; 528 | INFOPLIST_FILE = "ActivityRings watchOS Example WatchKit App/Info.plist"; 529 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-watchOS-Example.watchkitapp"; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | SDKROOT = watchos; 532 | SKIP_INSTALL = YES; 533 | SWIFT_VERSION = 4.2; 534 | TARGETED_DEVICE_FAMILY = 4; 535 | WATCHOS_DEPLOYMENT_TARGET = 5.0; 536 | }; 537 | name = Debug; 538 | }; 539 | 2E10AAF62181E47600A1ED77 /* Release */ = { 540 | isa = XCBuildConfiguration; 541 | buildSettings = { 542 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 543 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 544 | CODE_SIGN_STYLE = Automatic; 545 | IBSC_MODULE = ActivityRings_watchOS_Example_WatchKit_Extension; 546 | INFOPLIST_FILE = "ActivityRings watchOS Example WatchKit App/Info.plist"; 547 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-watchOS-Example.watchkitapp"; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | SDKROOT = watchos; 550 | SKIP_INSTALL = YES; 551 | SWIFT_VERSION = 4.2; 552 | TARGETED_DEVICE_FAMILY = 4; 553 | WATCHOS_DEPLOYMENT_TARGET = 5.0; 554 | }; 555 | name = Release; 556 | }; 557 | 2E10AAF92181E47600A1ED77 /* Debug */ = { 558 | isa = XCBuildConfiguration; 559 | buildSettings = { 560 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 561 | CODE_SIGN_STYLE = Automatic; 562 | INFOPLIST_FILE = "ActivityRings watchOS Example/Info.plist"; 563 | LD_RUNPATH_SEARCH_PATHS = ( 564 | "$(inherited)", 565 | "@executable_path/Frameworks", 566 | ); 567 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-watchOS-Example"; 568 | PRODUCT_NAME = "$(TARGET_NAME)"; 569 | SWIFT_VERSION = 4.2; 570 | TARGETED_DEVICE_FAMILY = "1,2"; 571 | }; 572 | name = Debug; 573 | }; 574 | 2E10AAFA2181E47600A1ED77 /* Release */ = { 575 | isa = XCBuildConfiguration; 576 | buildSettings = { 577 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 578 | CODE_SIGN_STYLE = Automatic; 579 | INFOPLIST_FILE = "ActivityRings watchOS Example/Info.plist"; 580 | LD_RUNPATH_SEARCH_PATHS = ( 581 | "$(inherited)", 582 | "@executable_path/Frameworks", 583 | ); 584 | PRODUCT_BUNDLE_IDENTIFIER = "com.harshilshah.ActivityRings-watchOS-Example"; 585 | PRODUCT_NAME = "$(TARGET_NAME)"; 586 | SWIFT_VERSION = 4.2; 587 | TARGETED_DEVICE_FAMILY = "1,2"; 588 | }; 589 | name = Release; 590 | }; 591 | /* End XCBuildConfiguration section */ 592 | 593 | /* Begin XCConfigurationList section */ 594 | 2E10AABC2181E47500A1ED77 /* Build configuration list for PBXProject "ActivityRings watchOS Example" */ = { 595 | isa = XCConfigurationList; 596 | buildConfigurations = ( 597 | 2E10AAEE2181E47600A1ED77 /* Debug */, 598 | 2E10AAEF2181E47600A1ED77 /* Release */, 599 | ); 600 | defaultConfigurationIsVisible = 0; 601 | defaultConfigurationName = Release; 602 | }; 603 | 2E10AAF02181E47600A1ED77 /* Build configuration list for PBXNativeTarget "ActivityRings watchOS Example WatchKit Extension" */ = { 604 | isa = XCConfigurationList; 605 | buildConfigurations = ( 606 | 2E10AAF12181E47600A1ED77 /* Debug */, 607 | 2E10AAF22181E47600A1ED77 /* Release */, 608 | ); 609 | defaultConfigurationIsVisible = 0; 610 | defaultConfigurationName = Release; 611 | }; 612 | 2E10AAF42181E47600A1ED77 /* Build configuration list for PBXNativeTarget "ActivityRings watchOS Example WatchKit App" */ = { 613 | isa = XCConfigurationList; 614 | buildConfigurations = ( 615 | 2E10AAF52181E47600A1ED77 /* Debug */, 616 | 2E10AAF62181E47600A1ED77 /* Release */, 617 | ); 618 | defaultConfigurationIsVisible = 0; 619 | defaultConfigurationName = Release; 620 | }; 621 | 2E10AAF82181E47600A1ED77 /* Build configuration list for PBXNativeTarget "ActivityRings watchOS Example" */ = { 622 | isa = XCConfigurationList; 623 | buildConfigurations = ( 624 | 2E10AAF92181E47600A1ED77 /* Debug */, 625 | 2E10AAFA2181E47600A1ED77 /* Release */, 626 | ); 627 | defaultConfigurationIsVisible = 0; 628 | defaultConfigurationName = Release; 629 | }; 630 | /* End XCConfigurationList section */ 631 | }; 632 | rootObject = 2E10AAB92181E47500A1ED77 /* Project object */; 633 | } 634 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ActivityRings watchOS Example 4 | // 5 | // Created by Cal Stephens on 10/25/18. 6 | // Copyright © 2018 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | return true 18 | } 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Examples/watchOS Example/ActivityRings watchOS Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ActivityRings watchOS Example 4 | // 5 | // Created by Cal Stephens on 10/25/18. 6 | // Copyright © 2018 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | } 16 | 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Harshil Shah 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ActivityRings 2 | 3 | [![Version](https://img.shields.io/github/release/HarshilShah/ActivityRings.svg)](https://github.com/HarshilShah/ActivityRings/releases/latest) 4 | ![Package Managers](https://img.shields.io/badge/supports-CocoaPods%20%7C%20Carthage-green.svg) 5 | ![Platforms](https://img.shields.io/cocoapods/p/ActivityRings.svg?style=flat) 6 | [![License](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/HarshilShah/ActivityRings/blob/master/LICENSE) 7 | [![Contact](https://img.shields.io/badge/contact-%40HarshilShah1910-3a8fc1.svg)](https://twitter.com/HarshilShah1910) 8 | 9 | ActivityRings is an attempt to recreate the ring controls in Apple’s Activity app. 10 | 11 | This project is a SpriteKit port of [Max Konovalov](https://github.com/maxkonovalov)’s pure UIKit implementation, [MKRingProgressView](https://github.com/maxkonovalov/MKRingProgressView). 12 | 13 | ![Demo](https://raw.githubusercontent.com/HarshilShah/ActivityRings/master/Resources/demo.gif) 14 | 15 | ## Requirements 16 | 17 | - Swift 4.2 18 | - iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 4.0+ 19 | 20 | ## Installation 21 | 22 | ActivityRings is available via CocoaPods and Carthage. 23 | 24 | ### CocoaPods 25 | 26 | To install ActivityRings using [CocoaPods](http://cocoapods.org), add the following line to your Podfile: 27 | ``` 28 | pod 'ActivityRings' 29 | ``` 30 | ### Carthage 31 | 32 | To install ActivityRings using [Carthage](https://github.com/Carthage/Carthage), add the following line to your Cartfile: 33 | 34 | ``` 35 | github "HarshilShah/ActivityRings" 36 | ``` 37 | 38 | ## Usage 39 | 40 | ### Basics 41 | 42 | To get started, import `ActivityRings`. To display the control, use the `ActivityRingView` class on iOS, macOS, and tvOS, and the `ActivityRingScene` class on watchOS. 43 | 44 | ### Customisation 45 | 46 | The `ringWidth`, the `startColor`, the `endColor`, and the `backgroundRingColor` can all be customised. 47 | 48 | ### Progress 49 | 50 | The progress of the ring can be set with or without animation. 51 | 52 | To set the progress without animation, simply update the value of the `progress` variable. 53 | 54 | To animate the progress, use the `animateProgress` method, which accepts two arguments: 55 | - The desired final progress value 56 | - The animation duration 57 | 58 | ## Notes 59 | 60 | Some notes on performance: 61 | - Since this control was written in SpriteKit, it relies heavily on the GPU, and so will not perform well or accurately in the simulator. 62 | - The initial setup process is somewhat expensive, so animating the progress directly after presenting the view can cause some hiccups. This is being worked on, but in the meantime, delaying the animation by a second or so works around the issue. 63 | 64 | ## Apps Using *ActivityRings* 65 | 66 | Feel free to submit a PR if you’re using this library in your apps. 67 | 68 | ## Author 69 | 70 | Written by Harshil Shah. You can [find me on Twitter](https://twitter.com/HarshilShah1910). 71 | 72 | The original UIKit implementation was written by [Max Konovalov](https://github.com/maxkonovalov). 73 | 74 | ## License 75 | 76 | ActivityRings is available under the MIT license. See the LICENSE.md file for more info. 77 | -------------------------------------------------------------------------------- /Resources/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HarshilShah/ActivityRings/85f3165689ad3f8695f13b43a8fec95e3239fb3c/Resources/demo.gif -------------------------------------------------------------------------------- /Sources/Shared/ActivityRingScene.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityRingScene.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import SpriteKit 10 | 11 | public final class ActivityRingScene: SKScene { 12 | 13 | // MARK:- Constants 14 | 15 | private let backgroundRingAlpha: CGFloat = 0.25 16 | 17 | // MARK:- Public variables 18 | 19 | public var progress: Double = 0 { 20 | didSet { isUpdateNeeded = true } 21 | } 22 | 23 | public var ringWidth: CGFloat = 60 { 24 | didSet { isUpdateNeeded = true } 25 | } 26 | 27 | public var startColor = Color.purple { 28 | didSet { isUpdateNeeded = true } 29 | } 30 | 31 | public var endColor = Color.blue { 32 | didSet { isUpdateNeeded = true } 33 | } 34 | 35 | public var backgroundRingColor: Color? { 36 | didSet { isUpdateNeeded = true } 37 | } 38 | 39 | // MARK:- Private variables 40 | 41 | private var animator: Animator? 42 | 43 | private var isUpdateNeeded = false 44 | 45 | private var isAnimating: Bool { 46 | guard let animator = animator else { 47 | return false 48 | } 49 | 50 | return animator.isAnimating(at: CACurrentMediaTime()) 51 | } 52 | 53 | // MARK: Nodes 54 | 55 | private lazy var backgroundRingNode = SKShapeNode() 56 | private lazy var shadowNode = SKEffectNode() 57 | private lazy var shadowShapeNode = SKShapeNode() 58 | private lazy var solidArcNode = SKShapeNode() 59 | private lazy var gradientCropNode = SKCropNode() 60 | private lazy var unshadedArcNode = SKShapeNode() 61 | private lazy var gradientArcNode = SKShapeNode() 62 | 63 | // MARK:- Initialization/setup 64 | 65 | @available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) 66 | public override func sceneDidLoad() { 67 | super.sceneDidLoad() 68 | setup() 69 | } 70 | 71 | #if SKVIEW_AVAILABLE // excludes watchOS 72 | public override func didMove(to view: SKView) { 73 | super.didMove(to: view) 74 | 75 | if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { 76 | /// Nothing to do; this is a fallback for `sceneDidLoad` since that 77 | /// doesn't exist on iOS <10.0 and macOS <10.12 and tvOS <10.0 78 | } else { 79 | setup() 80 | } 81 | } 82 | #endif 83 | 84 | private func setup() { 85 | backgroundColor = .clear 86 | 87 | backgroundRingNode.lineCap = .round 88 | addChild(backgroundRingNode) 89 | 90 | solidArcNode.lineCap = .round 91 | addChild(solidArcNode) 92 | 93 | addChild(shadowNode) 94 | shadowShapeNode.lineCap = .round 95 | shadowNode.addChild(shadowShapeNode) 96 | 97 | /// This shader simply sets the color at any point to be a mixture of the 98 | /// `start_color` and `end_colors` in the same proportion as it's distance from 99 | /// each end 100 | /// 101 | /// The `end_color` represents the color at the end of a full revolution, 102 | /// so for cases when the progress is under a full revolution (i.e. <1), the 103 | /// actual line never is of that color. So a `progress` uniform is used to 104 | /// adjust the proportional distance of a point from the end of a full 105 | /// revolution 106 | let ringShader = SKShader(source: """ 107 | void main() { 108 | float ratio = progress * v_path_distance / u_path_length; 109 | gl_FragColor = vec4((start_color * (1.0 - ratio)) + (end_color * ratio), 1.0); 110 | } 111 | """) 112 | 113 | gradientArcNode.strokeShader = ringShader 114 | gradientArcNode.lineCap = .round 115 | 116 | unshadedArcNode.lineCap = .round 117 | gradientCropNode.maskNode = unshadedArcNode 118 | gradientCropNode.maskNode = unshadedArcNode 119 | gradientCropNode.addChild(gradientArcNode) 120 | addChild(gradientCropNode) 121 | 122 | updateColors(forProgress: getProgress()) 123 | } 124 | 125 | // MARK:- SKScene methods 126 | 127 | public override func update(_ currentTime: TimeInterval) { 128 | super.update(currentTime) 129 | 130 | guard isAnimating || isUpdateNeeded else { 131 | return 132 | } 133 | 134 | isUpdateNeeded = false 135 | 136 | let progress = getProgress(atTime: currentTime) 137 | updateColors(forProgress: progress) 138 | updateLayout(forProgress: progress) 139 | } 140 | 141 | public override func didChangeSize(_ oldSize: CGSize) { 142 | super.didChangeSize(oldSize) 143 | isUpdateNeeded = true 144 | } 145 | 146 | // MARK:- Public methods 147 | 148 | public func animateProgress(to targetValue: Double, withDuration duration: TimeInterval) { 149 | guard targetValue >= 0, duration >= 0 else { 150 | return 151 | } 152 | 153 | let now = CACurrentMediaTime() 154 | animator = Animator(from: getProgress(atTime: now), 155 | to: targetValue, 156 | startTime: now, 157 | duration: duration) 158 | } 159 | 160 | // MARK:- Private methods 161 | 162 | private func getProgress(atTime time: TimeInterval = CACurrentMediaTime()) -> Double { 163 | guard let animator = animator else { 164 | return progress 165 | } 166 | 167 | return animator.value(at: time) 168 | } 169 | 170 | private func updateLayout(forProgress progress: Double) { 171 | let progress = CGFloat(progress) 172 | let center = CGPoint(x: size.width/2, y: size.height/2) 173 | let radius = (min(size.width, size.height) / 2) - (ringWidth/2) 174 | 175 | let angleOffset = CGFloat.pi / 2 176 | let angle = (2 * .pi * progress) - angleOffset 177 | let minAngle = 1.1 * atan(0.5 * ringWidth / radius) 178 | let maxAngle = 2 * .pi - 3 * minAngle - angleOffset 179 | 180 | /// Multiplying angles by -1 because SpriteKit 181 | /// 182 | /// NOTE:- Clockwise means anticlockwise in SpriteKit for iOS 183 | /// Clockwise means clockwise in macOS, however, so the clockwise 184 | /// variable is flipped in that method 185 | 186 | let gradientOffset = max(angle - maxAngle, 0) * -1 187 | let gradientAngle = min(angle, maxAngle) * -1 188 | 189 | /// Best as I can tell there's no way to generate a perfect circular arc 190 | /// with just the center and radius that works in both UIKit and AppKit 191 | backgroundRingNode.path = { 192 | if #available(macOS 10.10, *) { 193 | return BezierPath(arcCenter: center, radius: radius, 194 | startAngle: 0, endAngle: 2 * .pi, 195 | clockwise: true).cgPath 196 | } else { 197 | return BezierPath(arcCenter: center, radius: radius, 198 | startAngle: 0, endAngle: 2 * .pi, 199 | clockwise: false).cgPath 200 | } 201 | }() 202 | 203 | solidArcNode.path = { 204 | guard angle > maxAngle else { 205 | return BezierPath(arcCenter: center, radius: radius, 206 | startAngle: angleOffset, 207 | endAngle: angleOffset, 208 | clockwise: false).cgPath 209 | } 210 | return BezierPath(arcCenter: center, radius: radius, 211 | startAngle: angleOffset, 212 | endAngle: gradientOffset, 213 | clockwise: false).cgPath 214 | }() 215 | 216 | shadowShapeNode.path = { 217 | guard progress != 0 else { return nil } 218 | return BezierPath(arcCenter: center, radius: radius, 219 | startAngle: gradientAngle + gradientOffset + min(progress/2, 0.06), 220 | endAngle: gradientAngle + gradientOffset - 0.03, 221 | clockwise: false).cgPath 222 | }() 223 | 224 | gradientArcNode.path = { 225 | guard progress != 0 else { return nil } 226 | return BezierPath(arcCenter: center, radius: radius, 227 | startAngle: angleOffset + gradientOffset, 228 | endAngle: gradientAngle + gradientOffset, 229 | clockwise: false).cgPath 230 | }() 231 | 232 | unshadedArcNode.path = gradientArcNode.path 233 | 234 | backgroundRingNode.lineWidth = ringWidth 235 | solidArcNode.lineWidth = ringWidth 236 | shadowShapeNode.lineWidth = ringWidth 237 | gradientArcNode.lineWidth = ringWidth 238 | unshadedArcNode.lineWidth = ringWidth 239 | 240 | #if canImport(CoreImage) 241 | let shadowRadius = NSNumber(value: ceil(0.3 * Double(ringWidth))) 242 | let shadowAngle = NSNumber(value: Double(gradientAngle + gradientOffset + .pi/2)) 243 | 244 | shadowNode.filter = CIFilter( 245 | name: "CIMotionBlur", 246 | parameters: ["inputRadius": shadowRadius, 247 | "inputAngle" : shadowAngle]) 248 | #endif 249 | } 250 | 251 | private func updateColors(forProgress progress: Double) { 252 | backgroundRingNode.strokeColor = backgroundRingColor ?? startColor.withAlphaComponent(backgroundRingAlpha) 253 | solidArcNode.strokeColor = startColor 254 | 255 | let shadowAlpha = CGFloat(min(1, progress)) 256 | shadowShapeNode.strokeColor = Color.black.withAlphaComponent(shadowAlpha) 257 | 258 | guard let startRGBA = startColor.rgba, let endRGBA = endColor.rgba else { 259 | return 260 | } 261 | 262 | if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 4.0, *) { 263 | gradientArcNode.strokeShader?.uniforms = [ 264 | SKUniform(name: "progress", float: min(Float(progress), 1)), 265 | SKUniform(name: "start_color", vectorFloat3: vector3(Float(startRGBA.0), Float(startRGBA.1), Float(startRGBA.2))), 266 | SKUniform(name: "end_color", vectorFloat3: vector3(Float(endRGBA.0), Float(endRGBA.1), Float(endRGBA.2))) 267 | ] 268 | } else { 269 | #if canImport(GLKit) 270 | gradientArcNode.strokeShader?.uniforms = [ 271 | SKUniform(name: "progress", float: min(Float(progress), 1)), 272 | SKUniform(name: "start_color", float: GLKVector3(v: (Float(startRGBA.0), Float(startRGBA.1), Float(startRGBA.2)))), 273 | SKUniform(name: "end_color", float: GLKVector3(v: (Float(endRGBA.0), Float(endRGBA.1), Float(endRGBA.2)))) 274 | ] 275 | #else 276 | fatalError("No available `strokeShader` API.") 277 | #endif 278 | } 279 | 280 | } 281 | 282 | } 283 | -------------------------------------------------------------------------------- /Sources/Shared/ActivityRingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityRingView.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import SpriteKit 10 | 11 | #if SKVIEW_AVAILABLE // excludes watchOS 12 | public final class ActivityRingView: SKView { 13 | 14 | // MARK:- Public variables 15 | 16 | /// The progress, calculated in terms of number of revolutions of the 17 | /// ring. A value of 1 corresponds to one full revolution 18 | /// 19 | /// Setting this value updates the ring immediately. To animate the change, 20 | /// see the `animateProgress` method 21 | /// 22 | /// The default value is `0.0` 23 | public var progress: Double { 24 | get { return activityRingScene.progress } 25 | set { activityRingScene.progress = newValue } 26 | } 27 | 28 | /// The width of the activity ring 29 | /// 30 | /// The default value is `60.0` 31 | public var ringWidth: CGFloat { 32 | get { return activityRingScene.ringWidth } 33 | set { activityRingScene.ringWidth = newValue } 34 | } 35 | 36 | /// The color at the start of the ring. The alpha value is ignored while 37 | /// rendering 38 | /// 39 | /// The default value is `.purple` 40 | public var startColor: Color { 41 | get { return activityRingScene.startColor } 42 | set { activityRingScene.startColor = newValue } 43 | } 44 | 45 | /// The color at the end of the ring. The alpha value is ignored while 46 | /// rendering 47 | /// 48 | /// The default value is `.blue` 49 | public var endColor: Color { 50 | get { return activityRingScene.endColor } 51 | set { activityRingScene.endColor = newValue } 52 | } 53 | 54 | /// The color of the background ring. 55 | /// 56 | /// If a particular value isn't specified (i.e. if the value is `nil`), the 57 | /// background ring's color is the `startColor` with an opacity of `0.25` 58 | /// 59 | /// The default value is `nil` 60 | public var backgroundRingColor: Color? { 61 | get { return activityRingScene.backgroundRingColor } 62 | set { activityRingScene.backgroundRingColor = newValue } 63 | } 64 | 65 | // MARK:- Private variables 66 | 67 | private lazy var activityRingScene = ActivityRingScene() 68 | 69 | // MARK:- Initializers 70 | 71 | override public init(frame: CGRect) { 72 | super.init(frame: frame) 73 | setup() 74 | } 75 | 76 | required public init?(coder aDecoder: NSCoder) { 77 | super.init(coder: aDecoder) 78 | setup() 79 | } 80 | 81 | override public func awakeFromNib() { 82 | super.awakeFromNib() 83 | setup() 84 | } 85 | 86 | private func setup() { 87 | allowsTransparency = true 88 | activityRingScene.scaleMode = .resizeFill 89 | presentScene(activityRingScene) 90 | } 91 | 92 | // MARK:- Public methods 93 | 94 | /// Animates the ring's progress from its current value to a given value, 95 | /// with a specified animation duration 96 | /// 97 | /// The progress is calculated in terms of number of revolutions of the 98 | /// ring. A value of 1 corresponds to one full revolution 99 | /// 100 | /// - Parameters: 101 | /// - targetValue: The desired `progress` for the ring`. This is required 102 | /// to be a non-negative (0 or more) value 103 | /// - duration: The duration of the progress animation, measured in 104 | /// seconds. This is required to be a non-negative (0 or more) value 105 | public func animateProgress(to targetValue: Double, withDuration duration: TimeInterval) { 106 | activityRingScene.animateProgress(to: targetValue, withDuration: duration) 107 | } 108 | 109 | } 110 | #endif 111 | 112 | -------------------------------------------------------------------------------- /Sources/Shared/Animator/Animatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animatable.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | /// A protocol that describes types which can be animated / interpolated 10 | protocol Animatable { 11 | 12 | /// Interpolates two values using a given ratio 13 | /// 14 | /// The ratio represented the proportion of the second value (i.e. `to`). 15 | /// So a ratio of `0` would return the starting `from` value, a ratio of `1` 16 | /// would return the final `to` value, and so on. 17 | /// 18 | /// - Parameters: 19 | /// - firstValue: The starting value for the interpolation. This is the 20 | /// value returned when the `ratio` is 0 21 | /// - secondValue: The ending value for the interpolation. This is the 22 | /// value returned when the `ratio` is 1 23 | /// - ratio: The proportion of the interpolation 24 | /// - Returns: The interpolated value 25 | static func interpolate(from firstValue: Self, to secondValue: Self, withRatio ratio: Double) -> Self 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Shared/Animator/Animator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animator.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Animator { 12 | 13 | // MARK:- Private variables 14 | 15 | private let initialValue: T 16 | private let targetValue: T 17 | private let startTime: TimeInterval 18 | private let duration: TimeInterval 19 | 20 | // MARK:- Initializers 21 | 22 | init(from initialValue: T, to targetValue: T, startTime: TimeInterval, duration: TimeInterval) { 23 | self.initialValue = initialValue 24 | self.targetValue = targetValue 25 | self.startTime = startTime 26 | self.duration = duration 27 | } 28 | 29 | // MARK:- Public methods 30 | 31 | func isAnimating(at time: TimeInterval) -> Bool { 32 | return time <= startTime + duration 33 | } 34 | 35 | func value(at time: TimeInterval) -> T { 36 | guard isAnimating(at: time) else { 37 | return targetValue 38 | } 39 | 40 | let ratio = max(0, min(1, (time - startTime) / duration)) 41 | let easedRatio = quadraticallyEasing(ratio) 42 | return T.interpolate(from: initialValue, to: targetValue, withRatio: easedRatio) 43 | } 44 | 45 | // MARK:- Private methods 46 | 47 | private func quadraticallyEasing(_ value: Double) -> Double { 48 | if value < 0.5 { 49 | return 2 * value * value; 50 | } else { 51 | return (-2 * value * value) + (4 * value) - 1; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Sources/Shared/Animator/Double+Animatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Double+Animatable.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | extension Double: Animatable { 10 | 11 | static func interpolate(from firstValue: Double, to secondValue: Double, withRatio ratio: Double) -> Double { 12 | return firstValue + (secondValue - firstValue) * ratio 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Sources/Shared/Typealias.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Typealias.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import SpriteKit 10 | 11 | #if os(macOS) 12 | 13 | public typealias Color = NSColor 14 | public typealias BezierPath = NSBezierPath 15 | 16 | #else 17 | 18 | public typealias Color = UIColor 19 | public typealias BezierPath = UIBezierPath 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Sources/Supporting Files/ActivityRings.h: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityRings.h 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ActivityRings. 12 | FOUNDATION_EXPORT double ActivityRingsVersionNumber; 13 | 14 | //! Project version string for ActivityRings. 15 | FOUNDATION_EXPORT const unsigned char ActivityRingsVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sources/Supporting Files/Info-tvOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | UIRequiredDeviceCapabilities 26 | 27 | arm64 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Sources/Supporting Files/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 | 2.0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Sources/iOS/UIColor+RGBA.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+RGBA.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIColor { 12 | 13 | /// Returns the red, green, blue, and alpha components 14 | /// 15 | /// Returns nil if the conversion to the RGBA colorspace wasn't successful 16 | var rgba: (CGFloat, CGFloat, CGFloat, CGFloat)? { 17 | var values: (CGFloat, CGFloat, CGFloat, CGFloat) = (0, 0, 0, 0) 18 | let isConversionSuccessful = getRed(&values.0, green: &values.1, blue: &values.2, alpha: &values.3) 19 | 20 | guard isConversionSuccessful else { 21 | return nil 22 | } 23 | 24 | return values 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Sources/macOS/NSBezierPath+CGPath.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSBezierPath+CGPath.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import AppKit 10 | 11 | extension NSBezierPath { 12 | 13 | /// Returns the CGPath representation of an NSBezierPath 14 | /// 15 | /// Source: https://gist.github.com/mayoff/d6d9738860ef2d0ac4055f0d12c21533#gistcomment-1931729 16 | public var cgPath: CGPath { 17 | let path = CGMutablePath() 18 | var points = [CGPoint](repeating: .zero, count: 3) 19 | 20 | for i in 0 ..< self.elementCount { 21 | let type = self.element(at: i, associatedPoints: &points) 22 | 23 | switch type { 24 | 25 | case .moveTo: 26 | path.move(to: CGPoint(x: points[0].x, y: points[0].y) ) 27 | 28 | case .lineTo: 29 | path.addLine(to: CGPoint(x: points[0].x, y: points[0].y) ) 30 | 31 | case .curveTo: 32 | path.addCurve(to: CGPoint(x: points[2].x, y: points[2].y), 33 | control1: CGPoint(x: points[0].x, y: points[0].y), 34 | control2: CGPoint(x: points[1].x, y: points[1].y) ) 35 | 36 | case .closePath: 37 | path.closeSubpath() 38 | 39 | } 40 | } 41 | return path 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Sources/macOS/NSBezierPath+InitWithArc.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSBezierPath+InitWithArc.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import AppKit 10 | 11 | extension NSBezierPath { 12 | 13 | /// Initialises an NSBezierPath with an arc of a circle. This is meant to 14 | /// mimic the corresponding UIBezierPath API, for use in SpriteKit, and so 15 | /// it does not conform strictly to any of the three's conventions. 16 | /// 17 | /// The angle accepted is in radians, whereas AppKit expects degrees 18 | /// 19 | /// The clockwise direction is also negated whike rendering, because 20 | /// while SpriteKit renders opposite to UIKit expectations because of the 21 | /// flipped co-ordinate space, requiring passing `true` for `false` and vice 22 | /// versa, it follows AppKit's expectations. However this library is 23 | /// UIKit-first, so flipping the direction is required. 24 | /// 25 | /// - Parameters: 26 | /// - center: The center of the circle 27 | /// - radius: The radius of the circle 28 | /// - startAngle: The starting angle for the arc, in radians 29 | /// - endAngle: The ending angle for the arc, in radians 30 | /// - clockwise: Whether the arc should 31 | convenience init(arcCenter center: CGPoint, 32 | radius: CGFloat, 33 | startAngle: CGFloat, 34 | endAngle: CGFloat, 35 | clockwise: Bool) { 36 | self.init() 37 | self.appendArc(withCenter: center, 38 | radius: radius, 39 | startAngle: startAngle * 180 / .pi, 40 | endAngle: endAngle * 180 / .pi, 41 | clockwise: !clockwise) 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Sources/macOS/NSColor+RGBA.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSColor+RGBA.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 01/11/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import AppKit 10 | 11 | extension NSColor { 12 | 13 | /// Returns the red, green, blue, and alpha components 14 | /// 15 | /// This never returns nil; the returntype is optional purely for 16 | /// consistency with the UIColor API 17 | /// 18 | /// This raises an exception if the conversion to an RGBA colorspace wasn't 19 | /// successful 20 | var rgba: (CGFloat, CGFloat, CGFloat, CGFloat)? { 21 | var values: (CGFloat, CGFloat, CGFloat, CGFloat) = (0, 0, 0, 0) 22 | getRed(&values.0, green: &values.1, blue: &values.2, alpha: &values.3) 23 | return values 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Sources/watchOS/CACurrentMediaTime.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CACurrentMediaTime.swift 3 | // ActivityRings watchOS 4 | // 5 | // Created by Cal Stephens on 10/17/18. 6 | // Copyright © 2018 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // watchOS doesn't have CoreAnimation, 12 | // so we need to create our own implementation of `CACurrentMediaTime`. 13 | 14 | #if !canImport(CoreAnimation) 15 | fileprivate var cached_mach_timebase_info = mach_timebase_info_data_t() 16 | 17 | func CACurrentMediaTime() -> CFTimeInterval { 18 | 19 | // retrieve the `mach_timebase_info` if it hasn't been retreived yet 20 | if cached_mach_timebase_info.numer == mach_timebase_info_data_t().numer 21 | && cached_mach_timebase_info.numer == mach_timebase_info_data_t().denom 22 | { 23 | mach_timebase_info(&cached_mach_timebase_info) 24 | } 25 | 26 | let nanos = Double(mach_absolute_time() * UInt64(cached_mach_timebase_info.numer)) / Double(cached_mach_timebase_info.denom) 27 | return nanos / 1.0e9; 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /Tests/ActivityRingsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityRingsTests.swift 3 | // ActivityRingsTests 4 | // 5 | // Created by Harshil Shah on 14/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import ActivityRings 11 | 12 | class ActivityRingsTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Tests/AnimatorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnimatorTests.swift 3 | // ActivityRings 4 | // 5 | // Created by Harshil Shah on 18/10/17. 6 | // Copyright © 2017 Harshil Shah. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import ActivityRings 11 | 12 | class AnimatorTests: XCTestCase { 13 | 14 | private var animator: Animator! 15 | private let now = CACurrentMediaTime() 16 | 17 | override func setUp() { 18 | super.setUp() 19 | animator = Animator(from: 0, to: 10, startTime: now, duration: 1) 20 | } 21 | 22 | func testIsAnimating() { 23 | XCTAssert(animator.isAnimating(at: now + 0.25) == true) 24 | XCTAssert(animator.isAnimating(at: now + 0.50) == true) 25 | XCTAssert(animator.isAnimating(at: now + 0.75) == true) 26 | XCTAssert(animator.isAnimating(at: now + 1.00) == true) 27 | XCTAssert(animator.isAnimating(at: now + 1.01) == false) 28 | } 29 | 30 | func testValues() { 31 | XCTAssert(animator.value(at: now + 0.25) == 1.25) 32 | XCTAssert(animator.value(at: now + 0.50) == 5) 33 | XCTAssert(animator.value(at: now + 0.75) == 8.75) 34 | XCTAssert(animator.value(at: now + 1.00) == 10) 35 | XCTAssert(animator.value(at: now + 1.01) == 10) 36 | } 37 | 38 | override func tearDown() { 39 | super.tearDown() 40 | animator = nil 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Tests/Supporting Files/Info-tvOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Tests/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | --------------------------------------------------------------------------------