├── .gitignore ├── CONTRIBUTING.md ├── ChessClock.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── ChessClock.xcworkspace └── contents.xcworkspacedata ├── ChessClock ├── CHAppDelegate.h ├── CHAppDelegate.m ├── ChessClock-Info.plist ├── ChessClock-Prefix.pch ├── Classes │ ├── Model │ │ ├── CHChessClock.h │ │ ├── CHChessClock.m │ │ ├── CHTimePiece.h │ │ ├── CHTimePiece.m │ │ └── Settings │ │ │ ├── CHChessClockBronsteinIncrement.h │ │ │ ├── CHChessClockBronsteinIncrement.m │ │ │ ├── CHChessClockDelayIncrement.h │ │ │ ├── CHChessClockDelayIncrement.m │ │ │ ├── CHChessClockFischerIncrement.h │ │ │ ├── CHChessClockFischerIncrement.m │ │ │ ├── CHChessClockIncrement.h │ │ │ ├── CHChessClockIncrement.m │ │ │ ├── CHChessClockSettings.h │ │ │ ├── CHChessClockSettings.m │ │ │ ├── CHChessClockSettingsManager.h │ │ │ ├── CHChessClockSettingsManager.m │ │ │ ├── CHChessClockTimeControl.h │ │ │ ├── CHChessClockTimeControl.m │ │ │ ├── CHChessClockTimeControlStage.h │ │ │ ├── CHChessClockTimeControlStage.m │ │ │ ├── CHChessClockTimeControlStageManager.h │ │ │ └── CHChessClockTimeControlStageManager.m │ ├── Other │ │ ├── CHSoundPlayer.h │ │ ├── CHSoundPlayer.m │ │ ├── CHUtil.h │ │ ├── CHUtil.m │ │ ├── UIColor+ChessClock.h │ │ └── UIColor+ChessClock.m │ ├── ViewControllers │ │ ├── CHChessClockIncrementTableViewController.h │ │ ├── CHChessClockIncrementTableViewController.m │ │ ├── CHChessClockSettingsTableViewController.h │ │ ├── CHChessClockSettingsTableViewController.m │ │ ├── CHChessClockTimeControlStageTableViewController.h │ │ ├── CHChessClockTimeControlStageTableViewController.m │ │ ├── CHChessClockTimeControlTabBarController.h │ │ ├── CHChessClockTimeControlTabBarController.m │ │ ├── CHChessClockTimeControlTableViewController.h │ │ ├── CHChessClockTimeControlTableViewController.m │ │ ├── CHChessClockTimeViewController.h │ │ ├── CHChessClockTimeViewController.m │ │ ├── CHChessClockViewController.h │ │ └── CHChessClockViewController.m │ └── Views │ │ ├── CHIncrementCell.h │ │ ├── CHIncrementCell.m │ │ ├── CHTableViewCell.h │ │ ├── CHTableViewCell.m │ │ ├── CHTableViewHeader.h │ │ ├── CHTableViewHeader.m │ │ ├── CHTimePieceView.h │ │ └── CHTimePieceView.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x-1.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x-1.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x-1.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ └── iTunesArtwork@2x.png │ ├── Contents.json │ ├── chessClock_timeStageCompleted.imageset │ │ ├── Contents.json │ │ ├── chessClock_timeStageCompleted.png │ │ └── chessClock_timeStageCompleted@2x.png │ ├── chessClock_timeStageNotCompleted.imageset │ │ ├── Contents.json │ │ ├── chessClock_timeStageNotCompleted.png │ │ └── chessClock_timeStageNotCompleted@2x.png │ ├── chessClock_timeUpTimePiece.imageset │ │ ├── Contents.json │ │ ├── chessClock_timeUpTimePiece.png │ │ └── chessClock_timeUpTimePiece@2x.png │ ├── chess_logo.imageset │ │ ├── Contents.json │ │ ├── logoWhiteCopy3@2x.png │ │ └── logoWhiteCopy3@3x.png │ ├── rectLightOrangeButton.imageset │ │ ├── Contents.json │ │ ├── rectLightOrangeButton.png │ │ └── rectLightOrangeButton@2x.png │ ├── rectLightOrangeButtonPressed.imageset │ │ ├── Contents.json │ │ ├── rectLightOrangeButtonPressed.png │ │ └── rectLightOrangeButtonPressed@2x.png │ ├── tabBarUser.imageset │ │ ├── Contents.json │ │ ├── PlayerSelected.png │ │ ├── PlayerSelected@2x.png │ │ └── PlayerSelected@3x.png │ └── tabBarUser2.imageset │ │ ├── Contents.json │ │ ├── PlayerUnselected.png │ │ ├── PlayerUnselected@2x.png │ │ └── PlayerUnselected@3x.png ├── Resources │ ├── fonts │ │ └── ChessGlyph-Regular.ttf │ ├── interface │ │ ├── storyboards │ │ │ ├── CHClock.storyboard │ │ │ └── Launch Screen.storyboard │ │ └── xibs │ │ │ ├── CHChessClockIncrementView.xib │ │ │ ├── CHChessClockStageMovesCell.xib │ │ │ ├── CHChessClockTimeControlNameCell.xib │ │ │ ├── CHChessClockTimeControlStageView.xib │ │ │ ├── CHChessClockTimeControlView.xib │ │ │ ├── CHChessClockTimeView.xib │ │ │ ├── CHIncrementCell.xib │ │ │ └── CHTableViewHeader.xib │ ├── plist │ │ └── DefaultChessClockSettings.plist │ └── sounds │ │ ├── pause.wav │ │ ├── reset.wav │ │ ├── start.wav │ │ ├── switch1.mp3 │ │ ├── switch2.mp3 │ │ └── timeEnded.wav ├── Third Party │ ├── Crashlytics.framework │ │ ├── Crashlytics │ │ ├── Headers │ │ │ ├── ANSCompatibility.h │ │ │ ├── Answers.h │ │ │ ├── CLSAttributes.h │ │ │ ├── CLSLogging.h │ │ │ ├── CLSReport.h │ │ │ ├── CLSStackFrame.h │ │ │ └── Crashlytics.h │ │ ├── Info.plist │ │ ├── Modules │ │ │ └── module.modulemap │ │ ├── run │ │ ├── submit │ │ └── uploadDSYM │ └── Fabric.framework │ │ ├── Fabric │ │ ├── Headers │ │ ├── FABAttributes.h │ │ └── Fabric.h │ │ ├── Info.plist │ │ ├── Modules │ │ └── module.modulemap │ │ ├── run │ │ └── uploadDSYM ├── en.lproj │ └── InfoPlist.strings └── main.m ├── ChessClockTests ├── ChessClockTests-Info.plist ├── ChessClockTests.m └── en.lproj │ └── InfoPlist.strings ├── Fabric.framework ├── Fabric ├── Headers │ ├── FABAttributes.h │ └── Fabric.h ├── Info.plist ├── Modules │ └── module.modulemap ├── run └── uploadDSYM ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ └── ObjectAL-for-iPhone │ │ │ ├── ALBuffer.h │ │ │ ├── ALCaptureDevice.h │ │ │ ├── ALChannelSource.h │ │ │ ├── ALContext.h │ │ │ ├── ALDevice.h │ │ │ ├── ALListener.h │ │ │ ├── ALSoundSource.h │ │ │ ├── ALSoundSourcePool.h │ │ │ ├── ALSource.h │ │ │ ├── ALTypes.h │ │ │ ├── ALWrapper.h │ │ │ ├── ARCSafe_MemMgmt.h │ │ │ ├── NSMutableArray+WeakReferences.h │ │ │ ├── NSMutableDictionary+WeakReferences.h │ │ │ ├── OALAction+Private.h │ │ │ ├── OALAction.h │ │ │ ├── OALActionManager.h │ │ │ ├── OALAudioActions.h │ │ │ ├── OALAudioFile.h │ │ │ ├── OALAudioSession.h │ │ │ ├── OALAudioTrack.h │ │ │ ├── OALAudioTrackNotifications.h │ │ │ ├── OALAudioTracks.h │ │ │ ├── OALNotifications.h │ │ │ ├── OALSimpleAudio.h │ │ │ ├── OALSuspendHandler.h │ │ │ ├── OALTools.h │ │ │ ├── OALUtilityActions.h │ │ │ ├── ObjectAL.h │ │ │ ├── ObjectALConfig.h │ │ │ ├── ObjectALMacros.h │ │ │ ├── OpenALManager.h │ │ │ ├── SynthesizeSingleton.h │ │ │ └── mach_timing.h │ └── Public │ │ └── ObjectAL-for-iPhone │ │ ├── ALBuffer.h │ │ ├── ALCaptureDevice.h │ │ ├── ALChannelSource.h │ │ ├── ALContext.h │ │ ├── ALDevice.h │ │ ├── ALListener.h │ │ ├── ALSoundSource.h │ │ ├── ALSoundSourcePool.h │ │ ├── ALSource.h │ │ ├── ALTypes.h │ │ ├── ALWrapper.h │ │ ├── ARCSafe_MemMgmt.h │ │ ├── NSMutableArray+WeakReferences.h │ │ ├── NSMutableDictionary+WeakReferences.h │ │ ├── OALAction+Private.h │ │ ├── OALAction.h │ │ ├── OALActionManager.h │ │ ├── OALAudioActions.h │ │ ├── OALAudioFile.h │ │ ├── OALAudioSession.h │ │ ├── OALAudioTrack.h │ │ ├── OALAudioTrackNotifications.h │ │ ├── OALAudioTracks.h │ │ ├── OALNotifications.h │ │ ├── OALSimpleAudio.h │ │ ├── OALSuspendHandler.h │ │ ├── OALTools.h │ │ ├── OALUtilityActions.h │ │ ├── ObjectAL.h │ │ ├── ObjectALConfig.h │ │ ├── ObjectALMacros.h │ │ ├── OpenALManager.h │ │ ├── SynthesizeSingleton.h │ │ └── mach_timing.h ├── Manifest.lock ├── ObjectAL-for-iPhone │ ├── ObjectAL │ │ ├── LICENSE.ObjectAL.txt │ │ └── ObjectAL │ │ │ ├── Actions │ │ │ ├── OALAction+Private.h │ │ │ ├── OALAction.h │ │ │ ├── OALAction.m │ │ │ ├── OALActionManager.h │ │ │ ├── OALActionManager.m │ │ │ ├── OALAudioActions.h │ │ │ ├── OALAudioActions.m │ │ │ ├── OALUtilityActions.h │ │ │ └── OALUtilityActions.m │ │ │ ├── AudioTrack │ │ │ ├── OALAudioTrack.h │ │ │ ├── OALAudioTrack.m │ │ │ ├── OALAudioTrackNotifications.h │ │ │ ├── OALAudioTrackNotifications.m │ │ │ ├── OALAudioTracks.h │ │ │ └── OALAudioTracks.m │ │ │ ├── OALSimpleAudio.h │ │ │ ├── OALSimpleAudio.m │ │ │ ├── ObjectAL.h │ │ │ ├── ObjectALConfig.h │ │ │ ├── OpenAL │ │ │ ├── ALBuffer.h │ │ │ ├── ALBuffer.m │ │ │ ├── ALCaptureDevice.h │ │ │ ├── ALCaptureDevice.m │ │ │ ├── ALChannelSource.h │ │ │ ├── ALChannelSource.m │ │ │ ├── ALContext.h │ │ │ ├── ALContext.m │ │ │ ├── ALDevice.h │ │ │ ├── ALDevice.m │ │ │ ├── ALListener.h │ │ │ ├── ALListener.m │ │ │ ├── ALSoundSource.h │ │ │ ├── ALSoundSourcePool.h │ │ │ ├── ALSoundSourcePool.m │ │ │ ├── ALSource.h │ │ │ ├── ALSource.m │ │ │ ├── ALTypes.h │ │ │ ├── ALWrapper.h │ │ │ ├── ALWrapper.m │ │ │ ├── OpenALManager.h │ │ │ └── OpenALManager.m │ │ │ ├── Session │ │ │ ├── OALAudioSession.h │ │ │ ├── OALAudioSession.m │ │ │ ├── OALSuspendHandler.h │ │ │ └── OALSuspendHandler.m │ │ │ └── Support │ │ │ ├── ARCSafe_MemMgmt.h │ │ │ ├── NSMutableArray+WeakReferences.h │ │ │ ├── NSMutableArray+WeakReferences.m │ │ │ ├── NSMutableDictionary+WeakReferences.h │ │ │ ├── NSMutableDictionary+WeakReferences.m │ │ │ ├── OALAudioFile.h │ │ │ ├── OALAudioFile.m │ │ │ ├── OALNotifications.h │ │ │ ├── OALTools.h │ │ │ ├── OALTools.m │ │ │ ├── ObjectALMacros.h │ │ │ ├── SynthesizeSingleton.h │ │ │ ├── mach_timing.c │ │ │ └── mach_timing.h │ └── README.mdown ├── Pods.xcodeproj │ └── project.pbxproj └── Target Support Files │ ├── ObjectAL-for-iPhone │ ├── ObjectAL-for-iPhone-dummy.m │ ├── ObjectAL-for-iPhone-prefix.pch │ └── ObjectAL-for-iPhone.xcconfig │ ├── Pods-ChessClock │ ├── Pods-ChessClock-acknowledgements.markdown │ ├── Pods-ChessClock-acknowledgements.plist │ ├── Pods-ChessClock-dummy.m │ ├── Pods-ChessClock-frameworks.sh │ ├── Pods-ChessClock-resources.sh │ ├── Pods-ChessClock.debug.xcconfig │ └── Pods-ChessClock.release.xcconfig │ └── Pods-ChessClockTests │ ├── Pods-ChessClockTests-acknowledgements.markdown │ ├── Pods-ChessClockTests-acknowledgements.plist │ ├── Pods-ChessClockTests-dummy.m │ ├── Pods-ChessClockTests-frameworks.sh │ ├── Pods-ChessClockTests-resources.sh │ ├── Pods-ChessClockTests.debug.xcconfig │ └── Pods-ChessClockTests.release.xcconfig └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata/ 2 | xcshareddata/ 3 | .svn/ 4 | *.xccheckout 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | ## The basics 4 | * Submit a ticket for your issue, if one does not already exist. 5 | * [Fork](https://help.github.com/articles/fork-a-repo/) the repo. 6 | * Do some work, and file a [pull request](https://help.github.com/articles/about-pull-requests/). 7 | 8 | ## Git guidelines 9 | * Branches should be based on *develop* 10 | * To create a branch: `git checkout develop && git pull && git checkout -b issue-abc-comment` 11 | * Pull requests must be rebased onto the latest from *develop* before they will be merged. 12 | * Make your commits logical units. Commits messages should look like: `git commit -m "Issue abc. Comment goes here"` 13 | -------------------------------------------------------------------------------- /ChessClock.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ChessClock.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ChessClock/CHAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHAppDelegate.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Bolaños on 3/3/14. 6 | // Copyright (c) 2014 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CHAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ChessClock/CHAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHAppDelegate.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Bolaños on 3/3/14. 6 | // Copyright (c) 2014 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "CHAppDelegate.h" 10 | 11 | #import "CHChessClockViewController.h" 12 | 13 | #import "CHUtil.h" 14 | #import "CHSoundPlayer.h" 15 | #import "UIColor+ChessClock.h" 16 | 17 | #import 18 | #import 19 | 20 | @implementation CHAppDelegate 21 | 22 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 23 | { 24 | [self configureAppearance]; 25 | [self configureViewHierarchy]; 26 | [self configureFabric]; 27 | [[CHSoundPlayer sharedSoundPlayer] preloadSounds]; 28 | 29 | return YES; 30 | } 31 | 32 | - (void)configureAppearance 33 | { 34 | [[UINavigationBar appearance] setBarTintColor:[UIColor navigationBarTintColor]]; 35 | [[UINavigationBar appearance] setTintColor:[UIColor navigationBarTextColor]]; 36 | [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor navigationBarTextColor]}]; 37 | [[UINavigationBar appearance] setBarStyle:UIBarStyleBlack]; 38 | [[UITabBar appearance] setBarTintColor:[UIColor navigationBarTintColor]]; 39 | [[UITabBar appearance] setTintColor:[UIColor navigationBarTextColor]]; 40 | } 41 | 42 | - (void)configureViewHierarchy 43 | { 44 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 45 | UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"CHClock" bundle:nil]; 46 | UINavigationController *navigationController = [storyboard instantiateInitialViewController]; 47 | self.window.rootViewController = navigationController; 48 | [self.window makeKeyAndVisible]; 49 | } 50 | 51 | - (void)configureFabric 52 | { 53 | [Fabric with:@[[Crashlytics class]]]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /ChessClock/ChessClock-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.2.4 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 2 25 | Fabric 26 | 27 | APIKey 28 | 47969ba8b0f44f287503d0c51b95040668dfa536 29 | Kits 30 | 31 | 32 | KitInfo 33 | 34 | KitName 35 | Crashlytics 36 | 37 | 38 | 39 | ITSAppUsesNonExemptEncryption 40 | 41 | LSRequiresIPhoneOS 42 | 43 | UIAppFonts 44 | 45 | ChessGlyph-Regular.otf 46 | 47 | UILaunchStoryboardName 48 | Launch Screen 49 | UIRequiredDeviceCapabilities 50 | 51 | armv7 52 | 53 | UIRequiresFullScreen 54 | 55 | UIStatusBarHidden 56 | 57 | UISupportedInterfaceOrientations 58 | 59 | UIInterfaceOrientationPortrait 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | UIInterfaceOrientationPortraitUpsideDown 63 | 64 | UISupportedInterfaceOrientations~ipad 65 | 66 | UIInterfaceOrientationPortrait 67 | UIInterfaceOrientationLandscapeLeft 68 | UIInterfaceOrientationLandscapeRight 69 | 70 | UIViewControllerBasedStatusBarAppearance 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /ChessClock/ChessClock-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | 17 | #define IS_SCREEN_4_INCHES ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON ) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/CHChessClock.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClock.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/22/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClock; 12 | @class CHTimePiece; 13 | @class CHChessClockTimeControl; 14 | 15 | //------------------------------------------------------------------------------ 16 | #pragma mark - CHEChessClockDelegate protocol 17 | //------------------------------------------------------------------------------ 18 | @protocol CHChessClockDelegate 19 | 20 | - (void)chessClock:(CHChessClock*)chessClock availableTimeUpdatedForTimePiece:(CHTimePiece*)timePiece; 21 | - (void)chessClock:(CHChessClock*)chessClock movesCountUpdatedForTimePiece:(CHTimePiece*)timePiece; 22 | - (void)chessClock:(CHChessClock*)chessClock stageUpdatedForTimePiece:(CHTimePiece*)timePiece; 23 | - (void)chessClockTimeEnded:(CHChessClock*)chessClock withLastActiveTimePiece:(CHTimePiece*)timePiece; 24 | 25 | @end 26 | 27 | //------------------------------------------------------------------------------ 28 | #pragma mark - CHChessClock 29 | //------------------------------------------------------------------------------ 30 | @interface CHChessClock : NSObject 31 | 32 | @property (assign, nonatomic, readonly) BOOL paused; 33 | @property (assign, nonatomic, readonly) BOOL timeEnded; 34 | 35 | @property (strong, nonatomic) CHTimePiece* playerOneTimePiece; 36 | @property (strong, nonatomic) CHTimePiece* playerTwoTimePiece; 37 | 38 | - (instancetype)initWithTimeControl:(CHChessClockTimeControl *)timeControl 39 | delegate:(id)delegate; 40 | - (void)cleanup; 41 | - (void)touchedTimePieceWithId:(NSUInteger)timePieceId; 42 | - (void)togglePause; 43 | - (void)resetWithTimeControl:(CHChessClockTimeControl *)timeControl; 44 | - (BOOL)isActive; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/CHTimePiece.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHTimePiece.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/22/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHTimePiece; 12 | @class CHChessClockIncrement; 13 | @class CHChessClockTimeControlStageManager; 14 | @class CHChessClockSettings; 15 | 16 | //------------------------------------------------------------------------------ 17 | #pragma mark - CHTimePieceDelegate 18 | //------------------------------------------------------------------------------ 19 | @protocol CHTimePieceDelegate 20 | 21 | - (void)timePieceAvailableTimeUpdated:(CHTimePiece*)timePiece; 22 | - (void)timePieceTotalMovesCountUpdated:(CHTimePiece*)timePiece; 23 | - (void)timePieceUpdatedStage:(CHTimePiece*)timePiece; 24 | 25 | @end 26 | 27 | //------------------------------------------------------------------------------ 28 | #pragma mark - CHTimePiece 29 | //------------------------------------------------------------------------------ 30 | @interface CHTimePiece : NSObject 31 | 32 | @property (weak, nonatomic) id delegate; 33 | @property (assign, nonatomic) BOOL updateAvailableTime; 34 | @property (strong, nonatomic) CHChessClockTimeControlStageManager* stageManager; 35 | 36 | @property (assign, nonatomic, readonly) NSUInteger timePieceId; 37 | @property (assign, nonatomic, readonly) NSUInteger stageIndex; 38 | @property (assign, nonatomic, readonly) NSTimeInterval availableTime; 39 | @property (assign, nonatomic, readonly) NSUInteger totalMovesCount; 40 | 41 | @property (nonatomic, readonly) CHChessClockSettings *settings; 42 | 43 | - (id)initWithTimePieceId:(NSUInteger)timePieceId 44 | settings:(CHChessClockSettings *)settings; 45 | 46 | - (void)updateWithDelta:(NSTimeInterval)delta; 47 | - (void)increaseAvailableTimeBy:(float)incrementValue; 48 | - (void)start; 49 | - (void)stop; 50 | - (void)resetWithSettings:(CHChessClockSettings *)settings; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockBronsteinIncrement.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockBronsteinIncrement.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/25/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockIncrement.h" 10 | 11 | @interface CHChessClockBronsteinIncrement : CHChessClockIncrement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockBronsteinIncrement.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockBronsteinIncrement.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/25/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockBronsteinIncrement.h" 10 | #import "CHTimePiece.h" 11 | 12 | //------------------------------------------------------------------------------ 13 | #pragma mark - Private methods declarations 14 | //------------------------------------------------------------------------------ 15 | @interface CHChessClockBronsteinIncrement() 16 | 17 | @property (assign, nonatomic) NSTimeInterval accumulatedTime; 18 | 19 | @end 20 | 21 | //------------------------------------------------------------------------------ 22 | #pragma mark - CHChessClockBronsteinIncrement implementation 23 | //------------------------------------------------------------------------------ 24 | @implementation CHChessClockBronsteinIncrement 25 | 26 | - (void)timePieceStarted:(CHTimePiece*)timePiece 27 | { 28 | timePiece.updateAvailableTime = YES; 29 | self.accumulatedTime = 0; 30 | } 31 | 32 | - (void)updateWithDelta:(NSTimeInterval)delta andTimePiece:(CHTimePiece*)timePiece 33 | { 34 | self.accumulatedTime += delta; 35 | } 36 | 37 | - (void)timePieceStopped:(CHTimePiece*)timePiece 38 | { 39 | if (self.accumulatedTime > self.incrementValue) { 40 | [timePiece increaseAvailableTimeBy:self.incrementValue]; 41 | } 42 | else { 43 | [timePiece increaseAvailableTimeBy:self.accumulatedTime]; 44 | } 45 | } 46 | 47 | - (NSString*)description 48 | { 49 | return @"Bronstein"; 50 | } 51 | 52 | - (NSString*)incrementDescription 53 | { 54 | return NSLocalizedString(@"Players receive the used portion of the increment at the end of each turn.", nil); 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockDelayIncrement.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockDelayIncrement.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/25/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockIncrement.h" 10 | 11 | @interface CHChessClockDelayIncrement : CHChessClockIncrement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockDelayIncrement.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockDelayIncrement.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/25/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockDelayIncrement.h" 10 | #import "CHTimePiece.h" 11 | 12 | //------------------------------------------------------------------------------ 13 | #pragma mark - Private methods declarations 14 | //------------------------------------------------------------------------------ 15 | @interface CHChessClockDelayIncrement() 16 | 17 | @property (assign, nonatomic) NSTimeInterval accumulatedTime; 18 | 19 | @end 20 | 21 | //------------------------------------------------------------------------------ 22 | #pragma mark - CHChessClockDelayIncrement implementation 23 | //------------------------------------------------------------------------------ 24 | @implementation CHChessClockDelayIncrement 25 | 26 | - (void)timePieceStarted:(CHTimePiece*)timePiece 27 | { 28 | timePiece.updateAvailableTime = NO; 29 | self.accumulatedTime = 0; 30 | } 31 | 32 | - (void)updateWithDelta:(NSTimeInterval)delta andTimePiece:(CHTimePiece*)timePiece 33 | { 34 | if (!timePiece.updateAvailableTime) { 35 | self.accumulatedTime += delta; 36 | 37 | if (self.accumulatedTime >= self.incrementValue) { 38 | timePiece.updateAvailableTime = YES; 39 | } 40 | } 41 | } 42 | 43 | - (NSString*)description { 44 | 45 | return @"Delay"; 46 | } 47 | 48 | - (NSString*)incrementDescription 49 | { 50 | return NSLocalizedString(@"The player's clock starts after the delay period.", nil); 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockFischerIncrement.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockFischerIncrement.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockIncrement.h" 10 | 11 | @interface CHChessClockFischerIncrement : CHChessClockIncrement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockFischerIncrement.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockFischerIncrement.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockFischerIncrement.h" 10 | #import "CHTimePiece.h" 11 | 12 | @implementation CHChessClockFischerIncrement 13 | 14 | - (void)timePieceStarted:(CHTimePiece*)timePiece 15 | { 16 | timePiece.updateAvailableTime = YES; 17 | } 18 | 19 | - (void)timePieceStopped:(CHTimePiece*)timePiece 20 | { 21 | [timePiece increaseAvailableTimeBy:self.incrementValue]; 22 | } 23 | 24 | - (NSString*)description { 25 | 26 | return @"Fischer"; 27 | } 28 | 29 | - (NSString*)incrementDescription 30 | { 31 | return NSLocalizedString(@"Players receive a full increment at the end of each turn.", nil); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockIncrement.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockIncrement.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHTimePiece; 12 | 13 | @interface CHChessClockIncrement : NSObject 14 | 15 | @property (assign, nonatomic) NSUInteger incrementValue; 16 | 17 | - (id)initWithIncrementValue:(NSUInteger)incrementValue; 18 | 19 | - (void)timePieceStarted:(CHTimePiece*)timePiece; 20 | - (void)timePieceStopped:(CHTimePiece*)timePiece; 21 | - (void)updateWithDelta:(NSTimeInterval)delta andTimePiece:(CHTimePiece*)timePiece; 22 | - (NSString*)incrementDescription; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockIncrement.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockIncrement.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockIncrement.h" 10 | 11 | //------------------------------------------------------------------------------ 12 | #pragma mark - Private methods declarations 13 | //------------------------------------------------------------------------------ 14 | @interface CHChessClockIncrement() 15 | @end 16 | 17 | //------------------------------------------------------------------------------ 18 | #pragma mark - CHChessClockIncrement implementation 19 | //------------------------------------------------------------------------------ 20 | @implementation CHChessClockIncrement 21 | 22 | static NSString* const CHIncrementValueArchiveKey = @"value"; 23 | 24 | - (id)initWithIncrementValue:(NSUInteger)incrementValue 25 | { 26 | self = [super init]; 27 | if (self) { 28 | _incrementValue = incrementValue; 29 | } 30 | 31 | return self; 32 | } 33 | 34 | - (id)initWithCoder:(NSCoder *)aDecoder 35 | { 36 | self = [super init]; 37 | if (self) { 38 | _incrementValue = [aDecoder decodeIntegerForKey:CHIncrementValueArchiveKey]; 39 | } 40 | 41 | return self; 42 | } 43 | 44 | - (void)encodeWithCoder:(NSCoder *)aCoder 45 | { 46 | [aCoder encodeInteger:_incrementValue forKey:CHIncrementValueArchiveKey]; 47 | } 48 | 49 | - (void)timePieceStarted:(CHTimePiece*)timePiece 50 | { 51 | } 52 | 53 | - (void)timePieceStopped:(CHTimePiece*)timePiece 54 | { 55 | } 56 | 57 | - (void)updateWithDelta:(NSTimeInterval)delta andTimePiece:(CHTimePiece*)timePiece 58 | { 59 | 60 | } 61 | 62 | - (NSString*)incrementDescription 63 | { 64 | return nil; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockSettings.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockSetting.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockIncrement; 12 | @class CHChessClockTimeControlStageManager; 13 | 14 | @interface CHChessClockSettings : NSObject 15 | 16 | @property (strong, nonatomic) CHChessClockIncrement* increment; 17 | @property (strong, nonatomic) CHChessClockTimeControlStageManager* stageManager; 18 | 19 | - (id)initWithIncrement:(CHChessClockIncrement*)increment 20 | stageManager:(CHChessClockTimeControlStageManager*)stageManager; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockSettings.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockSetting.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockSettings.h" 10 | #import "CHChessClockIncrement.h" 11 | 12 | //------------------------------------------------------------------------------ 13 | #pragma mark - Private methods declarations 14 | //------------------------------------------------------------------------------ 15 | @interface CHChessClockSettings() 16 | 17 | @end 18 | 19 | //------------------------------------------------------------------------------ 20 | #pragma mark - CHChessClockSetting implementation 21 | //------------------------------------------------------------------------------ 22 | @implementation CHChessClockSettings 23 | 24 | static NSString* const CHIncrementArchiveKey = @"increment"; 25 | static NSString* const CHTimeStagesManagerArchiveKey = @"timeStagesManager"; 26 | 27 | - (instancetype)initWithIncrement:(CHChessClockIncrement *)increment 28 | stageManager:(CHChessClockTimeControlStageManager *)stageManager 29 | { 30 | self = [super init]; 31 | if (self) { 32 | _increment = increment; 33 | _stageManager = stageManager; 34 | } 35 | 36 | return self; 37 | } 38 | 39 | - (id)initWithCoder:(NSCoder *)aDecoder 40 | { 41 | self = [super init]; 42 | if (self) { 43 | _increment = [aDecoder decodeObjectForKey:CHIncrementArchiveKey]; 44 | _stageManager = [aDecoder decodeObjectForKey:CHTimeStagesManagerArchiveKey]; 45 | } 46 | 47 | return self; 48 | } 49 | 50 | - (void)encodeWithCoder:(NSCoder *)aCoder 51 | { 52 | [aCoder encodeObject:_increment forKey:CHIncrementArchiveKey]; 53 | [aCoder encodeObject:_stageManager forKey:CHTimeStagesManagerArchiveKey]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockSettingsManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockSettingsManager.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockTimeControl; 12 | 13 | @interface CHChessClockSettingsManager : NSObject 14 | 15 | @property (strong, nonatomic) CHChessClockTimeControl *timeControl; 16 | 17 | - (void)addTimeControl:(CHChessClockTimeControl *)timeControl; 18 | - (void)removeTimeControlAtIndex:(NSUInteger)index; 19 | - (void)moveTimeControlFrom:(NSUInteger)sourceIndex 20 | to:(NSUInteger)destinationIndex; 21 | 22 | - (NSArray *)allTimeControls; 23 | 24 | - (void)saveTimeControls; 25 | - (void)restoreDefaultClockSettings; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockTimeControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockTimeControl.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 2017-04-13. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockSettings; 12 | 13 | @interface CHChessClockTimeControl : NSObject 14 | 15 | @property (copy, nonatomic) NSString *name; 16 | @property (strong, nonatomic) CHChessClockSettings *playerOneSettings; 17 | @property (strong, nonatomic) CHChessClockSettings *playerTwoSettings; 18 | @property (assign, nonatomic) BOOL shouldDuplicateSettings; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockTimeControl.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockTimeControl.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 2017-04-13. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockTimeControl.h" 10 | #import "CHChessClockSettings.h" 11 | #import "CHChessClockIncrement.h" 12 | #import "CHChessClockTimeControlStageManager.h" 13 | #import "CHChessClockTimeControlStage.h" 14 | 15 | static NSString* const CHNameArchiveKey = @"name"; 16 | static NSString* const CHPlayerOneNameKey = @"playerOneSettings"; 17 | static NSString* const CHPlayerTwoNameKey = @"playerTwoSettings"; 18 | static NSString* const CHShouldDuplicateSettingsKey = @"shouldDuplicateSettings"; 19 | 20 | @interface CHChessClockTimeControl () 21 | @end 22 | 23 | @implementation CHChessClockTimeControl 24 | 25 | - (instancetype)initWithCoder:(NSCoder *)aDecoder 26 | { 27 | self = [super init]; 28 | if (self) { 29 | _name = [aDecoder decodeObjectForKey:CHNameArchiveKey]; 30 | _playerOneSettings = [aDecoder decodeObjectForKey:CHPlayerOneNameKey]; 31 | _playerTwoSettings = [aDecoder decodeObjectForKey:CHPlayerTwoNameKey]; 32 | _shouldDuplicateSettings = [[aDecoder decodeObjectForKey:CHShouldDuplicateSettingsKey] boolValue]; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | - (void)encodeWithCoder:(NSCoder *)aCoder 39 | { 40 | [aCoder encodeObject:_name forKey:CHNameArchiveKey]; 41 | [aCoder encodeObject:_playerOneSettings forKey:CHPlayerOneNameKey]; 42 | [aCoder encodeObject:_playerTwoSettings forKey:CHPlayerTwoNameKey]; 43 | [aCoder encodeObject:@(_shouldDuplicateSettings) forKey:CHShouldDuplicateSettingsKey]; 44 | } 45 | 46 | - (void)setShouldDuplicateSettings:(BOOL)shouldDuplicateSettings 47 | { 48 | _shouldDuplicateSettings = shouldDuplicateSettings; 49 | if (shouldDuplicateSettings) { 50 | Class IncrementClass = [self.playerOneSettings.increment class]; 51 | CHChessClockIncrement *increment = [[IncrementClass alloc] initWithIncrementValue:self.playerOneSettings.increment.incrementValue]; 52 | CHChessClockTimeControlStageManager *stageManager = [[CHChessClockTimeControlStageManager alloc] init]; 53 | 54 | for (CHChessClockTimeControlStage *stage in self.playerOneSettings.stageManager.timeControlStages) { 55 | CHChessClockTimeControlStage *newStage = [[CHChessClockTimeControlStage alloc] initWithMovesCount:stage.movesCount andMaximumTime:stage.maximumTime]; 56 | [stageManager addTimeStage:newStage]; 57 | } 58 | 59 | self.playerTwoSettings = [[CHChessClockSettings alloc] initWithIncrement:increment stageManager:stageManager]; 60 | } 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockTimeControlStage.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockTimeControlStage.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CHChessClockTimeControlStage : NSObject 12 | 13 | @property (assign, nonatomic) NSUInteger movesCount; 14 | @property (assign, nonatomic) NSUInteger maximumTime; 15 | 16 | - (id)initWithMovesCount:(NSUInteger)movesCount 17 | andMaximumTime:(NSUInteger)maximumTimeInSeconds; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockTimeControlStage.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockTimeControlStage.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHChessClockTimeControlStage.h" 10 | #import "CHUtil.h" 11 | 12 | //------------------------------------------------------------------------------ 13 | #pragma mark CHChessClockTimeControlStage implementation 14 | //------------------------------------------------------------------------------ 15 | @implementation CHChessClockTimeControlStage 16 | 17 | static NSString* const CHMovesCountArchiveKey = @"movesCount"; 18 | static NSString* const CHMaximumTimeArchiveKey = @"maximumTime"; 19 | 20 | - (id)initWithMovesCount:(NSUInteger)movesCount 21 | andMaximumTime:(NSUInteger)maximumTimeInSeconds 22 | { 23 | self = [super init]; 24 | if (self) { 25 | _movesCount = movesCount; 26 | _maximumTime = maximumTimeInSeconds; 27 | } 28 | 29 | return self; 30 | } 31 | 32 | - (id)initWithCoder:(NSCoder *)aDecoder 33 | { 34 | self = [super init]; 35 | if (self) { 36 | _movesCount = [aDecoder decodeIntegerForKey:CHMovesCountArchiveKey]; 37 | _maximumTime = [aDecoder decodeIntegerForKey:CHMaximumTimeArchiveKey]; 38 | } 39 | 40 | return self; 41 | } 42 | 43 | - (void)encodeWithCoder:(NSCoder *)aCoder 44 | { 45 | [aCoder encodeInteger:_movesCount forKey:CHMovesCountArchiveKey]; 46 | [aCoder encodeInteger:_maximumTime forKey:CHMaximumTimeArchiveKey]; 47 | } 48 | 49 | - (NSString*)description 50 | { 51 | if (self.maximumTime != 0) { 52 | NSString* maximumTimeString = [CHUtil formatTime:self.maximumTime showTenths:NO]; 53 | 54 | if (self.maximumTime < 60) { 55 | NSString* secondsString = NSLocalizedString(@"secs", @"Abbreviation for seconds"); 56 | if (self.maximumTime == 1) { 57 | secondsString = NSLocalizedString(@"sec", @"Abbreviation for second"); 58 | } 59 | 60 | maximumTimeString = [NSString stringWithFormat:@"%ld %@", (long)self.maximumTime, secondsString]; 61 | } 62 | 63 | if (self.movesCount != 0) { 64 | NSString* movesString = NSLocalizedString(@"moves in", nil); 65 | if (self.movesCount == 1) { 66 | movesString = NSLocalizedString(@"move in", nil); 67 | } 68 | 69 | return [NSString stringWithFormat:@"%ld %@ %@", (long)self.movesCount, movesString, maximumTimeString]; 70 | } 71 | else { 72 | return [NSString stringWithFormat:@"%@ %@", NSLocalizedString(@"Game in", nil), maximumTimeString]; 73 | } 74 | } 75 | 76 | return nil; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockTimeControlStageManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockTimeControlStageManager.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/29/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockTimeControlStage; 12 | 13 | @interface CHChessClockTimeControlStageManager : NSObject 14 | 15 | - (void)addTimeStageWithMovesCount:(NSUInteger)movesCount 16 | andMaximumTime:(NSUInteger)maximumTime; 17 | 18 | - (void)addTimeStage:(CHChessClockTimeControlStage*)stage; 19 | - (void)removeTimeStageAtIndex:(NSUInteger)stageIndex; 20 | 21 | - (NSUInteger)stageCount; 22 | - (CHChessClockTimeControlStage*)stageAtIndex:(NSUInteger)stageIndex; 23 | - (NSUInteger)indexOfStage:(CHChessClockTimeControlStage*)stage; 24 | 25 | @property (readonly, nonatomic) NSMutableArray* timeControlStages; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ChessClock/Classes/Model/Settings/CHChessClockTimeControlStageManager.m: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // CHChessClockTimeControlStageManager.m 4 | // Chess.com 5 | // 6 | // Created by Pedro Bolaños on 10/29/12. 7 | // Copyright (c) 2012 psbt. All rights reserved. 8 | // 9 | 10 | #import "CHChessClockTimeControlStageManager.h" 11 | #import "CHChessClockTimeControlStage.h" 12 | 13 | //------------------------------------------------------------------------------ 14 | #pragma mark - Private methods declarations 15 | //------------------------------------------------------------------------------ 16 | @interface CHChessClockTimeControlStageManager() 17 | 18 | @property (strong, nonatomic) NSMutableArray* timeControlStages; 19 | 20 | @end 21 | 22 | //------------------------------------------------------------------------------ 23 | #pragma mark - CHChessClockTimeControlStageManager implementation 24 | //------------------------------------------------------------------------------ 25 | @implementation CHChessClockTimeControlStageManager 26 | 27 | static NSString* const CHTimeStagesArchiveKey = @"timeStages"; 28 | 29 | - (id)initWithCoder:(NSCoder *)aDecoder 30 | { 31 | self = [super init]; 32 | if (self) { 33 | self.timeControlStages = [aDecoder decodeObjectForKey:CHTimeStagesArchiveKey]; 34 | } 35 | 36 | return self; 37 | } 38 | 39 | - (void)encodeWithCoder:(NSCoder *)aCoder 40 | { 41 | [aCoder encodeObject:_timeControlStages forKey:CHTimeStagesArchiveKey]; 42 | } 43 | 44 | - (void)addTimeStageWithMovesCount:(NSUInteger)movesCount 45 | andMaximumTime:(NSUInteger)maximumTimeInSeconds 46 | { 47 | CHChessClockTimeControlStage* stage = [[CHChessClockTimeControlStage alloc] initWithMovesCount:movesCount 48 | andMaximumTime:maximumTimeInSeconds]; 49 | 50 | [self.timeControlStages addObject:stage]; 51 | } 52 | 53 | - (void)addTimeStage:(CHChessClockTimeControlStage*)stage 54 | { 55 | // Set a default move count to the existing stages 56 | [self.timeControlStages enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 57 | CHChessClockTimeControlStage* stage = obj; 58 | 59 | if (stage.movesCount == 0) { 60 | if (idx == 0) 61 | { 62 | stage.movesCount = 40; 63 | } 64 | else if (idx == 1) 65 | { 66 | stage.movesCount = 20; 67 | } 68 | } 69 | }]; 70 | 71 | [self.timeControlStages addObject:stage]; 72 | } 73 | 74 | - (void)removeTimeStageAtIndex:(NSUInteger)stageIndex 75 | { 76 | if (stageIndex < [self.timeControlStages count]) { 77 | [self.timeControlStages removeObjectAtIndex:stageIndex]; 78 | 79 | // The last stage can't have a number of moves 80 | CHChessClockTimeControlStage* stage = [self.timeControlStages lastObject]; 81 | stage.movesCount = 0; 82 | } 83 | } 84 | 85 | - (NSUInteger)stageCount 86 | { 87 | return [self.timeControlStages count]; 88 | } 89 | 90 | - (CHChessClockTimeControlStage*)stageAtIndex:(NSUInteger)stageIndex; 91 | { 92 | if (stageIndex < [self.timeControlStages count]) { 93 | return [self.timeControlStages objectAtIndex:stageIndex]; 94 | } 95 | 96 | return nil; 97 | } 98 | 99 | - (NSUInteger)indexOfStage:(CHChessClockTimeControlStage*)stage 100 | { 101 | return [self.timeControlStages indexOfObject:stage]; 102 | } 103 | 104 | //------------------------------------------------------------------------------ 105 | #pragma mark - Private methods definitions 106 | //------------------------------------------------------------------------------ 107 | - (NSMutableArray*)timeControlStages 108 | { 109 | if (_timeControlStages == nil) { 110 | _timeControlStages = [[NSMutableArray alloc] init]; 111 | } 112 | 113 | return _timeControlStages; 114 | } 115 | 116 | @end 117 | -------------------------------------------------------------------------------- /ChessClock/Classes/Other/CHSoundPlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHSoundPlayer.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 3/18/14. 6 | // Copyright (c) 2014 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CHSoundPlayer : NSObject 12 | 13 | + (instancetype)sharedSoundPlayer; 14 | 15 | - (void)preloadSounds; 16 | - (void)playSwitch1Sound; 17 | - (void)playSwitch2Sound; 18 | - (void)playStartSound; 19 | - (void)playEndSound; 20 | - (void)playResetSound; 21 | - (void)playPauseSound; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ChessClock/Classes/Other/CHSoundPlayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHSoundPlayer.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 3/18/14. 6 | // Copyright (c) 2014 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "CHSoundPlayer.h" 10 | 11 | #import "OALSimpleAudio.h" 12 | 13 | //------------------------------------------------------------------------------ 14 | #pragma mark - Private methods declarations 15 | //------------------------------------------------------------------------------ 16 | @interface CHSoundPlayer() 17 | 18 | @property (strong, nonatomic) OALSimpleAudio* oalSimpleAudio; 19 | 20 | @end 21 | 22 | //------------------------------------------------------------------------------ 23 | #pragma mark - CHSoundPlayer implementation 24 | //------------------------------------------------------------------------------ 25 | @implementation CHSoundPlayer 26 | 27 | static NSString* const kCHSwitchOneSoundName = @"switch1"; 28 | static NSString* const kCHSwitchTwoSoundName = @"switch2"; 29 | static NSString* const kCHStartSoundName = @"start"; 30 | static NSString* const kCHTimeEndedSoundName = @"timeEnded"; 31 | static NSString* const kCHResetSoundName = @"reset"; 32 | static NSString* const kCHPauseSoundName = @"pause"; 33 | 34 | + (instancetype)sharedSoundPlayer 35 | { 36 | static dispatch_once_t predicate = 0; 37 | __strong static id _sharedObject = nil; 38 | dispatch_once(&predicate, ^{ 39 | _sharedObject = [[self alloc] init]; 40 | }); 41 | 42 | return _sharedObject; 43 | } 44 | 45 | - (id)init 46 | { 47 | self = [super init]; 48 | if (self) 49 | { 50 | _oalSimpleAudio = [OALSimpleAudio sharedInstance]; 51 | _oalSimpleAudio.allowIpod = YES; 52 | _oalSimpleAudio.useHardwareIfAvailable = NO; 53 | _oalSimpleAudio.honorSilentSwitch = YES; 54 | } 55 | 56 | return self; 57 | } 58 | 59 | - (void)preloadSounds 60 | { 61 | [self.oalSimpleAudio preloadEffect:[self soundPathForSoundName:kCHSwitchOneSoundName withIsWav:NO]]; 62 | [self.oalSimpleAudio preloadEffect:[self soundPathForSoundName:kCHSwitchTwoSoundName withIsWav:NO]]; 63 | [self.oalSimpleAudio preloadEffect:[self soundPathForSoundName:kCHStartSoundName withIsWav:YES]]; 64 | [self.oalSimpleAudio preloadEffect:[self soundPathForSoundName:kCHTimeEndedSoundName withIsWav:YES]]; 65 | [self.oalSimpleAudio preloadEffect:[self soundPathForSoundName:kCHResetSoundName withIsWav:YES]]; 66 | [self.oalSimpleAudio preloadEffect:[self soundPathForSoundName:kCHPauseSoundName withIsWav:YES]]; 67 | } 68 | 69 | - (void)playSwitch1Sound 70 | { 71 | [self.oalSimpleAudio playEffect:[self soundPathForSoundName:kCHSwitchOneSoundName withIsWav:NO]]; 72 | } 73 | 74 | - (void)playSwitch2Sound 75 | { 76 | [self.oalSimpleAudio playEffect:[self soundPathForSoundName:kCHSwitchTwoSoundName withIsWav:NO]]; 77 | } 78 | 79 | - (void)playStartSound 80 | { 81 | [self.oalSimpleAudio playEffect:[self soundPathForSoundName:kCHStartSoundName withIsWav:YES]]; 82 | } 83 | 84 | - (void)playEndSound 85 | { 86 | [self.oalSimpleAudio playEffect:[self soundPathForSoundName:kCHTimeEndedSoundName withIsWav:YES]]; 87 | } 88 | 89 | - (void)playResetSound 90 | { 91 | [self.oalSimpleAudio playEffect:[self soundPathForSoundName:kCHResetSoundName withIsWav:YES]]; 92 | } 93 | 94 | - (void)playPauseSound 95 | { 96 | [self.oalSimpleAudio playEffect:[self soundPathForSoundName:kCHPauseSoundName withIsWav:YES]]; 97 | } 98 | 99 | //------------------------------------------------------------------------------ 100 | #pragma mark - Private methods definitions 101 | //------------------------------------------------------------------------------ 102 | - (NSString*)soundPathForSoundName:(NSString*)soundName withIsWav:(BOOL)isWav 103 | { 104 | NSString* type = @"wav"; 105 | if (!isWav) 106 | { 107 | type = @"mp3"; 108 | } 109 | 110 | return [[NSBundle mainBundle] pathForResource:soundName ofType:type]; 111 | } 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /ChessClock/Classes/Other/CHUtil.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHUtil.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 11/27/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CHUtil : NSObject 12 | 13 | + (NSString*)imageNameWithBaseName:(NSString*)baseImageName; 14 | + (NSString*)formatTime:(NSTimeInterval)timeInSeconds showTenths:(BOOL)showTenths; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ChessClock/Classes/Other/CHUtil.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHUtil.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 11/27/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHUtil.h" 10 | 11 | @implementation CHUtil 12 | 13 | + (NSString*)imageNameWithBaseName:(NSString*)baseImageName 14 | { 15 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 16 | baseImageName = [baseImageName stringByAppendingString:@"@2x"]; 17 | } 18 | 19 | return baseImageName; 20 | } 21 | 22 | + (NSString*)formatTime:(NSTimeInterval)timeInSeconds showTenths:(BOOL)showTenths 23 | { 24 | NSUInteger timeInSecondsInt = timeInSeconds; 25 | NSUInteger hours = timeInSeconds / 3600; 26 | NSUInteger seconds = timeInSecondsInt % 60; 27 | NSUInteger minutes = (timeInSecondsInt / 60) % 60; 28 | 29 | if (hours > 0) { 30 | if (showTenths) { 31 | return [NSString stringWithFormat:@"%ld:%02ld:%04.1f", (long)hours, (long)minutes, seconds + fmod(timeInSeconds, 1.0f)]; 32 | } 33 | 34 | return [NSString stringWithFormat:@"%ld:%02ld:%02ld", (long)hours, (long)minutes, (long)seconds]; 35 | } 36 | else { 37 | if (showTenths) { 38 | return [NSString stringWithFormat:@"%ld:%04.1f", (long)minutes, seconds + fmod(timeInSeconds, 1.0f)]; 39 | } 40 | 41 | return [NSString stringWithFormat:@"%ld:%02ld", (long)minutes, (long)seconds]; 42 | } 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ChessClock/Classes/Other/UIColor+ChessClock.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+ChessClock.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 2017-02-06. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (ChessClock) 12 | 13 | + (UIColor *)selectedTimePieceButtonColor; 14 | + (UIColor *)unselectedTimePieceButtonColor; 15 | + (UIColor *)timeEndedButtonColor; 16 | 17 | + (UIColor *)unselectedTimePieceTextColor; 18 | 19 | + (UIColor *)navigationBarTintColor; 20 | + (UIColor *)navigationBarTextColor; 21 | + (UIColor *)tableViewCellTextColor; 22 | @end 23 | -------------------------------------------------------------------------------- /ChessClock/Classes/Other/UIColor+ChessClock.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+ChessClock.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 2017-02-06. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "UIColor+ChessClock.h" 10 | 11 | @implementation UIColor (ChessClock) 12 | 13 | + (UIColor *)selectedTimePieceButtonColor 14 | { 15 | return [UIColor colorWithRed:227.0f / 255.0f green:143.0f / 255.0f blue:51.0f / 255.0f alpha:1.0f]; 16 | } 17 | 18 | + (UIColor *)unselectedTimePieceButtonColor 19 | { 20 | return [UIColor colorWithRed:111.0f / 255.0f green:107.0f / 255.0f blue:103.0f / 255.0f alpha:1.0f]; 21 | } 22 | 23 | + (UIColor *)timeEndedButtonColor 24 | { 25 | return [UIColor colorWithRed:179.0f / 255.0f green:52.0f / 255.0f blue:48.0f / 255.0f alpha:1.0f]; 26 | } 27 | 28 | + (UIColor *)unselectedTimePieceTextColor 29 | { 30 | return [UIColor colorWithRed:21.0f / 255.0f green:20.0f / 255.0f blue:18.0f / 255.0f alpha:1.0f]; 31 | } 32 | 33 | + (UIColor *)navigationBarTintColor 34 | { 35 | return [UIColor colorWithRed:39.0f / 255.0f green:37.0f / 255.0f blue:34.0f / 255.0f alpha:1.0f]; 36 | } 37 | 38 | + (UIColor *)navigationBarTextColor 39 | { 40 | return [UIColor colorWithRed:159.0f / 255.0f green:158.0f / 255.0f blue:157.0f / 255.0f alpha:1.0f]; 41 | } 42 | 43 | + (UIColor *)tableViewCellTextColor 44 | { 45 | return [UIColor colorWithRed:201.0f / 255.0f green:200.0f / 255.0f blue:200.0f / 255.0f alpha:1.0f]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /ChessClock/Classes/ViewControllers/CHChessClockIncrementTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHIncrementTableViewController.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 11/1/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockIncrementTableViewController; 12 | @class CHChessClockIncrement; 13 | 14 | //------------------------------------------------------------------------------ 15 | #pragma mark - CHChessClockIncrementViewControllerDelegate 16 | //------------------------------------------------------------------------------ 17 | @protocol CHChessClockIncrementTableViewControllerDelegate 18 | 19 | - (void)chessClockIncrementTableViewControllerUpdatedIncrement:(CHChessClockIncrementTableViewController*)viewController; 20 | 21 | @end 22 | 23 | //------------------------------------------------------------------------------ 24 | #pragma mark - CHIncrementTableViewController 25 | //------------------------------------------------------------------------------ 26 | @interface CHChessClockIncrementTableViewController : UITableViewController 27 | 28 | @property (weak, nonatomic) id delegate; 29 | @property (strong, nonatomic) CHChessClockIncrement* increment; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ChessClock/Classes/ViewControllers/CHChessClockSettingsTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockSettingsTableViewController.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/24/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockSettingsManager; 12 | @class CHChessClockSettings; 13 | @class CHChessClockSettingsTableViewController; 14 | @class CHChessClockTimeControl; 15 | 16 | @protocol CHChessClockSettingsTableViewControllerDelegate 17 | 18 | - (void)settingsTableViewController:(CHChessClockSettingsTableViewController *)viewController 19 | didUpdateTimeControl:(CHChessClockTimeControl *)timeControl; 20 | 21 | - (void)settingsTableViewControllerDidStartClock:(CHChessClockSettingsTableViewController *)viewController 22 | byResetting:(BOOL)didReset; 23 | 24 | @end 25 | 26 | //------------------------------------------------------------------------------ 27 | #pragma mark - CHChessClockSettingsTableViewController 28 | //------------------------------------------------------------------------------ 29 | @interface CHChessClockSettingsTableViewController : UIViewController 30 | 31 | @property (strong, nonatomic) CHChessClockSettingsManager* settingsManager; 32 | @property (weak, nonatomic) id delegate; 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ChessClock/Classes/ViewControllers/CHChessClockTimeControlStageTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHTimeControlStageTableViewController.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 11/1/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockTimeControlStageTableViewController; 12 | @class CHChessClockTimeControlStage; 13 | @class CHChessClockTimeControlStageManager; 14 | 15 | //------------------------------------------------------------------------------ 16 | #pragma mark - CHTimeControlStageTableViewControllerDelegate 17 | //------------------------------------------------------------------------------ 18 | @protocol CHChessClockTimeControlStageTableViewControllerDelegate 19 | 20 | - (void)timeControlStageTableViewControllerStageUpdated:(CHChessClockTimeControlStageTableViewController*)viewController; 21 | - (void)timeControlStageTableViewControllerStageDeleted:(CHChessClockTimeControlStageTableViewController*)viewController; 22 | 23 | @end 24 | 25 | //------------------------------------------------------------------------------ 26 | #pragma mark - CHTimeControlStageTableViewController 27 | //------------------------------------------------------------------------------ 28 | @interface CHChessClockTimeControlStageTableViewController : UITableViewController 29 | 30 | @property (weak, nonatomic) id delegate; 31 | 32 | @property (strong, nonatomic) CHChessClockTimeControlStage* timeControlStage; 33 | @property (strong, nonatomic) CHChessClockTimeControlStageManager* timeControlStageManager; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ChessClock/Classes/ViewControllers/CHChessClockTimeControlTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockTimeControlTabBarController.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 2017-04-03. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockTimeControlTabBarController; 12 | @class CHChessClockTimeControl; 13 | 14 | @protocol CHCHessClockTimeControlTabBarControllerDelegate 15 | 16 | - (void)timeControlTabBarController:(CHChessClockTimeControlTabBarController *)viewController 17 | createdTimeControl:(CHChessClockTimeControl *)timeControl; 18 | 19 | - (void)timeControlTabBarController:(CHChessClockTimeControlTabBarController *)viewController 20 | updatedTimeControl:(CHChessClockTimeControl *)timeControl; 21 | 22 | @end 23 | 24 | @interface CHChessClockTimeControlTabBarController : UITabBarController 25 | 26 | @property (weak, nonatomic) id timeControlTabBarDelegate; 27 | @property (strong, nonatomic) CHChessClockTimeControl* timeControl; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ChessClock/Classes/ViewControllers/CHChessClockTimeControlTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHTimeControlTableViewController.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/25/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockTimeControlTableViewController; 12 | @class CHChessClockSettings; 13 | 14 | //------------------------------------------------------------------------------ 15 | #pragma mark - CHChessClockTimeControlTableViewControllerDelegate 16 | //------------------------------------------------------------------------------ 17 | @protocol CHChessClockTimeControlTableViewControllerDelegate 18 | 19 | - (void)timeControlTableViewController:(CHChessClockTimeControlTableViewController *)viewController 20 | setName:(NSString *)name; 21 | 22 | - (void)timeControlTableViewController:(CHChessClockTimeControlTableViewController *)viewController 23 | didUpdateShouldDuplicateSettings:(BOOL)shouldDuplicateSettings; 24 | 25 | @end 26 | 27 | @protocol CHChessClockTimeControlTableViewControllerDataSource 28 | 29 | @property (strong, nonatomic) NSString *timeControlName; 30 | 31 | - (BOOL)timeControlTableViewcontrollerShouldDuplicateSettings:(CHChessClockTimeControlTableViewController *)viewController; 32 | 33 | @end 34 | 35 | //------------------------------------------------------------------------------ 36 | #pragma mark - CHTimeControlTableViewController 37 | //------------------------------------------------------------------------------ 38 | @interface CHChessClockTimeControlTableViewController : UITableViewController 39 | 40 | @property (weak, nonatomic) id delegate; 41 | @property (weak, nonatomic) id dataSource; 42 | @property (strong, nonatomic) CHChessClockSettings* settings; 43 | 44 | - (void)createDefaultSettings; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ChessClock/Classes/ViewControllers/CHChessClockTimeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockTimeViewController.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 11/1/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockTimeViewController; 12 | 13 | //------------------------------------------------------------------------------ 14 | #pragma mark - CHChessClockTimeViewControllerDelegate 15 | //------------------------------------------------------------------------------ 16 | @protocol CHChessClockTimeViewControllerDelegate 17 | 18 | - (void)chessClockTimeViewController:(CHChessClockTimeViewController*)timeViewController 19 | closedWithSelectedTime:(NSUInteger)timeInSeconds; 20 | 21 | @end 22 | 23 | //------------------------------------------------------------------------------ 24 | #pragma mark - CHChessClockTimeViewController 25 | //------------------------------------------------------------------------------ 26 | @interface CHChessClockTimeViewController : UIViewController 27 | 28 | @property (weak, nonatomic) id delegate; 29 | @property (assign, nonatomic) NSUInteger maximumHours; 30 | @property (assign, nonatomic) NSUInteger maximumMinutes; 31 | @property (assign, nonatomic) NSUInteger maximumSeconds; 32 | @property (assign, nonatomic) NSUInteger selectedTime; 33 | @property (assign, nonatomic) BOOL zeroSelectionAllowed; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ChessClock/Classes/ViewControllers/CHChessClockViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHChessClockViewController.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/22/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CHChessClockSettingsManager; 12 | @class CHTimePieceView; 13 | 14 | @interface CHChessClockViewController : UIViewController 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHIncrementCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHIncrementCell.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Bolaños on 6/27/17. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "CHTableViewCell.h" 10 | 11 | //------------------------------------------------------------------------------ 12 | #pragma mark - CHIncrementCellDelegate 13 | //------------------------------------------------------------------------------ 14 | @class CHIncrementCell; 15 | 16 | @protocol CHIncrementCellDelegate 17 | 18 | - (void)incrementCell:(CHIncrementCell*)cell changedToIncrementWithIndex:(NSUInteger)index; 19 | 20 | @end 21 | 22 | //------------------------------------------------------------------------------ 23 | #pragma mark - CHIncrementCell 24 | //------------------------------------------------------------------------------ 25 | @interface CHIncrementCell : CHTableViewCell 26 | 27 | @property (weak, nonatomic) id delegate; 28 | @property (weak, nonatomic) IBOutlet UILabel* descriptionLabel; 29 | @property (weak, nonatomic) IBOutlet UISegmentedControl* segmentedControl; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHIncrementCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHIncrementCell.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Bolaños on 6/27/17. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "CHIncrementCell.h" 10 | 11 | @implementation CHIncrementCell 12 | 13 | - (IBAction)segmentControlValueChanged 14 | { 15 | [self.delegate incrementCell:self changedToIncrementWithIndex:self.segmentedControl.selectedSegmentIndex]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHTableViewCell.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Bolaños on 6/27/17. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CHTableViewCell : UITableViewCell 12 | 13 | - (void)setupStyle; 14 | - (void)setupStyleWithShouldDuplicateSettings:(BOOL)shouldDuplicateSettings; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHTableViewCell.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Bolaños on 6/27/17. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "CHTableViewCell.h" 10 | 11 | #import "UIColor+ChessClock.h" 12 | 13 | @implementation CHTableViewCell 14 | 15 | - (void)setupStyle 16 | { 17 | [self setupStyleWithShouldDuplicateSettings:NO]; 18 | } 19 | 20 | - (void)setupStyleWithShouldDuplicateSettings:(BOOL)shouldDuplicateSettings 21 | { 22 | self.backgroundColor = [UIColor clearColor]; 23 | 24 | UIView* selectedBackgroundView = [[UIView alloc] init]; 25 | selectedBackgroundView.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.2f]; 26 | self.selectedBackgroundView = selectedBackgroundView; 27 | 28 | self.tintColor = [UIColor tableViewCellTextColor]; 29 | self.separatorInset = UIEdgeInsetsZero; 30 | self.textLabel.font = [UIFont boldSystemFontOfSize:16]; 31 | self.detailTextLabel.font = [UIFont systemFontOfSize:15.0f]; 32 | 33 | UIColor* textColor = shouldDuplicateSettings ? [UIColor darkGrayColor] : [UIColor tableViewCellTextColor]; 34 | self.textLabel.textColor = textColor; 35 | self.detailTextLabel.textColor = textColor; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHTableViewHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHTableViewHeader.h 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 2017-03-12. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CHTableViewHeader : UITableViewHeaderFooterView 12 | 13 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHTableViewHeader.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHTableViewHeader.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Mancheno on 2017-03-12. 6 | // Copyright © 2017 Chess.com. All rights reserved. 7 | // 8 | 9 | #import "CHTableViewHeader.h" 10 | 11 | @interface CHTableViewHeader() 12 | 13 | @property (weak, nonatomic) IBOutlet UIView *contentView; 14 | 15 | @end 16 | 17 | @implementation CHTableViewHeader 18 | 19 | @synthesize contentView; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHTimePieceView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CHTimePieceView.h 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/23/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CHTimePieceView : UIView 12 | 13 | @property (assign, nonatomic) IBOutlet UILabel* availableTimeLabel; 14 | @property (assign, nonatomic) IBOutlet UILabel* movesCountLabel; 15 | 16 | - (void)highlight; 17 | - (void)unhighlightAndActivate:(BOOL)activate; 18 | - (void)timeEnded; 19 | - (void)setTimeControlStageDotCount:(NSUInteger)dotCount; 20 | - (void)updateTimeControlStage:(NSUInteger)stageIndex; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /ChessClock/Classes/Views/CHTimePieceView.m: -------------------------------------------------------------------------------- 1 | // 2 | // CHTimePieceView.m 3 | // Chess.com 4 | // 5 | // Created by Pedro Bolaños on 10/23/12. 6 | // Copyright (c) 2012 psbt. All rights reserved. 7 | // 8 | 9 | #import "CHTimePieceView.h" 10 | #import "CHUtil.h" 11 | #import "UIColor+ChessClock.h" 12 | #import 13 | 14 | //------------------------------------------------------------------------------ 15 | #pragma mark - Private methods declarations 16 | //------------------------------------------------------------------------------ 17 | @interface CHTimePieceView() 18 | 19 | @property (assign, nonatomic) IBOutlet UIButton* timePieceButton; 20 | @property (assign, nonatomic) IBOutlet UIView* timeStagesView; 21 | 22 | @end 23 | 24 | //------------------------------------------------------------------------------ 25 | #pragma mark - CHTimePieceView implementation 26 | //------------------------------------------------------------------------------ 27 | @implementation CHTimePieceView 28 | 29 | - (void)awakeFromNib 30 | { 31 | [super awakeFromNib]; 32 | 33 | BOOL isiPad = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad; 34 | CGFloat fontSize = isiPad ? 200.0 : 90.0; 35 | 36 | if ([UIFont respondsToSelector:@selector(monospacedDigitSystemFontOfSize:weight:)]) 37 | { 38 | self.availableTimeLabel.font = [UIFont monospacedDigitSystemFontOfSize:fontSize 39 | weight:UIFontWeightBold]; 40 | } 41 | else 42 | { 43 | self.availableTimeLabel.font = [UIFont boldSystemFontOfSize:fontSize]; 44 | } 45 | } 46 | 47 | - (void)highlight 48 | { 49 | self.availableTimeLabel.textColor = [UIColor whiteColor]; 50 | self.timePieceButton.userInteractionEnabled = YES; 51 | 52 | self.backgroundColor = [UIColor selectedTimePieceButtonColor]; 53 | } 54 | 55 | - (void)unhighlightAndActivate:(BOOL)activate 56 | { 57 | self.availableTimeLabel.textColor = [UIColor unselectedTimePieceTextColor]; 58 | self.timePieceButton.userInteractionEnabled = activate; 59 | 60 | self.backgroundColor = [UIColor unselectedTimePieceButtonColor]; 61 | } 62 | 63 | - (void)timeEnded 64 | { 65 | self.availableTimeLabel.textColor = [UIColor whiteColor]; 66 | self.timePieceButton.userInteractionEnabled = NO; 67 | 68 | self.backgroundColor = [UIColor timeEndedButtonColor]; 69 | } 70 | 71 | - (void)setTimeControlStageDotCount:(NSUInteger)dotCount 72 | { 73 | for (UIView* view in [self.timeStagesView subviews]) { 74 | [view removeFromSuperview]; 75 | } 76 | 77 | if (dotCount == 1) 78 | { 79 | return; 80 | } 81 | 82 | UIImage* timeStageNotCompletedImage = [UIImage imageNamed:@"chessClock_timeStageNotCompleted"]; 83 | CGSize timeStagesViewSize = self.timeStagesView.frame.size; 84 | CGFloat distanceBetweenDots = timeStageNotCompletedImage.size.width + 4.0f; 85 | float posX = timeStageNotCompletedImage.size.width * 0.5f; 86 | float posY = timeStagesViewSize.height * 0.5f; 87 | 88 | for (NSUInteger i = 0; i < dotCount; i++) { 89 | UIImageView* imageView = [[UIImageView alloc] initWithImage:timeStageNotCompletedImage]; 90 | imageView.center = CGPointMake(posX, posY); 91 | [self.timeStagesView addSubview:imageView]; 92 | 93 | posX += distanceBetweenDots; 94 | } 95 | 96 | // Select the first time stage by default 97 | [self updateTimeControlStage:1]; 98 | } 99 | 100 | - (void)updateTimeControlStage:(NSUInteger)stageIndex 101 | { 102 | NSArray* subviews = self.timeStagesView.subviews; 103 | if (stageIndex <= [subviews count]) { 104 | UIView* view = [self.timeStagesView.subviews objectAtIndex:stageIndex - 1]; 105 | if ([view isKindOfClass:[UIImageView class]]) { 106 | UIImageView* imageView = (UIImageView*)view; 107 | UIImage* timeStageCompletedImage = [UIImage imageNamed:@"chessClock_timeStageCompleted"]; 108 | imageView.image = timeStageCompletedImage; 109 | } 110 | } 111 | } 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-40x40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-60x60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "Icon-App-20x20@1x.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@2x-1.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-29x29@1x.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@2x-1.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-40x40@1x.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@2x-1.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-76x76@1x.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-83.5x83.5@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "iTunesArtwork@2x.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeStageCompleted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "chessClock_timeStageCompleted.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "chessClock_timeStageCompleted@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeStageCompleted.imageset/chessClock_timeStageCompleted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chessClock_timeStageCompleted.imageset/chessClock_timeStageCompleted.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeStageCompleted.imageset/chessClock_timeStageCompleted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chessClock_timeStageCompleted.imageset/chessClock_timeStageCompleted@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeStageNotCompleted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "chessClock_timeStageNotCompleted.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "chessClock_timeStageNotCompleted@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeStageNotCompleted.imageset/chessClock_timeStageNotCompleted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chessClock_timeStageNotCompleted.imageset/chessClock_timeStageNotCompleted.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeStageNotCompleted.imageset/chessClock_timeStageNotCompleted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chessClock_timeStageNotCompleted.imageset/chessClock_timeStageNotCompleted@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeUpTimePiece.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "chessClock_timeUpTimePiece.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "chessClock_timeUpTimePiece@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeUpTimePiece.imageset/chessClock_timeUpTimePiece.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chessClock_timeUpTimePiece.imageset/chessClock_timeUpTimePiece.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chessClock_timeUpTimePiece.imageset/chessClock_timeUpTimePiece@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chessClock_timeUpTimePiece.imageset/chessClock_timeUpTimePiece@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chess_logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "logoWhiteCopy3@2x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "logoWhiteCopy3@3x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chess_logo.imageset/logoWhiteCopy3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chess_logo.imageset/logoWhiteCopy3@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/chess_logo.imageset/logoWhiteCopy3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/chess_logo.imageset/logoWhiteCopy3@3x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/rectLightOrangeButton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "resizing" : { 5 | "mode" : "9-part", 6 | "center" : { 7 | "mode" : "tile", 8 | "width" : 1, 9 | "height" : 1 10 | }, 11 | "cap-insets" : { 12 | "bottom" : 1, 13 | "top" : 1, 14 | "right" : 1, 15 | "left" : 1 16 | } 17 | }, 18 | "idiom" : "universal", 19 | "filename" : "rectLightOrangeButton.png", 20 | "scale" : "1x" 21 | }, 22 | { 23 | "resizing" : { 24 | "mode" : "9-part", 25 | "center" : { 26 | "mode" : "tile", 27 | "width" : 3, 28 | "height" : 3 29 | }, 30 | "cap-insets" : { 31 | "bottom" : 2, 32 | "top" : 2, 33 | "right" : 2, 34 | "left" : 2 35 | } 36 | }, 37 | "idiom" : "universal", 38 | "filename" : "rectLightOrangeButton@2x.png", 39 | "scale" : "2x" 40 | }, 41 | { 42 | "idiom" : "universal", 43 | "scale" : "3x" 44 | } 45 | ], 46 | "info" : { 47 | "version" : 1, 48 | "author" : "xcode" 49 | } 50 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/rectLightOrangeButton.imageset/rectLightOrangeButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/rectLightOrangeButton.imageset/rectLightOrangeButton.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/rectLightOrangeButton.imageset/rectLightOrangeButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/rectLightOrangeButton.imageset/rectLightOrangeButton@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/rectLightOrangeButtonPressed.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "resizing" : { 5 | "mode" : "9-part", 6 | "center" : { 7 | "mode" : "tile", 8 | "width" : 1, 9 | "height" : 1 10 | }, 11 | "cap-insets" : { 12 | "bottom" : 1, 13 | "top" : 1, 14 | "right" : 1, 15 | "left" : 1 16 | } 17 | }, 18 | "idiom" : "universal", 19 | "filename" : "rectLightOrangeButtonPressed.png", 20 | "scale" : "1x" 21 | }, 22 | { 23 | "resizing" : { 24 | "mode" : "9-part", 25 | "center" : { 26 | "mode" : "tile", 27 | "width" : 3, 28 | "height" : 2 29 | }, 30 | "cap-insets" : { 31 | "bottom" : 2, 32 | "top" : 3, 33 | "right" : 2, 34 | "left" : 2 35 | } 36 | }, 37 | "idiom" : "universal", 38 | "filename" : "rectLightOrangeButtonPressed@2x.png", 39 | "scale" : "2x" 40 | }, 41 | { 42 | "idiom" : "universal", 43 | "scale" : "3x" 44 | } 45 | ], 46 | "info" : { 47 | "version" : 1, 48 | "author" : "xcode" 49 | } 50 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/rectLightOrangeButtonPressed.imageset/rectLightOrangeButtonPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/rectLightOrangeButtonPressed.imageset/rectLightOrangeButtonPressed.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/rectLightOrangeButtonPressed.imageset/rectLightOrangeButtonPressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/rectLightOrangeButtonPressed.imageset/rectLightOrangeButtonPressed@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "PlayerSelected.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "PlayerSelected@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "PlayerSelected@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser.imageset/PlayerSelected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/tabBarUser.imageset/PlayerSelected.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser.imageset/PlayerSelected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/tabBarUser.imageset/PlayerSelected@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser.imageset/PlayerSelected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/tabBarUser.imageset/PlayerSelected@3x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "PlayerUnselected.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "PlayerUnselected@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "PlayerUnselected@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser2.imageset/PlayerUnselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/tabBarUser2.imageset/PlayerUnselected.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser2.imageset/PlayerUnselected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/tabBarUser2.imageset/PlayerUnselected@2x.png -------------------------------------------------------------------------------- /ChessClock/Images.xcassets/tabBarUser2.imageset/PlayerUnselected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Images.xcassets/tabBarUser2.imageset/PlayerUnselected@3x.png -------------------------------------------------------------------------------- /ChessClock/Resources/fonts/ChessGlyph-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Resources/fonts/ChessGlyph-Regular.ttf -------------------------------------------------------------------------------- /ChessClock/Resources/interface/xibs/CHChessClockIncrementView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ChessClock/Resources/interface/xibs/CHChessClockStageMovesCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /ChessClock/Resources/interface/xibs/CHChessClockTimeControlNameCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ChessClock/Resources/interface/xibs/CHChessClockTimeControlStageView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ChessClock/Resources/interface/xibs/CHChessClockTimeControlView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ChessClock/Resources/interface/xibs/CHChessClockTimeView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /ChessClock/Resources/plist/DefaultChessClockSettings.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | defaultSettings 6 | 7 | 8 | name 9 | 3 min 10 | default 11 | 12 | increment 13 | 14 | type 15 | CHChessClockFischerIncrement 16 | incrementValue 17 | 0 18 | 19 | timeStages 20 | 21 | 22 | movesCount 23 | 0 24 | maximumTime 25 | 3 26 | 27 | 28 | 29 | 30 | name 31 | 3 min | 2 sec 32 | increment 33 | 34 | type 35 | CHChessClockFischerIncrement 36 | incrementValue 37 | 2 38 | 39 | timeStages 40 | 41 | 42 | movesCount 43 | 0 44 | maximumTime 45 | 3 46 | 47 | 48 | 49 | 50 | name 51 | 5 min 52 | default 53 | 54 | increment 55 | 56 | type 57 | CHChessClockFischerIncrement 58 | incrementValue 59 | 0 60 | 61 | timeStages 62 | 63 | 64 | movesCount 65 | 0 66 | maximumTime 67 | 5 68 | 69 | 70 | 71 | 72 | name 73 | 15 min | 2 sec 74 | increment 75 | 76 | type 77 | CHChessClockFischerIncrement 78 | incrementValue 79 | 2 80 | 81 | timeStages 82 | 83 | 84 | movesCount 85 | 0 86 | maximumTime 87 | 15 88 | 89 | 90 | 91 | 92 | name 93 | 2 hr (40 moves) + 1 hr (5 sec delay) 94 | increment 95 | 96 | type 97 | CHChessClockDelayIncrement 98 | incrementValue 99 | 5 100 | 101 | timeStages 102 | 103 | 104 | movesCount 105 | 40 106 | maximumTime 107 | 120 108 | 109 | 110 | movesCount 111 | 0 112 | maximumTime 113 | 60 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /ChessClock/Resources/sounds/pause.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Resources/sounds/pause.wav -------------------------------------------------------------------------------- /ChessClock/Resources/sounds/reset.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Resources/sounds/reset.wav -------------------------------------------------------------------------------- /ChessClock/Resources/sounds/start.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Resources/sounds/start.wav -------------------------------------------------------------------------------- /ChessClock/Resources/sounds/switch1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Resources/sounds/switch1.mp3 -------------------------------------------------------------------------------- /ChessClock/Resources/sounds/switch2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Resources/sounds/switch2.mp3 -------------------------------------------------------------------------------- /ChessClock/Resources/sounds/timeEnded.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Resources/sounds/timeEnded.wav -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Crashlytics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Third Party/Crashlytics.framework/Crashlytics -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Headers/ANSCompatibility.h: -------------------------------------------------------------------------------- 1 | // 2 | // ANSCompatibility.h 3 | // AnswersKit 4 | // 5 | // Copyright (c) 2015 Crashlytics, Inc. All rights reserved. 6 | // 7 | 8 | #pragma once 9 | 10 | #if !__has_feature(nullability) 11 | #define nonnull 12 | #define nullable 13 | #define _Nullable 14 | #define _Nonnull 15 | #endif 16 | 17 | #ifndef NS_ASSUME_NONNULL_BEGIN 18 | #define NS_ASSUME_NONNULL_BEGIN 19 | #endif 20 | 21 | #ifndef NS_ASSUME_NONNULL_END 22 | #define NS_ASSUME_NONNULL_END 23 | #endif 24 | 25 | #if __has_feature(objc_generics) 26 | #define ANS_GENERIC_NSARRAY(type) NSArray 27 | #define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary 28 | #else 29 | #define ANS_GENERIC_NSARRAY(type) NSArray 30 | #define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary 31 | #endif 32 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Headers/CLSAttributes.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLSAttributes.h 3 | // Crashlytics 4 | // 5 | // Copyright (c) 2015 Crashlytics, Inc. All rights reserved. 6 | // 7 | 8 | #pragma once 9 | 10 | #define CLS_DEPRECATED(x) __attribute__ ((deprecated(x))) 11 | 12 | #if !__has_feature(nullability) 13 | #define nonnull 14 | #define nullable 15 | #define _Nullable 16 | #define _Nonnull 17 | #endif 18 | 19 | #ifndef NS_ASSUME_NONNULL_BEGIN 20 | #define NS_ASSUME_NONNULL_BEGIN 21 | #endif 22 | 23 | #ifndef NS_ASSUME_NONNULL_END 24 | #define NS_ASSUME_NONNULL_END 25 | #endif 26 | 27 | #if __has_feature(objc_generics) 28 | #define CLS_GENERIC_NSARRAY(type) NSArray 29 | #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary 30 | #else 31 | #define CLS_GENERIC_NSARRAY(type) NSArray 32 | #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary 33 | #endif 34 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Headers/CLSLogging.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLSLogging.h 3 | // Crashlytics 4 | // 5 | // Copyright (c) 2015 Crashlytics, Inc. All rights reserved. 6 | // 7 | #ifdef __OBJC__ 8 | #import "CLSAttributes.h" 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | #endif 13 | 14 | 15 | 16 | /** 17 | * 18 | * The CLS_LOG macro provides as easy way to gather more information in your log messages that are 19 | * sent with your crash data. CLS_LOG prepends your custom log message with the function name and 20 | * line number where the macro was used. If your app was built with the DEBUG preprocessor macro 21 | * defined CLS_LOG uses the CLSNSLog function which forwards your log message to NSLog and CLSLog. 22 | * If the DEBUG preprocessor macro is not defined CLS_LOG uses CLSLog only. 23 | * 24 | * Example output: 25 | * -[AppDelegate login:] line 134 $ login start 26 | * 27 | * If you would like to change this macro, create a new header file, unset our define and then define 28 | * your own version. Make sure this new header file is imported after the Crashlytics header file. 29 | * 30 | * #undef CLS_LOG 31 | * #define CLS_LOG(__FORMAT__, ...) CLSNSLog... 32 | * 33 | **/ 34 | #ifdef __OBJC__ 35 | #ifdef DEBUG 36 | #define CLS_LOG(__FORMAT__, ...) CLSNSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) 37 | #else 38 | #define CLS_LOG(__FORMAT__, ...) CLSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) 39 | #endif 40 | #endif 41 | 42 | /** 43 | * 44 | * Add logging that will be sent with your crash data. This logging will not show up in the system.log 45 | * and will only be visible in your Crashlytics dashboard. 46 | * 47 | **/ 48 | 49 | #ifdef __OBJC__ 50 | OBJC_EXTERN void CLSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); 51 | OBJC_EXTERN void CLSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); 52 | 53 | /** 54 | * 55 | * Add logging that will be sent with your crash data. This logging will show up in the system.log 56 | * and your Crashlytics dashboard. It is not recommended for Release builds. 57 | * 58 | **/ 59 | OBJC_EXTERN void CLSNSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); 60 | OBJC_EXTERN void CLSNSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); 61 | 62 | 63 | NS_ASSUME_NONNULL_END 64 | #endif 65 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Headers/CLSReport.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLSReport.h 3 | // Crashlytics 4 | // 5 | // Copyright (c) 2015 Crashlytics, Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "CLSAttributes.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 14 | * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details. 15 | **/ 16 | @protocol CLSCrashReport 17 | 18 | @property (nonatomic, copy, readonly) NSString *identifier; 19 | @property (nonatomic, copy, readonly) NSDictionary *customKeys; 20 | @property (nonatomic, copy, readonly) NSString *bundleVersion; 21 | @property (nonatomic, copy, readonly) NSString *bundleShortVersionString; 22 | @property (nonatomic, readonly, nullable) NSDate *crashedOnDate; 23 | @property (nonatomic, copy, readonly) NSString *OSVersion; 24 | @property (nonatomic, copy, readonly) NSString *OSBuildVersion; 25 | 26 | @end 27 | 28 | /** 29 | * The CLSReport exposes an interface to the phsyical report that Crashlytics has created. You can 30 | * use this class to get information about the event, and can also set some values after the 31 | * event has occurred. 32 | **/ 33 | @interface CLSReport : NSObject 34 | 35 | - (instancetype)init NS_UNAVAILABLE; 36 | + (instancetype)new NS_UNAVAILABLE; 37 | 38 | /** 39 | * Returns the session identifier for the report. 40 | **/ 41 | @property (nonatomic, copy, readonly) NSString *identifier; 42 | 43 | /** 44 | * Returns the custom key value data for the report. 45 | **/ 46 | @property (nonatomic, copy, readonly) NSDictionary *customKeys; 47 | 48 | /** 49 | * Returns the CFBundleVersion of the application that generated the report. 50 | **/ 51 | @property (nonatomic, copy, readonly) NSString *bundleVersion; 52 | 53 | /** 54 | * Returns the CFBundleShortVersionString of the application that generated the report. 55 | **/ 56 | @property (nonatomic, copy, readonly) NSString *bundleShortVersionString; 57 | 58 | /** 59 | * Returns the date that the report was created. 60 | **/ 61 | @property (nonatomic, copy, readonly) NSDate *dateCreated; 62 | 63 | /** 64 | * Returns the os version that the application crashed on. 65 | **/ 66 | @property (nonatomic, copy, readonly) NSString *OSVersion; 67 | 68 | /** 69 | * Returns the os build version that the application crashed on. 70 | **/ 71 | @property (nonatomic, copy, readonly) NSString *OSBuildVersion; 72 | 73 | /** 74 | * Returns YES if the report contains any crash information, otherwise returns NO. 75 | **/ 76 | @property (nonatomic, assign, readonly) BOOL isCrash; 77 | 78 | /** 79 | * You can use this method to set, after the event, additional custom keys. The rules 80 | * and semantics for this method are the same as those documented in Crashlytics.h. Be aware 81 | * that the maximum size and count of custom keys is still enforced, and you can overwrite keys 82 | * and/or cause excess keys to be deleted by using this method. 83 | **/ 84 | - (void)setObjectValue:(nullable id)value forKey:(NSString *)key; 85 | 86 | /** 87 | * Record an application-specific user identifier. See Crashlytics.h for details. 88 | **/ 89 | @property (nonatomic, copy, nullable) NSString * userIdentifier; 90 | 91 | /** 92 | * Record a user name. See Crashlytics.h for details. 93 | **/ 94 | @property (nonatomic, copy, nullable) NSString * userName; 95 | 96 | /** 97 | * Record a user email. See Crashlytics.h for details. 98 | **/ 99 | @property (nonatomic, copy, nullable) NSString * userEmail; 100 | 101 | @end 102 | 103 | NS_ASSUME_NONNULL_END 104 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Headers/CLSStackFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLSStackFrame.h 3 | // Crashlytics 4 | // 5 | // Copyright 2015 Crashlytics, Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "CLSAttributes.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 14 | * 15 | * This class is used in conjunction with -[Crashlytics recordCustomExceptionName:reason:frameArray:] to 16 | * record information about non-ObjC/C++ exceptions. All information included here will be displayed 17 | * in the Crashlytics UI, and can influence crash grouping. Be particularly careful with the use of the 18 | * address property. If set, Crashlytics will attempt symbolication and could overwrite other properities 19 | * in the process. 20 | * 21 | **/ 22 | @interface CLSStackFrame : NSObject 23 | 24 | + (instancetype)stackFrame; 25 | + (instancetype)stackFrameWithAddress:(NSUInteger)address; 26 | + (instancetype)stackFrameWithSymbol:(NSString *)symbol; 27 | 28 | @property (nonatomic, copy, nullable) NSString *symbol; 29 | @property (nonatomic, copy, nullable) NSString *rawSymbol; 30 | @property (nonatomic, copy, nullable) NSString *library; 31 | @property (nonatomic, copy, nullable) NSString *fileName; 32 | @property (nonatomic, assign) uint32_t lineNumber; 33 | @property (nonatomic, assign) uint64_t offset; 34 | @property (nonatomic, assign) uint64_t address; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Third Party/Crashlytics.framework/Info.plist -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Crashlytics { 2 | header "Crashlytics.h" 3 | header "Answers.h" 4 | header "ANSCompatibility.h" 5 | header "CLSLogging.h" 6 | header "CLSReport.h" 7 | header "CLSStackFrame.h" 8 | header "CLSAttributes.h" 9 | 10 | export * 11 | 12 | link "z" 13 | link "c++" 14 | } 15 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # run 4 | # 5 | # Copyright (c) 2015 Crashlytics. All rights reserved. 6 | 7 | # Figure out where we're being called from 8 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 9 | 10 | # Quote path in case of spaces or special chars 11 | DIR="\"${DIR}" 12 | 13 | PATH_SEP="/" 14 | VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script" 15 | UPLOAD_COMMAND="uploadDSYM\" $@ run-script" 16 | 17 | # Ensure params are as expected, run in sync mode to validate 18 | eval $DIR$PATH_SEP$VALIDATE_COMMAND 19 | return_code=$? 20 | 21 | if [[ $return_code != 0 ]]; then 22 | exit $return_code 23 | fi 24 | 25 | # Verification passed, upload dSYM in background to prevent Xcode from waiting 26 | # Note: Validation is performed again before upload. 27 | # Output can still be found in Console.app 28 | eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & 29 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/submit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Third Party/Crashlytics.framework/submit -------------------------------------------------------------------------------- /ChessClock/Third Party/Crashlytics.framework/uploadDSYM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Third Party/Crashlytics.framework/uploadDSYM -------------------------------------------------------------------------------- /ChessClock/Third Party/Fabric.framework/Fabric: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Third Party/Fabric.framework/Fabric -------------------------------------------------------------------------------- /ChessClock/Third Party/Fabric.framework/Headers/FABAttributes.h: -------------------------------------------------------------------------------- 1 | // 2 | // FABAttributes.h 3 | // Fabric 4 | // 5 | // Copyright (C) 2015 Twitter, Inc. 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the "License"); 8 | // you may not use this file except in compliance with the License. 9 | // You may obtain a copy of the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | // 19 | 20 | #pragma once 21 | 22 | #define FAB_UNAVAILABLE(x) __attribute__((unavailable(x))) 23 | 24 | #if !__has_feature(nullability) 25 | #define nonnull 26 | #define nullable 27 | #define _Nullable 28 | #define _Nonnull 29 | #endif 30 | 31 | #ifndef NS_ASSUME_NONNULL_BEGIN 32 | #define NS_ASSUME_NONNULL_BEGIN 33 | #endif 34 | 35 | #ifndef NS_ASSUME_NONNULL_END 36 | #define NS_ASSUME_NONNULL_END 37 | #endif 38 | 39 | 40 | /** 41 | * The following macros are defined here to provide 42 | * backwards compatability. If you are still using 43 | * them you should migrate to the native nullability 44 | * macros. 45 | */ 46 | #define fab_nullable nullable 47 | #define fab_nonnull nonnull 48 | #define FAB_NONNULL __fab_nonnull 49 | #define FAB_NULLABLE __fab_nullable 50 | #define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN 51 | #define FAB_END_NONNULL NS_ASSUME_NONNULL_END 52 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Fabric.framework/Headers/Fabric.h: -------------------------------------------------------------------------------- 1 | // 2 | // Fabric.h 3 | // Fabric 4 | // 5 | // Copyright (C) 2015 Twitter, Inc. 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the "License"); 8 | // you may not use this file except in compliance with the License. 9 | // You may obtain a copy of the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | // 19 | 20 | #import 21 | #import "FABAttributes.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | #if TARGET_OS_IPHONE 26 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 27 | #error "Fabric's minimum iOS version is 6.0" 28 | #endif 29 | #else 30 | #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070 31 | #error "Fabric's minimum OS X version is 10.7" 32 | #endif 33 | #endif 34 | 35 | /** 36 | * Fabric Base. Coordinates configuration and starts all provided kits. 37 | */ 38 | @interface Fabric : NSObject 39 | 40 | /** 41 | * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use. 42 | * 43 | * For example, in Objective-C: 44 | * 45 | * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];` 46 | * 47 | * Swift: 48 | * 49 | * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])` 50 | * 51 | * Only the first call to this method is honored. Subsequent calls are no-ops. 52 | * 53 | * @param kitClasses An array of kit Class objects 54 | * 55 | * @return Returns the shared Fabric instance. In most cases this can be ignored. 56 | */ 57 | + (instancetype)with:(NSArray *)kitClasses; 58 | 59 | /** 60 | * Returns the Fabric singleton object. 61 | */ 62 | + (instancetype)sharedSDK; 63 | 64 | /** 65 | * This BOOL enables or disables debug logging, such as kit version information. The default value is NO. 66 | */ 67 | @property (nonatomic, assign) BOOL debug; 68 | 69 | /** 70 | * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. 71 | */ 72 | - (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); 73 | 74 | /** 75 | * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. 76 | */ 77 | + (instancetype)new FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); 78 | 79 | @end 80 | 81 | NS_ASSUME_NONNULL_END 82 | 83 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Fabric.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Third Party/Fabric.framework/Info.plist -------------------------------------------------------------------------------- /ChessClock/Third Party/Fabric.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Fabric { 2 | umbrella header "Fabric.h" 3 | 4 | export * 5 | module * { export * } 6 | } -------------------------------------------------------------------------------- /ChessClock/Third Party/Fabric.framework/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # run 4 | # 5 | # Copyright (c) 2015 Crashlytics. All rights reserved. 6 | 7 | # Figure out where we're being called from 8 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 9 | 10 | # Quote path in case of spaces or special chars 11 | DIR="\"${DIR}" 12 | 13 | PATH_SEP="/" 14 | VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script" 15 | UPLOAD_COMMAND="uploadDSYM\" $@ run-script" 16 | 17 | # Ensure params are as expected, run in sync mode to validate 18 | eval $DIR$PATH_SEP$VALIDATE_COMMAND 19 | return_code=$? 20 | 21 | if [[ $return_code != 0 ]]; then 22 | exit $return_code 23 | fi 24 | 25 | # Verification passed, upload dSYM in background to prevent Xcode from waiting 26 | # Note: Validation is performed again before upload. 27 | # Output can still be found in Console.app 28 | eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & 29 | -------------------------------------------------------------------------------- /ChessClock/Third Party/Fabric.framework/uploadDSYM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/ChessClock/Third Party/Fabric.framework/uploadDSYM -------------------------------------------------------------------------------- /ChessClock/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ChessClock/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ChessClock 4 | // 5 | // Created by Pedro Bolaños on 3/3/14. 6 | // Copyright (c) 2014 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "CHAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([CHAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ChessClockTests/ChessClockTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ChessClockTests/ChessClockTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ChessClockTests.m 3 | // ChessClockTests 4 | // 5 | // Created by Pedro Bolaños on 3/3/14. 6 | // Copyright (c) 2014 Chess.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ChessClockTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ChessClockTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ChessClockTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Fabric.framework/Fabric: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/Fabric.framework/Fabric -------------------------------------------------------------------------------- /Fabric.framework/Headers/FABAttributes.h: -------------------------------------------------------------------------------- 1 | // 2 | // FABAttributes.h 3 | // Fabric 4 | // 5 | // Copyright (C) 2015 Twitter, Inc. 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the "License"); 8 | // you may not use this file except in compliance with the License. 9 | // You may obtain a copy of the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | // 19 | 20 | #pragma once 21 | 22 | #define FAB_UNAVAILABLE(x) __attribute__((unavailable(x))) 23 | 24 | #if !__has_feature(nullability) 25 | #define nonnull 26 | #define nullable 27 | #define _Nullable 28 | #define _Nonnull 29 | #endif 30 | 31 | #ifndef NS_ASSUME_NONNULL_BEGIN 32 | #define NS_ASSUME_NONNULL_BEGIN 33 | #endif 34 | 35 | #ifndef NS_ASSUME_NONNULL_END 36 | #define NS_ASSUME_NONNULL_END 37 | #endif 38 | 39 | 40 | /** 41 | * The following macros are defined here to provide 42 | * backwards compatability. If you are still using 43 | * them you should migrate to the native nullability 44 | * macros. 45 | */ 46 | #define fab_nullable nullable 47 | #define fab_nonnull nonnull 48 | #define FAB_NONNULL __fab_nonnull 49 | #define FAB_NULLABLE __fab_nullable 50 | #define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN 51 | #define FAB_END_NONNULL NS_ASSUME_NONNULL_END 52 | -------------------------------------------------------------------------------- /Fabric.framework/Headers/Fabric.h: -------------------------------------------------------------------------------- 1 | // 2 | // Fabric.h 3 | // Fabric 4 | // 5 | // Copyright (C) 2015 Twitter, Inc. 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the "License"); 8 | // you may not use this file except in compliance with the License. 9 | // You may obtain a copy of the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | // 19 | 20 | #import 21 | #import "FABAttributes.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | #if TARGET_OS_IPHONE 26 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 27 | #error "Fabric's minimum iOS version is 6.0" 28 | #endif 29 | #else 30 | #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070 31 | #error "Fabric's minimum OS X version is 10.7" 32 | #endif 33 | #endif 34 | 35 | /** 36 | * Fabric Base. Coordinates configuration and starts all provided kits. 37 | */ 38 | @interface Fabric : NSObject 39 | 40 | /** 41 | * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use. 42 | * 43 | * For example, in Objective-C: 44 | * 45 | * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];` 46 | * 47 | * Swift: 48 | * 49 | * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])` 50 | * 51 | * Only the first call to this method is honored. Subsequent calls are no-ops. 52 | * 53 | * @param kitClasses An array of kit Class objects 54 | * 55 | * @return Returns the shared Fabric instance. In most cases this can be ignored. 56 | */ 57 | + (instancetype)with:(NSArray *)kitClasses; 58 | 59 | /** 60 | * Returns the Fabric singleton object. 61 | */ 62 | + (instancetype)sharedSDK; 63 | 64 | /** 65 | * This BOOL enables or disables debug logging, such as kit version information. The default value is NO. 66 | */ 67 | @property (nonatomic, assign) BOOL debug; 68 | 69 | /** 70 | * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. 71 | */ 72 | - (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); 73 | 74 | /** 75 | * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. 76 | */ 77 | + (instancetype)new FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); 78 | 79 | @end 80 | 81 | NS_ASSUME_NONNULL_END 82 | 83 | -------------------------------------------------------------------------------- /Fabric.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/Fabric.framework/Info.plist -------------------------------------------------------------------------------- /Fabric.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Fabric { 2 | umbrella header "Fabric.h" 3 | 4 | export * 5 | module * { export * } 6 | } -------------------------------------------------------------------------------- /Fabric.framework/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # run 4 | # 5 | # Copyright (c) 2015 Crashlytics. All rights reserved. 6 | 7 | # Figure out where we're being called from 8 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 9 | 10 | # Quote path in case of spaces or special chars 11 | DIR="\"${DIR}" 12 | 13 | PATH_SEP="/" 14 | VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script" 15 | UPLOAD_COMMAND="uploadDSYM\" $@ run-script" 16 | 17 | # Ensure params are as expected, run in sync mode to validate 18 | eval $DIR$PATH_SEP$VALIDATE_COMMAND 19 | return_code=$? 20 | 21 | if [[ $return_code != 0 ]]; then 22 | exit $return_code 23 | fi 24 | 25 | # Verification passed, upload dSYM in background to prevent Xcode from waiting 26 | # Note: Validation is performed again before upload. 27 | # Output can still be found in Console.app 28 | eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & 29 | -------------------------------------------------------------------------------- /Fabric.framework/uploadDSYM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChessCom/ios-chessclock/63bec8c8ef93719f7d3246ea74a06dafce1bbfdd/Fabric.framework/uploadDSYM -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, ‘8.0’ 3 | 4 | target 'ChessClock' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | pod 'ObjectAL-for-iPhone', '2.6.0' 9 | 10 | target 'ChessClockTests' do 11 | inherit! :search_paths 12 | # Pods for testing 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ObjectAL-for-iPhone (2.6.0) 3 | 4 | DEPENDENCIES: 5 | - ObjectAL-for-iPhone (= 2.6.0) 6 | 7 | SPEC CHECKSUMS: 8 | ObjectAL-for-iPhone: 939215eb4b83c30ffe6dd9a637c47d1610db4e40 9 | 10 | PODFILE CHECKSUM: 2b67e50b7a1cd89859fa00950a1b6c6b2a1944b4 11 | 12 | COCOAPODS: 1.2.0 13 | -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALBuffer.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALBuffer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALCaptureDevice.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALCaptureDevice.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALChannelSource.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALChannelSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALContext.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALContext.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALDevice.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALDevice.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALListener.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALListener.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALSoundSource.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSoundSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALSoundSourcePool.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSoundSourcePool.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALSource.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALTypes.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALTypes.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ALWrapper.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALWrapper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ARCSafe_MemMgmt.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/ARCSafe_MemMgmt.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/NSMutableArray+WeakReferences.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableArray+WeakReferences.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/NSMutableDictionary+WeakReferences.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableDictionary+WeakReferences.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAction+Private.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALAction+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAction.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALAction.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALActionManager.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALActionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAudioActions.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALAudioActions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAudioFile.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALAudioFile.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAudioSession.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Session/OALAudioSession.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAudioTrack.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTrack.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAudioTrackNotifications.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTrackNotifications.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALAudioTracks.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTracks.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALNotifications.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALNotifications.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALSimpleAudio.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OALSimpleAudio.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALSuspendHandler.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Session/OALSuspendHandler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALTools.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALTools.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OALUtilityActions.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALUtilityActions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ObjectAL.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/ObjectAL.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ObjectALConfig.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/ObjectALConfig.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/ObjectALMacros.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/ObjectALMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/OpenALManager.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/OpenALManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/SynthesizeSingleton.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/SynthesizeSingleton.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ObjectAL-for-iPhone/mach_timing.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/mach_timing.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALBuffer.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALBuffer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALCaptureDevice.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALCaptureDevice.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALChannelSource.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALChannelSource.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALContext.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALContext.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALDevice.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALDevice.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALListener.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALListener.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALSoundSource.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSoundSource.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALSoundSourcePool.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSoundSourcePool.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALSource.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSource.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALTypes.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALTypes.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ALWrapper.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALWrapper.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ARCSafe_MemMgmt.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/ARCSafe_MemMgmt.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/NSMutableArray+WeakReferences.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableArray+WeakReferences.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/NSMutableDictionary+WeakReferences.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableDictionary+WeakReferences.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAction+Private.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALAction+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAction.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALAction.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALActionManager.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALActionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAudioActions.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALAudioActions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAudioFile.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALAudioFile.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAudioSession.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Session/OALAudioSession.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAudioTrack.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTrack.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAudioTrackNotifications.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTrackNotifications.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALAudioTracks.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTracks.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALNotifications.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALNotifications.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALSimpleAudio.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OALSimpleAudio.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALSuspendHandler.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Session/OALSuspendHandler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALTools.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALTools.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OALUtilityActions.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALUtilityActions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ObjectAL.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/ObjectAL.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ObjectALConfig.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/ObjectALConfig.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/ObjectALMacros.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/ObjectALMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/OpenALManager.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/OpenALManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/SynthesizeSingleton.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/SynthesizeSingleton.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ObjectAL-for-iPhone/mach_timing.h: -------------------------------------------------------------------------------- 1 | ../../../ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/mach_timing.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ObjectAL-for-iPhone (2.6.0) 3 | 4 | DEPENDENCIES: 5 | - ObjectAL-for-iPhone (= 2.6.0) 6 | 7 | SPEC CHECKSUMS: 8 | ObjectAL-for-iPhone: 939215eb4b83c30ffe6dd9a637c47d1610db4e40 9 | 10 | PODFILE CHECKSUM: 2b67e50b7a1cd89859fa00950a1b6c6b2a1944b4 11 | 12 | COCOAPODS: 1.2.0 13 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/LICENSE.ObjectAL.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 Karl Stenerud. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall remain in place 11 | in this source code. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | Attribution is not required, but appreciated :) 22 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALAction+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate+OALAction_Private.h 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 3/18/12. 6 | // Copyright (c) 2012 Stenerud. All rights reserved. 7 | // 8 | 9 | #import "OALAction.h" 10 | 11 | /** \cond */ 12 | @interface OALAction () 13 | 14 | @property(nonatomic,readwrite,assign) id target; 15 | 16 | @property(nonatomic,readwrite,assign) float duration; 17 | 18 | @property(nonatomic,readwrite,assign) bool running; 19 | 20 | @property(nonatomic,readwrite,assign) bool runningInManager; 21 | 22 | @end 23 | /** \endcond */ 24 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Actions/OALActionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // OALActionManager.h 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 10-09-18. 6 | // 7 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall remain in place 17 | // in this source code. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | // Attribution is not required, but appreciated :) 28 | // 29 | 30 | #import 31 | #import "SynthesizeSingleton.h" 32 | #import "OALAction.h" 33 | #import "ObjectALConfig.h" 34 | 35 | /* This object is only available if OBJECTAL_CFG_USE_COCOS2D_ACTIONS is enabled in ObjectALConfig.h. 36 | */ 37 | #if !OBJECTAL_CFG_USE_COCOS2D_ACTIONS 38 | 39 | 40 | #pragma mark OALActionManager 41 | 42 | /** 43 | * Manages all ObjectAL actions. 44 | */ 45 | @interface OALActionManager : NSObject 46 | { 47 | /** All targets that have actions running on them (id). */ 48 | NSMutableArray* targets; 49 | 50 | /** Parallel array to "targets", maintaining a list of all actions per target (NSMutableArray*) */ 51 | NSMutableArray* targetActions; 52 | 53 | /** All actions that are to be added on the next pass (OALAction*) */ 54 | NSMutableArray* actionsToAdd; 55 | 56 | /** All actions that are to be removed on the next pass (OALAction*) */ 57 | NSMutableArray* actionsToRemove; 58 | 59 | /** The timer which we use to update the actions. */ 60 | NSTimer* stepTimer; 61 | 62 | /** The last time that was recorded. */ 63 | uint64_t lastTimestamp; 64 | } 65 | 66 | 67 | #pragma mark Object Management 68 | 69 | /** Singleton implementation providing "sharedInstance" and "purgeSharedInstance" methods. 70 | * 71 | * - (OALAudioSupport*) sharedInstance: Get the shared singleton instance.
72 | * - (void) purgeSharedInstance: Purge (deallocate) the shared instance. 73 | */ 74 | SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(OALActionManager); 75 | 76 | 77 | #pragma mark Action Management 78 | 79 | /** Stops ALL running actions on ALL targets. 80 | */ 81 | - (void) stopAllActions; 82 | 83 | 84 | #pragma mark Internal Use 85 | 86 | /** \cond */ 87 | /** (INTERNAL USE) Used by OALAction to announce that it is starting. 88 | * 89 | * @param action The action that is starting. 90 | */ 91 | - (void) notifyActionStarted:(OALAction*) action; 92 | 93 | /** (INTERNAL USE) Used by OALAction to announce that it is stopping. 94 | * 95 | * @param action The action that is stopping. 96 | */ 97 | - (void) notifyActionStopped:(OALAction*) action; 98 | /** \endcond */ 99 | 100 | @end 101 | 102 | #endif /* OBJECTAL_CFG_USE_COCOS2D_ACTIONS */ 103 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTrackNotifications.h: -------------------------------------------------------------------------------- 1 | // 2 | // OALAudioTrackNotifications.h 3 | // 4 | // Created by CJ Hanson on 10/16/10. 5 | // 6 | 7 | #import 8 | 9 | extern NSString *const OALAudioTrackSourceChangedNotification; 10 | extern NSString *const OALAudioTrackStartedPlayingNotification; 11 | extern NSString *const OALAudioTrackStoppedPlayingNotification; 12 | extern NSString *const OALAudioTrackFinishedPlayingNotification; 13 | extern NSString *const OALAudioTrackLoopedNotification; 14 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTrackNotifications.m: -------------------------------------------------------------------------------- 1 | // 2 | // OALAudioTrackNotifications.m 3 | // 4 | // Created by CJ Hanson on 10/16/10. 5 | // 6 | 7 | #import "OALAudioTrackNotifications.h" 8 | 9 | NSString *const OALAudioTrackSourceChangedNotification = @"OALAudioTrackSourceChangedNotification"; 10 | NSString *const OALAudioTrackStartedPlayingNotification = @"OALAudioTrackStartedPlayingNotification"; 11 | NSString *const OALAudioTrackStoppedPlayingNotification = @"OALAudioTrackStoppedPlayingNotification"; 12 | NSString *const OALAudioTrackFinishedPlayingNotification = @"OALAudioTrackFinishedPlayingNotification"; 13 | NSString *const OALAudioTrackLoopedNotification = @"OALAudioTrackLoopedNotification"; 14 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/AudioTrack/OALAudioTracks.h: -------------------------------------------------------------------------------- 1 | // 2 | // OALAudioTracks.h 3 | // ObjectAL 4 | // 5 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall remain in place 15 | // in this source code. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | // Attribution is not required, but appreciated :) 26 | // 27 | 28 | #import "OALAudioTrack.h" 29 | #import "SynthesizeSingleton.h" 30 | #import "OALSuspendHandler.h" 31 | 32 | 33 | #pragma mark OALAudioTracks 34 | 35 | /** 36 | * Keeps track of all AudioTrack objects. 37 | */ 38 | @interface OALAudioTracks : NSObject 39 | { 40 | /** All instantiated audio tracks. */ 41 | NSMutableArray* tracks; 42 | bool muted; 43 | bool paused; 44 | 45 | /** Timer to poll deviceCurrentTime so that it doesn't get reset on a device */ 46 | NSTimer* deviceTimePoller; 47 | 48 | /** Handles suspending and interrupting for this object. */ 49 | OALSuspendHandler* suspendHandler; 50 | } 51 | 52 | #pragma mark Properties 53 | 54 | /** Pauses/unpauses all audio tracks. */ 55 | @property(nonatomic,readwrite,assign) bool paused; 56 | 57 | /** Mutes/unmutes all audio tracks. */ 58 | @property(nonatomic,readwrite,assign) bool muted; 59 | 60 | /** All instantiated audio tracks. */ 61 | @property(nonatomic,readonly,retain) NSArray* tracks; 62 | 63 | 64 | #pragma mark Playback 65 | 66 | /** Stop playback on all audio tracks. 67 | */ 68 | - (void) stopAllTracks; 69 | 70 | 71 | #pragma mark Object Management 72 | 73 | /** Singleton implementation providing "sharedInstance" and "purgeSharedInstance" methods. 74 | * 75 | * - (OALAudioTracks*) sharedInstance: Get the shared singleton instance.
76 | * - (void) purgeSharedInstance: Purge (deallocate) the shared instance. 77 | */ 78 | SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(OALAudioTracks); 79 | 80 | 81 | #pragma mark Internal Use 82 | 83 | /** \cond */ 84 | /** (INTERNAL USE) Notify that a track is initializing. 85 | */ 86 | - (void) notifyTrackInitializing:(OALAudioTrack*) track; 87 | 88 | /** (INTERNAL USE) Notify that a track is deallocating. 89 | */ 90 | - (void) notifyTrackDeallocating:(OALAudioTrack*) track; 91 | /** \endcond */ 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALCaptureDevice.m: -------------------------------------------------------------------------------- 1 | // 2 | // ALCaptureDevice.m 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 10-01-11. 6 | // 7 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall remain in place 17 | // in this source code. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | // Attribution is not required, but appreciated :) 28 | // 29 | 30 | #import "ALCaptureDevice.h" 31 | #import "ALWrapper.h" 32 | #import "ObjectALMacros.h" 33 | #import "ARCSafe_MemMgmt.h" 34 | 35 | 36 | @implementation ALCaptureDevice 37 | 38 | #pragma mark Object Management 39 | 40 | + (id) deviceWithDeviceSpecifier:(NSString*) deviceSpecifier 41 | frequency:(ALCuint) frequency 42 | format:(ALCenum) format 43 | bufferSize:(ALCsizei) bufferSize 44 | { 45 | return as_autorelease([[self alloc] initWithDeviceSpecifier:deviceSpecifier 46 | frequency:frequency 47 | format:format 48 | bufferSize:bufferSize]); 49 | } 50 | 51 | - (id) initWithDeviceSpecifier:(NSString*) deviceSpecifier 52 | frequency:(ALCuint) frequency 53 | format:(ALCenum) format 54 | bufferSize:(ALCsizei) bufferSize 55 | { 56 | if(nil != (self = [super init])) 57 | { 58 | device = [ALWrapper openCaptureDevice:deviceSpecifier 59 | frequency:frequency 60 | format:format 61 | bufferSize:bufferSize]; 62 | if(device == nil) 63 | { 64 | OAL_LOG_ERROR(@"%@: Failed to initialize OpenAL capture device", self); 65 | goto initFailed; 66 | } 67 | } 68 | return self; 69 | 70 | initFailed: 71 | as_release(self); 72 | return nil; 73 | } 74 | 75 | - (void) dealloc 76 | { 77 | [ALWrapper closeDevice:device]; 78 | 79 | as_superdealloc(); 80 | } 81 | 82 | 83 | #pragma mark Properties 84 | 85 | @synthesize device; 86 | 87 | - (int) captureSamples 88 | { 89 | return [ALWrapper getInteger:device attribute:ALC_CAPTURE_SAMPLES]; 90 | } 91 | 92 | - (NSArray*) extensions 93 | { 94 | return [ALWrapper getSpaceSeparatedStringList:device attribute:ALC_EXTENSIONS]; 95 | } 96 | 97 | - (int) majorVersion 98 | { 99 | return [ALWrapper getInteger:device attribute:ALC_MAJOR_VERSION]; 100 | } 101 | 102 | - (int) minorVersion 103 | { 104 | return [ALWrapper getInteger:device attribute:ALC_MINOR_VERSION]; 105 | } 106 | 107 | 108 | #pragma mark Audio Capture 109 | 110 | - (bool) moveSamples:(ALCsizei) numSamples toBuffer:(ALCvoid*) buffer 111 | { 112 | return [ALWrapper captureSamples:device buffer:buffer numSamples:numSamples]; 113 | } 114 | 115 | - (bool) startCapture 116 | { 117 | return [ALWrapper startCapture:device]; 118 | } 119 | 120 | - (bool) stopCapture 121 | { 122 | return [ALWrapper stopCapture:device]; 123 | } 124 | 125 | 126 | #pragma mark Extensions 127 | 128 | - (bool) isExtensionPresent:(NSString*) name 129 | { 130 | return [ALWrapper isExtensionPresent:device name:name]; 131 | } 132 | 133 | - (void*) getProcAddress:(NSString*) functionName 134 | { 135 | return [ALWrapper getProcAddress:device name:functionName]; 136 | } 137 | 138 | 139 | @end 140 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSoundSourcePool.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoundSourcePool.h 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 17/12/09. 6 | // 7 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall remain in place 17 | // in this source code. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | // Attribution is not required, but appreciated :) 28 | // 29 | 30 | #import "ALSoundSource.h" 31 | 32 | 33 | #pragma mark ALSoundSourcePool 34 | 35 | /** 36 | * A pool of sound sources, which can be fetched based on availability. 37 | */ 38 | @interface ALSoundSourcePool : NSObject 39 | { 40 | /** All sources managed by this pool (id). */ 41 | NSMutableArray* sources; 42 | } 43 | 44 | 45 | #pragma mark Properties 46 | 47 | /** All sources managed by this pool (id). */ 48 | @property(nonatomic,readonly,retain) NSArray* sources; 49 | 50 | 51 | #pragma mark Object Management 52 | 53 | /** Make a new pool. 54 | * @return A new pool. 55 | */ 56 | + (id) pool; 57 | 58 | 59 | #pragma mark Source Management 60 | 61 | /** Add a source to this pool. 62 | * 63 | * @param source The source to add. 64 | */ 65 | - (void) addSource:(id) source; 66 | 67 | /** Remove a source from this pool 68 | * 69 | * @param source The source to remove. 70 | */ 71 | - (void) removeSource:(id) source; 72 | 73 | /** Acquire a free or freeable source from this pool. 74 | * It first attempts to find a completely free source. 75 | * Failing this, it will attempt to interrupt a source and return that (if attemptToInterrupt 76 | * is TRUE). 77 | * 78 | * @param attemptToInterrupt If TRUE, attempt to interrupt sources to free them for use. 79 | * @return The freed sound source, or nil if no sources are freeable. 80 | */ 81 | - (id) getFreeSource:(bool) attemptToInterrupt; 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALSoundSourcePool.m: -------------------------------------------------------------------------------- 1 | // 2 | // SoundSourcePool.m 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 17/12/09. 6 | // 7 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall remain in place 17 | // in this source code. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | // Attribution is not required, but appreciated :) 28 | // 29 | 30 | #import "ALSoundSourcePool.h" 31 | #import "ObjectALMacros.h" 32 | #import "ARCSafe_MemMgmt.h" 33 | 34 | 35 | #pragma mark Private Methods 36 | 37 | /** 38 | * Private interface to SoundSourcePool. 39 | */ 40 | @interface ALSoundSourcePool (Private) 41 | 42 | /** Move a source to the head of the list. 43 | * 44 | * @param index the index of the source to move. 45 | */ 46 | - (void) moveToHead:(int) index; 47 | 48 | @end 49 | 50 | 51 | #pragma mark - 52 | #pragma mark SoundSourcePool 53 | 54 | @implementation ALSoundSourcePool 55 | 56 | #pragma mark Object Management 57 | 58 | + (id) pool 59 | { 60 | return as_autorelease([[self alloc] init]); 61 | } 62 | 63 | - (id) init 64 | { 65 | if(nil != (self = [super init])) 66 | { 67 | OAL_LOG_DEBUG(@"%@: Init", self); 68 | sources = [[NSMutableArray alloc] initWithCapacity:10]; 69 | } 70 | return self; 71 | } 72 | 73 | - (void) dealloc 74 | { 75 | OAL_LOG_DEBUG(@"%@: Dealloc", self); 76 | as_release(sources); 77 | as_superdealloc(); 78 | } 79 | 80 | 81 | #pragma mark Properties 82 | 83 | @synthesize sources; 84 | 85 | 86 | #pragma mark Source Management 87 | 88 | - (void) addSource:(id) source 89 | { 90 | OPTIONALLY_SYNCHRONIZED(self) 91 | { 92 | [sources addObject:source]; 93 | } 94 | } 95 | 96 | - (void) removeSource:(id) source 97 | { 98 | OPTIONALLY_SYNCHRONIZED(self) 99 | { 100 | [sources removeObject:source]; 101 | } 102 | } 103 | 104 | - (void) moveToHead:(int) index 105 | { 106 | OPTIONALLY_SYNCHRONIZED(self) 107 | { 108 | id source = as_retain([sources objectAtIndex:(NSUInteger)index]); 109 | [sources removeObjectAtIndex:(NSUInteger)index]; 110 | [sources addObject:source]; 111 | as_release(source); 112 | } 113 | } 114 | 115 | - (id) getFreeSource:(bool) attemptToInterrupt 116 | { 117 | int index = 0; 118 | 119 | OPTIONALLY_SYNCHRONIZED(self) 120 | { 121 | // Try to find any free source. 122 | for(id source in sources) 123 | { 124 | if(!source.playing) 125 | { 126 | [self moveToHead:index]; 127 | return source; 128 | } 129 | index++; 130 | } 131 | 132 | if(attemptToInterrupt) 133 | { 134 | // Try to forcibly free a source. 135 | index = 0; 136 | for(id source in sources) 137 | { 138 | if(!source.playing || source.interruptible) 139 | { 140 | [source stop]; 141 | [self moveToHead:index]; 142 | return source; 143 | } 144 | index++; 145 | } 146 | } 147 | } 148 | return nil; 149 | } 150 | 151 | @end 152 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/OpenAL/ALTypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // OpenAL.h 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 15/12/09. 6 | // 7 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall remain in place 17 | // in this source code. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | // Attribution is not required, but appreciated :) 28 | // 29 | 30 | 31 | #pragma mark Types 32 | 33 | /** 34 | * Represents a 3-dimensional point for certain ObjectAL properties. 35 | */ 36 | typedef struct 37 | { 38 | /** The "X" coordinate */ 39 | float x; 40 | /** The "Y" coordinate */ 41 | float y; 42 | /** The "Z" coordinate */ 43 | float z; 44 | } ALPoint; 45 | 46 | /** 47 | * Represents a 3-dimensional vector for certain ObjectAL properties. 48 | * Properties are the same as for ALPoint. 49 | */ 50 | typedef struct 51 | { 52 | /** The "X" coordinate */ 53 | float x; 54 | /** The "Y" coordinate */ 55 | float y; 56 | /** The "Z" coordinate */ 57 | float z; 58 | } ALVector; 59 | 60 | /** 61 | * Represents an orientation, consisting of an "at" vector (representing the "forward" direction), 62 | * and the "up" vector (representing "up" for the subject). 63 | */ 64 | typedef struct 65 | { 66 | /** The "at" vector, representing "forward" */ 67 | ALVector at; 68 | /** The "up" vector, representing "up" */ 69 | ALVector up; 70 | } ALOrientation; 71 | 72 | 73 | #pragma mark - 74 | #pragma mark Convenience Methods 75 | 76 | /** Convenience inline for creating an ALPoint. 77 | * 78 | * @param x The X coordinate. 79 | * @param y The Y coordinate. 80 | * @param z The Z coordinate. 81 | * @return An ALPoint. 82 | */ 83 | static inline ALPoint alpoint(const float x, const float y, const float z) 84 | { 85 | ALPoint point = {x, y, z}; 86 | return point; 87 | } 88 | 89 | /** Convenience inline for creating an ALVector. 90 | * 91 | * @param x The X component. 92 | * @param y The Y component. 93 | * @param z The Z component. 94 | * @return An ALVector. 95 | */ 96 | static inline ALVector alvector(const float x, const float y, const float z) 97 | { 98 | ALVector vector = {x, y, z}; 99 | return vector; 100 | } 101 | 102 | /** Convenience inline for creating an ALOrientation. 103 | * 104 | * @param atX The X component of "at". 105 | * @param atY The Y component of "at". 106 | * @param atZ The Z component of "at". 107 | * @param upX The X component of "up". 108 | * @param upY The Y component of "up". 109 | * @param upZ The Z component of "up". 110 | * @return An ALOrientation. 111 | */ 112 | static inline ALOrientation alorientation(const float atX, 113 | const float atY, 114 | const float atZ, 115 | const float upX, 116 | const float upY, 117 | const float upZ) 118 | { 119 | ALOrientation orientation = { {atX, atY, atZ}, {upX,upY,upZ} }; 120 | return orientation; 121 | } 122 | 123 | static inline ALPoint ALPointMake(float x, float y, float z) 124 | { 125 | ALPoint p; 126 | p.x = x; 127 | p.y = y; 128 | p.z = z; 129 | 130 | return p; 131 | } 132 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableArray+WeakReferences.h: -------------------------------------------------------------------------------- 1 | // 2 | // MutableArray-WeakReferences.h 3 | // 4 | // Created by Karl Stenerud on 05/12/09. 5 | // 6 | 7 | #import 8 | 9 | 10 | /** 11 | * Adds to NSMutableArray the ability to create an array that keeps weak references. 12 | */ 13 | @interface NSMutableArray (WeakReferences) 14 | 15 | /** Create an NSMutableArray that uses weak references. 16 | */ 17 | + (id) mutableArrayUsingWeakReferences; 18 | 19 | /** Create an NSMutableArray that uses weak references. 20 | * 21 | * @param capacity The initial capacity of the array. 22 | */ 23 | + (id) mutableArrayUsingWeakReferencesWithCapacity:(NSUInteger) capacity; 24 | 25 | /** Create an NSMutableArray that uses weak references (no pending autorelease). 26 | */ 27 | + (id) newMutableArrayUsingWeakReferences; 28 | 29 | /** Create an NSMutableArray that uses weak references (no pending autorelease). 30 | * 31 | * @param capacity The initial capacity of the array. 32 | */ 33 | + (id) newMutableArrayUsingWeakReferencesWithCapacity:(NSUInteger) capacity; 34 | 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableArray+WeakReferences.m: -------------------------------------------------------------------------------- 1 | // 2 | // MutableArray-WeakReferences.m 3 | // 4 | // Created by Karl Stenerud on 05/12/09. 5 | // 6 | 7 | #import "NSMutableArray+WeakReferences.h" 8 | 9 | 10 | #if __has_feature(objc_arc) 11 | #define as_autorelease(X) (X) 12 | #define as_bridge_transfer __bridge_transfer 13 | #else 14 | #define as_autorelease(X) [(X) autorelease] 15 | #define as_bridge_transfer 16 | #endif 17 | 18 | @implementation NSMutableArray (WeakReferences) 19 | 20 | + (id) newMutableArrayUsingWeakReferencesWithCapacity:(NSUInteger) capacity 21 | { 22 | CFArrayCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual}; 23 | return (as_bridge_transfer id)CFArrayCreateMutable(NULL, 24 | (CFIndex)capacity, 25 | &callbacks); 26 | } 27 | 28 | + (id) newMutableArrayUsingWeakReferences 29 | { 30 | return [self newMutableArrayUsingWeakReferencesWithCapacity:0]; 31 | } 32 | 33 | + (id) mutableArrayUsingWeakReferencesWithCapacity:(NSUInteger) capacity 34 | { 35 | return as_autorelease([self newMutableArrayUsingWeakReferencesWithCapacity:capacity]); 36 | } 37 | 38 | + (id) mutableArrayUsingWeakReferences 39 | { 40 | return [self mutableArrayUsingWeakReferencesWithCapacity:0]; 41 | } 42 | 43 | @end 44 | 45 | #define FIX_CATEGORY_BUG(name) @interface FIX_CATEGORY_BUG_##name : NSObject @end @implementation FIX_CATEGORY_BUG_##name @end 46 | 47 | 48 | FIX_CATEGORY_BUG(NSMutableArray_WeakReferences); 49 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableDictionary+WeakReferences.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableDictionary+WeakReferences.h 3 | // 4 | // Created by Karl Stenerud on 12-09-06. 5 | // 6 | 7 | #import 8 | 9 | @interface NSMutableDictionary (WeakReferences) 10 | 11 | /** Create an NSMutableDictionary that uses weak references. 12 | */ 13 | + (NSMutableDictionary*) mutableDictionaryUsingWeakReferences; 14 | 15 | /** Create an NSMutableDictionary that uses weak references. 16 | * 17 | * @param capacity The initial capacity of the dictionary. 18 | */ 19 | + (NSMutableDictionary*) mutableDictionaryUsingWeakReferencesWithCapacity:(NSUInteger) capacity; 20 | 21 | /** Create an NSMutableDictionary that uses weak references (no pending autorelease). 22 | */ 23 | + (NSMutableDictionary*) newMutableDictionaryUsingWeakReferences; 24 | 25 | /** Create an NSMutableDictionary that uses weak references (no pending autorelease). 26 | * 27 | * @param capacity The initial capacity of the dictionary. 28 | */ 29 | + (NSMutableDictionary*) newMutableDictionaryUsingWeakReferencesWithCapacity:(NSUInteger) capacity; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/NSMutableDictionary+WeakReferences.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableDictionary+WeakReferences.m 3 | // 4 | // Created by Karl Stenerud on 12-09-06. 5 | // 6 | 7 | #import "NSMutableDictionary+WeakReferences.h" 8 | 9 | 10 | #if __has_feature(objc_arc) 11 | #define as_autorelease(X) (X) 12 | #define as_bridge_transfer __bridge_transfer 13 | #else 14 | #define as_autorelease(X) [(X) autorelease] 15 | #define as_bridge_transfer 16 | #endif 17 | 18 | @implementation NSMutableDictionary (WeakReferences) 19 | 20 | + (NSMutableDictionary*) newMutableDictionaryUsingWeakReferencesWithCapacity:(NSUInteger) capacity 21 | { 22 | CFDictionaryValueCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual}; 23 | return (as_bridge_transfer id)CFDictionaryCreateMutable(NULL, 24 | (CFIndex)capacity, 25 | &kCFTypeDictionaryKeyCallBacks, 26 | &callbacks); 27 | } 28 | 29 | + (NSMutableDictionary*) newMutableDictionaryUsingWeakReferences 30 | { 31 | return [self newMutableDictionaryUsingWeakReferencesWithCapacity:0]; 32 | } 33 | 34 | + (NSMutableDictionary*) mutableDictionaryUsingWeakReferencesWithCapacity:(NSUInteger) capacity 35 | { 36 | return as_autorelease([self newMutableDictionaryUsingWeakReferencesWithCapacity:capacity]); 37 | } 38 | 39 | + (NSMutableDictionary*) mutableDictionaryUsingWeakReferences 40 | { 41 | return [self mutableDictionaryUsingWeakReferencesWithCapacity:0]; 42 | } 43 | 44 | @end 45 | 46 | #define FIX_CATEGORY_BUG(name) @interface FIX_CATEGORY_BUG_##name : NSObject @end @implementation FIX_CATEGORY_BUG_##name @end 47 | 48 | 49 | FIX_CATEGORY_BUG(NSMutableDictionary_WeakReferences); 50 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALNotifications.h: -------------------------------------------------------------------------------- 1 | // 2 | // OALNotifications.h 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 11-01-03. 6 | // 7 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall remain in place 17 | // in this source code. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | // Attribution is not required, but appreciated :) 28 | // 29 | 30 | #define OALAudioErrorNotification @"OALAudioErrorNotification" 31 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/OALTools.h: -------------------------------------------------------------------------------- 1 | // 2 | // OALTools.h 3 | // ObjectAL 4 | // 5 | // Created by Karl Stenerud on 10-12-19. 6 | // 7 | // Copyright (c) 2009 Karl Stenerud. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall remain in place 17 | // in this source code. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | // Attribution is not required, but appreciated :) 28 | // 29 | 30 | #import 31 | 32 | 33 | /** 34 | * Miscellaneous tools used by ObjectAL. 35 | */ 36 | @interface OALTools : NSObject 37 | { 38 | } 39 | 40 | /** Set the default bundle to use when looking up paths. 41 | * 42 | * @param bundle The new default bundle. 43 | */ 44 | + (void) setDefaultBundle:(NSBundle*) bundle; 45 | 46 | /** The default bundle used when looking up paths. 47 | * 48 | * return The default bundle. 49 | */ 50 | + (NSBundle*) defaultBundle; 51 | 52 | /** Returns the URL corresponding to the specified path. 53 | * If the path is not absolute (starts with a "/"), this method will look for 54 | * the file in the default bundle. 55 | * 56 | * @param path The path to convert to a URL. 57 | * @return The corresponding URL or nil if a URL could not be formed. 58 | */ 59 | + (NSURL*) urlForPath:(NSString*) path; 60 | 61 | /** Returns the URL corresponding to the specified path. 62 | * If the path is not absolute (starts with a "/"), this method will look for 63 | * the file in the specified bundle. 64 | * 65 | * @param path The path to convert to a URL. 66 | * @param bundle The bundle to look inside for relative paths. 67 | * @return The corresponding URL or nil if a URL could not be formed. 68 | */ 69 | + (NSURL*) urlForPath:(NSString*) path bundle:(NSBundle*) bundle; 70 | 71 | /** Notify an error if the specified ExtAudio error code indicates an error. 72 | * This will log the error and also potentially post an audio error notification 73 | * (OALAudioErrorNotification) if it is suspected that this error is a result of 74 | * the audio session getting corrupted. 75 | * 76 | * @param errorCode: The error code returned from an OS call. 77 | * @param function: The function name where the error occurred. 78 | * @param description: A printf-style description of what happened. 79 | */ 80 | + (void) notifyExtAudioError:(OSStatus)errorCode 81 | function:(const char*) function 82 | description:(NSString*) description, ...; 83 | 84 | /** Notify an error if the specified AudioSession error code indicates an error. 85 | * This will log the error and also potentially post an audio error notification 86 | * (OALAudioErrorNotification) if it is suspected that this error is a result of 87 | * the audio session getting corrupted. 88 | * 89 | * @param errorCode: The error code returned from an OS call. 90 | * @param function: The function name where the error occurred. 91 | * @param description: A printf-style description of what happened. 92 | */ 93 | + (void) notifyAudioSessionError:(OSStatus)errorCode 94 | function:(const char*) function 95 | description:(NSString*) description, ...; 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/mach_timing.c: -------------------------------------------------------------------------------- 1 | /* 2 | * mach_timing.c 3 | * ObjectAL 4 | * 5 | * Created by Karl Stenerud on 10-08-18. 6 | * 7 | */ 8 | 9 | #include "mach_timing.h" 10 | 11 | double mach_absolute_difference_seconds(uint64_t endTime, uint64_t startTime) 12 | { 13 | uint64_t difference = endTime - startTime; 14 | static double conversion = 0.0; 15 | 16 | if(0 == conversion) 17 | { 18 | mach_timebase_info_data_t info; 19 | kern_return_t errorCode = mach_timebase_info(&info); 20 | 21 | //Convert the timebase into seconds 22 | if(0 == errorCode) 23 | { 24 | conversion = 1e-9 * (double)info.numer / (double)info.denom; 25 | } 26 | } 27 | 28 | return conversion * (double)difference; 29 | } 30 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/ObjectAL/ObjectAL/Support/mach_timing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * mach_timing.h 3 | * ObjectAL 4 | * 5 | * Created by Karl Stenerud on 10-08-18. 6 | * 7 | */ 8 | 9 | #include 10 | 11 | /** Calculates the difference, in seconds, between two time values that were 12 | * obtained through mach_absolute_time(). 13 | * 14 | * @param endTime the later time value. 15 | * @param startTime the earlier time value. 16 | * @return the time difference in seconds. 17 | */ 18 | double mach_absolute_difference_seconds(uint64_t endTime, uint64_t startTime); 19 | -------------------------------------------------------------------------------- /Pods/ObjectAL-for-iPhone/README.mdown: -------------------------------------------------------------------------------- 1 | ObjectAL for iPhone, Apple TV, and Mac 2 | ====================================== 3 | 4 | ### Mac, iOS, and TVOS Audio, minus the headache. 5 | 6 | So you want to add audio to your app. Usually your audio needs are something like: 7 | 8 | * Play, Pause, Stop, Loop 9 | * Volume, Pitch, Pan, Mute 10 | * Maybe some "power user" stuff, such as preloading and session control 11 | 12 | 13 | ### But you want *more* than that. 14 | 15 | * You want it to be **intuitive** and **easy**. 16 | * You want to get up and running **fast**. 17 | * But most of all, you want it to **JUST BLOODY WORK**! 18 | 19 | 20 | ### ObjectAL removes the pain. 21 | 22 | ObjectAL shields you from the nastiness of audio programming on iOS and Mac. 23 | 24 | * It knows how to manage audio sessions. 25 | * It knows OpenAL and AVAudioPlayer. 26 | * It knows what bugs are in which OS version, and how to work around them. 27 | * It knows how to navigate the arcane APIs and perform the right incantations. 28 | 29 | ObjectAL layers all that craziness away, giving you a clean, object oriented, Objective-C interface that just *works*. 30 | 31 | 32 | ### With ObjectAL, the simple is easy, and the complex is possible. 33 | 34 | 35 | --------------------------------------------------------------------- 36 | 37 | 38 | Find Out More 39 | ------------- 40 | 41 | **Homepage:** 42 | 43 | **Github:** 44 | 45 | **Documentation:** ObjectAL.pdf (in the repository) or 46 | 47 | **Community:** 48 | 49 | **Download:** 50 | 51 | **Repository:** ` git clone http://github.com/kstenerud/ObjectAL-for-iPhone.git ` 52 | 53 | 54 | --------------------------------------------------------------------- 55 | 56 | 57 | License 58 | ------- 59 | 60 | Copyright (c) 2009 Karl Stenerud. All rights reserved. 61 | 62 | Permission is hereby granted, free of charge, to any person obtaining a copy 63 | of this software and associated documentation files (the "Software"), to deal 64 | in the Software without restriction, including without limitation the rights 65 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 66 | copies of the Software, and to permit persons to whom the Software is 67 | furnished to do so, subject to the following conditions: 68 | 69 | The above copyright notice and this permission notice shall remain in place 70 | in this source code. 71 | 72 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 73 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 74 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 75 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 76 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 77 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 78 | THE SOFTWARE. 79 | 80 | Attribution is not required, but appreciated :) 81 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ObjectAL-for-iPhone/ObjectAL-for-iPhone-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ObjectAL_for_iPhone : NSObject 3 | @end 4 | @implementation PodsDummy_ObjectAL_for_iPhone 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ObjectAL-for-iPhone/ObjectAL-for-iPhone-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ObjectAL-for-iPhone/ObjectAL-for-iPhone.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ObjectAL-for-iPhone 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ObjectAL-for-iPhone" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 4 | OTHER_LDFLAGS = -framework "AVFoundation" -framework "AudioToolbox" -framework "OpenAL" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ObjectAL-for-iPhone 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClock/Pods-ChessClock-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ObjectAL-for-iPhone 5 | 6 | Copyright (c) 2009 Karl Stenerud. All rights reserved. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall remain in place 16 | in this source code. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Attribution is not required, but appreciated :) 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClock/Pods-ChessClock-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2009 Karl Stenerud. All rights reserved. 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall remain in place 27 | in this source code. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Attribution is not required, but appreciated :) 38 | 39 | License 40 | MIT 41 | Title 42 | ObjectAL-for-iPhone 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClock/Pods-ChessClock-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ChessClock : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ChessClock 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClock/Pods-ChessClock-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClock/Pods-ChessClock.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ObjectAL-for-iPhone" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"ObjectAL-for-iPhone" -framework "AVFoundation" -framework "AudioToolbox" -framework "OpenAL" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClock/Pods-ChessClock.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ObjectAL-for-iPhone" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"ObjectAL-for-iPhone" -framework "AVFoundation" -framework "AudioToolbox" -framework "OpenAL" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClockTests/Pods-ChessClockTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClockTests/Pods-ChessClockTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClockTests/Pods-ChessClockTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ChessClockTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ChessClockTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClockTests/Pods-ChessClockTests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClockTests/Pods-ChessClockTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ObjectAL-for-iPhone" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "AVFoundation" -framework "AudioToolbox" -framework "OpenAL" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ChessClockTests/Pods-ChessClockTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ObjectAL-for-iPhone" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ObjectAL-for-iPhone" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "AVFoundation" -framework "AudioToolbox" -framework "OpenAL" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chess.com Chess Clock 2 | 3 | iOS version of chess clock mobile app. On the App Store [here](https://itunes.apple.com/us/app/chess-clock-by-chess-com/id858039162?l=en&mt=8). 4 | 5 | ## Prerequisites 6 | 7 | * Xcode 9.0. Keep in mind that the deployment target is iOS 8.0. 8 | * [Fork](https://help.github.com/articles/fork-a-repo/) the repo 9 | 10 | # Questions? 11 | [File an issue!](https://github.com/ChessCom/ios-chessclock/issues) --------------------------------------------------------------------------------