├── .gitignore ├── LICENSE ├── README.md ├── iOS └── TriplePlay │ ├── Podfile │ ├── Podfile.lock │ ├── TriplePlay.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── TriplePlay.xcworkspace │ └── contents.xcworkspacedata │ └── TriplePlay │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift └── tvOS └── Timehop ├── Podfile ├── Podfile.lock ├── Timehop.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── Timehop.xcworkspace └── contents.xcworkspacedata └── Timehop ├── AppDelegate.swift ├── Assets.xcassets ├── 1.imageset │ ├── 1.jpg │ └── Contents.json ├── 2.imageset │ ├── 2.jpg │ └── Contents.json ├── 3.imageset │ ├── 3.jpg │ └── Contents.json ├── 4.imageset │ ├── 4.jpg │ └── Contents.json ├── App Icon & Top Shelf Image.brandassets │ ├── App Icon - Large.imagestack │ │ ├── Back.imagestacklayer │ │ │ ├── Content.imageset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Front.imagestacklayer │ │ │ ├── Content.imageset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ └── Middle.imagestacklayer │ │ │ ├── Content.imageset │ │ │ └── Contents.json │ │ │ └── Contents.json │ ├── App Icon - Small.imagestack │ │ ├── Back.imagestacklayer │ │ │ ├── Content.imageset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Front.imagestacklayer │ │ │ ├── Content.imageset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ └── Middle.imagestacklayer │ │ │ ├── Content.imageset │ │ │ └── Contents.json │ │ │ └── Contents.json │ ├── Contents.json │ └── Top Shelf Image.imageset │ │ └── Contents.json ├── Contents.json └── main.imageset │ ├── Contents.json │ └── launch@2x.png ├── AuthViewController.swift ├── Base.lproj └── Main.storyboard ├── Info.plist └── ViewController.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | Pods/ 21 | 22 | .DS_Store 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Benny Wong 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TriplePlay 2 | 3 | A demo of a better authentication flow for tvOS apps using iOS 4 | 5 | ![](http://f.cl.ly/items/2D0L112l0z1p1V0O3h04/tvos.gif) 6 | 7 | For more background, read the [blog post](https://medium.com/@bdotdub/signing-into-apps-on-apple-tv-sucks-d36fd00e6712) 8 | 9 | --------------- 10 | 11 | ## Running the iOS app 12 | 13 | In your terminal: 14 | 15 | 1. Go into the iOS directory: `cd iOS/TriplePlay` 16 | 1. Install Cocoapods: `pod install` 17 | 1. Open project in Xcode: `open TriplePlay.xcworkspace` 18 | 19 | The build and run the app from Xcode. 20 | 21 | ## Running the tvOS app 22 | 23 | In your terminal: 24 | 25 | 1. Go into the iOS directory: `cd tvOS/Timehop` 26 | 1. Install Cocoapods: `pod install` 27 | 1. Open project in Xcode: `open Timehop.xcworkspace` 28 | 29 | The build and run the app from Xcode. 30 | 31 | ## Security Disclaimer 32 | 33 | In practice, you wouldn't actually want to pass the authentication token. In this example, anyone listening for the `_timehop_auth._tcp.` would be able to grab the (potentially sensitive) data you're passing to the tvOS app. 34 | 35 | Some alternate flows could be: 36 | 37 | * Flip the roles. Have the tvOS provide the service and send over a single use token. The iOS app could then take that token and pass it to the backend service. The tvOS app could poll the backend service to see if anyone has authenticated using that one time token. 38 | * Dynamically create the service name. The service type is hard coded in this example, but you could display a randomly generated token in the tvOS app and enter it on the iOS app. You could then be listening / publishing to a service of type `_timehop_auth_RaNd0mt0ken._tcp.` 39 | 40 | ## LICENSE 41 | 42 | MIT. See `LICENSE` 43 | -------------------------------------------------------------------------------- /iOS/TriplePlay/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'TriplePlay' do 4 | pod 'CocoaAsyncSocket' 5 | end 6 | 7 | -------------------------------------------------------------------------------- /iOS/TriplePlay/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.4.2) 3 | 4 | DEPENDENCIES: 5 | - CocoaAsyncSocket 6 | 7 | SPEC CHECKSUMS: 8 | CocoaAsyncSocket: f5783bdedd232d91b89769bc4b5a1580aed518ad 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B26F432F1BF023FB00C1CDF2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26F432E1BF023FB00C1CDF2 /* AppDelegate.swift */; }; 11 | B26F43311BF023FB00C1CDF2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26F43301BF023FB00C1CDF2 /* ViewController.swift */; }; 12 | B26F43341BF023FB00C1CDF2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B26F43321BF023FB00C1CDF2 /* Main.storyboard */; }; 13 | B26F43361BF023FB00C1CDF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B26F43351BF023FB00C1CDF2 /* Assets.xcassets */; }; 14 | B26F43391BF023FB00C1CDF2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B26F43371BF023FB00C1CDF2 /* LaunchScreen.storyboard */; }; 15 | C0CC9F9FD6CCA066958F3F5A /* Pods_TriplePlay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F05091BA39A57F9127C0BA2 /* Pods_TriplePlay.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 0F5A57F428B81F8B487E6343 /* Pods-TriplePlay.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TriplePlay.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TriplePlay/Pods-TriplePlay.debug.xcconfig"; sourceTree = ""; }; 20 | 51B093B6CE8D510701A259F5 /* Pods-TriplePlay.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TriplePlay.release.xcconfig"; path = "Pods/Target Support Files/Pods-TriplePlay/Pods-TriplePlay.release.xcconfig"; sourceTree = ""; }; 21 | 5F05091BA39A57F9127C0BA2 /* Pods_TriplePlay.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TriplePlay.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | B26F432B1BF023FB00C1CDF2 /* TriplePlay.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TriplePlay.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | B26F432E1BF023FB00C1CDF2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 24 | B26F43301BF023FB00C1CDF2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 25 | B26F43331BF023FB00C1CDF2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 26 | B26F43351BF023FB00C1CDF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27 | B26F43381BF023FB00C1CDF2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 28 | B26F433A1BF023FB00C1CDF2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | B26F43281BF023FB00C1CDF2 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | C0CC9F9FD6CCA066958F3F5A /* Pods_TriplePlay.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 1F3F13806A7C31B20A49278A /* Frameworks */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | 5F05091BA39A57F9127C0BA2 /* Pods_TriplePlay.framework */, 47 | ); 48 | name = Frameworks; 49 | sourceTree = ""; 50 | }; 51 | 71D5903F16FDC33BF347CE2D /* Pods */ = { 52 | isa = PBXGroup; 53 | children = ( 54 | 0F5A57F428B81F8B487E6343 /* Pods-TriplePlay.debug.xcconfig */, 55 | 51B093B6CE8D510701A259F5 /* Pods-TriplePlay.release.xcconfig */, 56 | ); 57 | name = Pods; 58 | sourceTree = ""; 59 | }; 60 | B26F43221BF023FB00C1CDF2 = { 61 | isa = PBXGroup; 62 | children = ( 63 | B26F432D1BF023FB00C1CDF2 /* TriplePlay */, 64 | B26F432C1BF023FB00C1CDF2 /* Products */, 65 | 71D5903F16FDC33BF347CE2D /* Pods */, 66 | 1F3F13806A7C31B20A49278A /* Frameworks */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | B26F432C1BF023FB00C1CDF2 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | B26F432B1BF023FB00C1CDF2 /* TriplePlay.app */, 74 | ); 75 | name = Products; 76 | sourceTree = ""; 77 | }; 78 | B26F432D1BF023FB00C1CDF2 /* TriplePlay */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | B26F432E1BF023FB00C1CDF2 /* AppDelegate.swift */, 82 | B26F43301BF023FB00C1CDF2 /* ViewController.swift */, 83 | B26F43321BF023FB00C1CDF2 /* Main.storyboard */, 84 | B26F43351BF023FB00C1CDF2 /* Assets.xcassets */, 85 | B26F43371BF023FB00C1CDF2 /* LaunchScreen.storyboard */, 86 | B26F433A1BF023FB00C1CDF2 /* Info.plist */, 87 | ); 88 | path = TriplePlay; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | B26F432A1BF023FB00C1CDF2 /* TriplePlay */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = B26F433D1BF023FB00C1CDF2 /* Build configuration list for PBXNativeTarget "TriplePlay" */; 97 | buildPhases = ( 98 | 6FA6C6E7E5A547F344164CF2 /* Check Pods Manifest.lock */, 99 | B26F43271BF023FB00C1CDF2 /* Sources */, 100 | B26F43281BF023FB00C1CDF2 /* Frameworks */, 101 | B26F43291BF023FB00C1CDF2 /* Resources */, 102 | DED63553F70D39F851C92ED6 /* Embed Pods Frameworks */, 103 | 16038D854F8690C1CB0E0E28 /* Copy Pods Resources */, 104 | ); 105 | buildRules = ( 106 | ); 107 | dependencies = ( 108 | ); 109 | name = TriplePlay; 110 | productName = TriplePlay; 111 | productReference = B26F432B1BF023FB00C1CDF2 /* TriplePlay.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | B26F43231BF023FB00C1CDF2 /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 0710; 121 | LastUpgradeCheck = 0710; 122 | ORGANIZATIONNAME = "Benny Wong"; 123 | TargetAttributes = { 124 | B26F432A1BF023FB00C1CDF2 = { 125 | CreatedOnToolsVersion = 7.1; 126 | }; 127 | }; 128 | }; 129 | buildConfigurationList = B26F43261BF023FB00C1CDF2 /* Build configuration list for PBXProject "TriplePlay" */; 130 | compatibilityVersion = "Xcode 3.2"; 131 | developmentRegion = English; 132 | hasScannedForEncodings = 0; 133 | knownRegions = ( 134 | en, 135 | Base, 136 | ); 137 | mainGroup = B26F43221BF023FB00C1CDF2; 138 | productRefGroup = B26F432C1BF023FB00C1CDF2 /* Products */; 139 | projectDirPath = ""; 140 | projectRoot = ""; 141 | targets = ( 142 | B26F432A1BF023FB00C1CDF2 /* TriplePlay */, 143 | ); 144 | }; 145 | /* End PBXProject section */ 146 | 147 | /* Begin PBXResourcesBuildPhase section */ 148 | B26F43291BF023FB00C1CDF2 /* Resources */ = { 149 | isa = PBXResourcesBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | B26F43391BF023FB00C1CDF2 /* LaunchScreen.storyboard in Resources */, 153 | B26F43361BF023FB00C1CDF2 /* Assets.xcassets in Resources */, 154 | B26F43341BF023FB00C1CDF2 /* Main.storyboard in Resources */, 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXResourcesBuildPhase section */ 159 | 160 | /* Begin PBXShellScriptBuildPhase section */ 161 | 16038D854F8690C1CB0E0E28 /* Copy Pods Resources */ = { 162 | isa = PBXShellScriptBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | ); 166 | inputPaths = ( 167 | ); 168 | name = "Copy Pods Resources"; 169 | outputPaths = ( 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | shellPath = /bin/sh; 173 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TriplePlay/Pods-TriplePlay-resources.sh\"\n"; 174 | showEnvVarsInLog = 0; 175 | }; 176 | 6FA6C6E7E5A547F344164CF2 /* Check Pods Manifest.lock */ = { 177 | isa = PBXShellScriptBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | ); 181 | inputPaths = ( 182 | ); 183 | name = "Check Pods Manifest.lock"; 184 | outputPaths = ( 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | shellPath = /bin/sh; 188 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 189 | showEnvVarsInLog = 0; 190 | }; 191 | DED63553F70D39F851C92ED6 /* Embed Pods Frameworks */ = { 192 | isa = PBXShellScriptBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | ); 196 | inputPaths = ( 197 | ); 198 | name = "Embed Pods Frameworks"; 199 | outputPaths = ( 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | shellPath = /bin/sh; 203 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TriplePlay/Pods-TriplePlay-frameworks.sh\"\n"; 204 | showEnvVarsInLog = 0; 205 | }; 206 | /* End PBXShellScriptBuildPhase section */ 207 | 208 | /* Begin PBXSourcesBuildPhase section */ 209 | B26F43271BF023FB00C1CDF2 /* Sources */ = { 210 | isa = PBXSourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | B26F43311BF023FB00C1CDF2 /* ViewController.swift in Sources */, 214 | B26F432F1BF023FB00C1CDF2 /* AppDelegate.swift in Sources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXSourcesBuildPhase section */ 219 | 220 | /* Begin PBXVariantGroup section */ 221 | B26F43321BF023FB00C1CDF2 /* Main.storyboard */ = { 222 | isa = PBXVariantGroup; 223 | children = ( 224 | B26F43331BF023FB00C1CDF2 /* Base */, 225 | ); 226 | name = Main.storyboard; 227 | sourceTree = ""; 228 | }; 229 | B26F43371BF023FB00C1CDF2 /* LaunchScreen.storyboard */ = { 230 | isa = PBXVariantGroup; 231 | children = ( 232 | B26F43381BF023FB00C1CDF2 /* Base */, 233 | ); 234 | name = LaunchScreen.storyboard; 235 | sourceTree = ""; 236 | }; 237 | /* End PBXVariantGroup section */ 238 | 239 | /* Begin XCBuildConfiguration section */ 240 | B26F433B1BF023FB00C1CDF2 /* Debug */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 245 | CLANG_CXX_LIBRARY = "libc++"; 246 | CLANG_ENABLE_MODULES = YES; 247 | CLANG_ENABLE_OBJC_ARC = YES; 248 | CLANG_WARN_BOOL_CONVERSION = YES; 249 | CLANG_WARN_CONSTANT_CONVERSION = YES; 250 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 251 | CLANG_WARN_EMPTY_BODY = YES; 252 | CLANG_WARN_ENUM_CONVERSION = YES; 253 | CLANG_WARN_INT_CONVERSION = YES; 254 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 255 | CLANG_WARN_UNREACHABLE_CODE = YES; 256 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 257 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 258 | COPY_PHASE_STRIP = NO; 259 | DEBUG_INFORMATION_FORMAT = dwarf; 260 | ENABLE_STRICT_OBJC_MSGSEND = YES; 261 | ENABLE_TESTABILITY = YES; 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_DYNAMIC_NO_PIC = NO; 264 | GCC_NO_COMMON_BLOCKS = YES; 265 | GCC_OPTIMIZATION_LEVEL = 0; 266 | GCC_PREPROCESSOR_DEFINITIONS = ( 267 | "DEBUG=1", 268 | "$(inherited)", 269 | ); 270 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 271 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 272 | GCC_WARN_UNDECLARED_SELECTOR = YES; 273 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 274 | GCC_WARN_UNUSED_FUNCTION = YES; 275 | GCC_WARN_UNUSED_VARIABLE = YES; 276 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 277 | MTL_ENABLE_DEBUG_INFO = YES; 278 | ONLY_ACTIVE_ARCH = YES; 279 | SDKROOT = iphoneos; 280 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 281 | }; 282 | name = Debug; 283 | }; 284 | B26F433C1BF023FB00C1CDF2 /* Release */ = { 285 | isa = XCBuildConfiguration; 286 | buildSettings = { 287 | ALWAYS_SEARCH_USER_PATHS = NO; 288 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 289 | CLANG_CXX_LIBRARY = "libc++"; 290 | CLANG_ENABLE_MODULES = YES; 291 | CLANG_ENABLE_OBJC_ARC = YES; 292 | CLANG_WARN_BOOL_CONVERSION = YES; 293 | CLANG_WARN_CONSTANT_CONVERSION = YES; 294 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 295 | CLANG_WARN_EMPTY_BODY = YES; 296 | CLANG_WARN_ENUM_CONVERSION = YES; 297 | CLANG_WARN_INT_CONVERSION = YES; 298 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 299 | CLANG_WARN_UNREACHABLE_CODE = YES; 300 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 301 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 302 | COPY_PHASE_STRIP = NO; 303 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 304 | ENABLE_NS_ASSERTIONS = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_NO_COMMON_BLOCKS = YES; 308 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 309 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 310 | GCC_WARN_UNDECLARED_SELECTOR = YES; 311 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 312 | GCC_WARN_UNUSED_FUNCTION = YES; 313 | GCC_WARN_UNUSED_VARIABLE = YES; 314 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 315 | MTL_ENABLE_DEBUG_INFO = NO; 316 | SDKROOT = iphoneos; 317 | VALIDATE_PRODUCT = YES; 318 | }; 319 | name = Release; 320 | }; 321 | B26F433E1BF023FB00C1CDF2 /* Debug */ = { 322 | isa = XCBuildConfiguration; 323 | baseConfigurationReference = 0F5A57F428B81F8B487E6343 /* Pods-TriplePlay.debug.xcconfig */; 324 | buildSettings = { 325 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 326 | INFOPLIST_FILE = TriplePlay/Info.plist; 327 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 328 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.TriplePlay; 329 | PRODUCT_NAME = "$(TARGET_NAME)"; 330 | }; 331 | name = Debug; 332 | }; 333 | B26F433F1BF023FB00C1CDF2 /* Release */ = { 334 | isa = XCBuildConfiguration; 335 | baseConfigurationReference = 51B093B6CE8D510701A259F5 /* Pods-TriplePlay.release.xcconfig */; 336 | buildSettings = { 337 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 338 | INFOPLIST_FILE = TriplePlay/Info.plist; 339 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 340 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.TriplePlay; 341 | PRODUCT_NAME = "$(TARGET_NAME)"; 342 | }; 343 | name = Release; 344 | }; 345 | /* End XCBuildConfiguration section */ 346 | 347 | /* Begin XCConfigurationList section */ 348 | B26F43261BF023FB00C1CDF2 /* Build configuration list for PBXProject "TriplePlay" */ = { 349 | isa = XCConfigurationList; 350 | buildConfigurations = ( 351 | B26F433B1BF023FB00C1CDF2 /* Debug */, 352 | B26F433C1BF023FB00C1CDF2 /* Release */, 353 | ); 354 | defaultConfigurationIsVisible = 0; 355 | defaultConfigurationName = Release; 356 | }; 357 | B26F433D1BF023FB00C1CDF2 /* Build configuration list for PBXNativeTarget "TriplePlay" */ = { 358 | isa = XCConfigurationList; 359 | buildConfigurations = ( 360 | B26F433E1BF023FB00C1CDF2 /* Debug */, 361 | B26F433F1BF023FB00C1CDF2 /* Release */, 362 | ); 363 | defaultConfigurationIsVisible = 0; 364 | defaultConfigurationName = Release; 365 | }; 366 | /* End XCConfigurationList section */ 367 | }; 368 | rootObject = B26F43231BF023FB00C1CDF2 /* Project object */; 369 | } 370 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TriplePlay 4 | // 5 | // Created by Benny Wong on 11/8/15. 6 | // Copyright © 2015 Benny Wong. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /iOS/TriplePlay/TriplePlay/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TriplePlay 4 | // 5 | // Created by Benny Wong on 11/8/15. 6 | // Copyright © 2015 Benny Wong. All rights reserved. 7 | // 8 | 9 | import CocoaAsyncSocket 10 | 11 | class ViewController: UIViewController, NSNetServiceDelegate, GCDAsyncSocketDelegate { 12 | @IBOutlet var authenticationButton: UIButton? 13 | @IBOutlet var spinner: UIActivityIndicatorView? 14 | 15 | var netService: NSNetService? 16 | var socket: GCDAsyncSocket? 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | self.spinner?.hidden = true 21 | 22 | self.socket = GCDAsyncSocket(delegate: self, delegateQueue: dispatch_get_main_queue()) 23 | } 24 | 25 | @IBAction func startAuthentication() { 26 | do { 27 | try self.socket?.acceptOnPort(0) 28 | } catch { 29 | // TODO 30 | } 31 | 32 | let port = Int32(self.socket!.localPort) 33 | 34 | self.netService = NSNetService(domain: "local.", type: "_timehop_auth._tcp.", name: "Timehop Auth", port: port) 35 | self.netService?.delegate = self 36 | self.netService?.publish() 37 | 38 | self.authenticationButton?.hidden = true 39 | self.spinner?.hidden = false 40 | } 41 | 42 | // mark: NSNetServiceDelegate 43 | func netServiceDidPublish(sender: NSNetService) { 44 | NSLog("Published net service!") 45 | } 46 | 47 | func netService(sender: NSNetService, didNotPublish errorDict: [String : NSNumber]) { 48 | NSLog("Failed to publish service: \(errorDict)") 49 | self.netService = nil 50 | } 51 | 52 | // GCDAsyncSocketDelegate 53 | func socket(sock: GCDAsyncSocket!, didAcceptNewSocket newSocket: GCDAsyncSocket!) { 54 | NSLog("Got new connection") 55 | 56 | let data = "SOME_AUTH_TOKEN".dataUsingEncoding(NSUTF8StringEncoding) 57 | newSocket.writeData(data, withTimeout: -1.0, tag: 0) 58 | } 59 | 60 | func socketDidDisconnect(sock: GCDAsyncSocket!, withError err: NSError!) { 61 | self.netService = nil 62 | 63 | self.authenticationButton?.hidden = false 64 | self.spinner?.hidden = true 65 | 66 | let controller = UIAlertController(title: "Authentication Succeeded!", message: "", preferredStyle: .Alert) 67 | let action = UIAlertAction(title: "OK", style: .Default) { 68 | _ in 69 | controller.dismissViewControllerAnimated(true, completion: nil) 70 | } 71 | controller.addAction(action) 72 | self.presentViewController(controller, animated: true, completion: nil) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /tvOS/Timehop/Podfile: -------------------------------------------------------------------------------- 1 | platform :tvos 2 | 3 | use_frameworks! 4 | 5 | target 'Timehop' do 6 | pod 'CocoaAsyncSocket' 7 | end 8 | -------------------------------------------------------------------------------- /tvOS/Timehop/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.2.2) 3 | 4 | DEPENDENCIES: 5 | - CocoaAsyncSocket 6 | 7 | SPEC CHECKSUMS: 8 | CocoaAsyncSocket: 7ddbc667d52f23bf1d79988b53c61976b8ddbd24 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B209FEB91BE82F0F00F84250 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B209FEB81BE82F0F00F84250 /* AppDelegate.swift */; }; 11 | B209FEBB1BE82F0F00F84250 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B209FEBA1BE82F0F00F84250 /* ViewController.swift */; }; 12 | B209FEBE1BE82F0F00F84250 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B209FEBC1BE82F0F00F84250 /* Main.storyboard */; }; 13 | B209FEC01BE82F0F00F84250 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B209FEBF1BE82F0F00F84250 /* Assets.xcassets */; }; 14 | B24A4D6E1BE9C8A800397CE7 /* AuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B24A4D6D1BE9C8A800397CE7 /* AuthViewController.swift */; }; 15 | FC581BADC759C3FE5E3596E2 /* Pods_Timehop.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2763DB756D81110EB18E07D5 /* Pods_Timehop.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | B209FEC71BE82F0F00F84250 /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = B209FEAD1BE82F0F00F84250 /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = B209FEB41BE82F0F00F84250; 24 | remoteInfo = Timehop; 25 | }; 26 | B209FED21BE82F0F00F84250 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = B209FEAD1BE82F0F00F84250 /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = B209FEB41BE82F0F00F84250; 31 | remoteInfo = Timehop; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 2763DB756D81110EB18E07D5 /* Pods_Timehop.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Timehop.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | B0862DD9629437924C6F11D7 /* Pods-Timehop.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Timehop.release.xcconfig"; path = "Pods/Target Support Files/Pods-Timehop/Pods-Timehop.release.xcconfig"; sourceTree = ""; }; 38 | B209FEB51BE82F0F00F84250 /* Timehop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Timehop.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | B209FEB81BE82F0F00F84250 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | B209FEBA1BE82F0F00F84250 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 41 | B209FEBD1BE82F0F00F84250 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | B209FEBF1BE82F0F00F84250 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | B209FEC11BE82F0F00F84250 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | B209FEC61BE82F0F00F84250 /* TimehopTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TimehopTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | B209FED11BE82F0F00F84250 /* TimehopUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TimehopUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | B24A4D6D1BE9C8A800397CE7 /* AuthViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthViewController.swift; sourceTree = ""; }; 47 | D7D60B55EEC2762F553B43C4 /* Pods-Timehop.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Timehop.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Timehop/Pods-Timehop.debug.xcconfig"; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXFrameworksBuildPhase section */ 51 | B209FEB21BE82F0F00F84250 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | FC581BADC759C3FE5E3596E2 /* Pods_Timehop.framework in Frameworks */, 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | B209FEC31BE82F0F00F84250 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | B209FECE1BE82F0F00F84250 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 20EC94455B17ED2777F875F9 /* Frameworks */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 2763DB756D81110EB18E07D5 /* Pods_Timehop.framework */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 51AD2A776928CBACEAA3D205 /* Pods */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | D7D60B55EEC2762F553B43C4 /* Pods-Timehop.debug.xcconfig */, 88 | B0862DD9629437924C6F11D7 /* Pods-Timehop.release.xcconfig */, 89 | ); 90 | name = Pods; 91 | sourceTree = ""; 92 | }; 93 | B209FEAC1BE82F0F00F84250 = { 94 | isa = PBXGroup; 95 | children = ( 96 | B209FEB71BE82F0F00F84250 /* Timehop */, 97 | B209FEB61BE82F0F00F84250 /* Products */, 98 | 51AD2A776928CBACEAA3D205 /* Pods */, 99 | 20EC94455B17ED2777F875F9 /* Frameworks */, 100 | ); 101 | sourceTree = ""; 102 | }; 103 | B209FEB61BE82F0F00F84250 /* Products */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | B209FEB51BE82F0F00F84250 /* Timehop.app */, 107 | B209FEC61BE82F0F00F84250 /* TimehopTests.xctest */, 108 | B209FED11BE82F0F00F84250 /* TimehopUITests.xctest */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | B209FEB71BE82F0F00F84250 /* Timehop */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | B209FEB81BE82F0F00F84250 /* AppDelegate.swift */, 117 | B209FEBA1BE82F0F00F84250 /* ViewController.swift */, 118 | B24A4D6D1BE9C8A800397CE7 /* AuthViewController.swift */, 119 | B209FEBC1BE82F0F00F84250 /* Main.storyboard */, 120 | B209FEBF1BE82F0F00F84250 /* Assets.xcassets */, 121 | B209FEC11BE82F0F00F84250 /* Info.plist */, 122 | ); 123 | path = Timehop; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | B209FEB41BE82F0F00F84250 /* Timehop */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = B209FEDA1BE82F0F00F84250 /* Build configuration list for PBXNativeTarget "Timehop" */; 132 | buildPhases = ( 133 | 0A0A22FE7F13D392E5A00919 /* Check Pods Manifest.lock */, 134 | B209FEB11BE82F0F00F84250 /* Sources */, 135 | B209FEB21BE82F0F00F84250 /* Frameworks */, 136 | B209FEB31BE82F0F00F84250 /* Resources */, 137 | EA20B8817D44F247A250D427 /* Embed Pods Frameworks */, 138 | F89682C06347F891DD217650 /* Copy Pods Resources */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = Timehop; 145 | productName = Timehop; 146 | productReference = B209FEB51BE82F0F00F84250 /* Timehop.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | B209FEC51BE82F0F00F84250 /* TimehopTests */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = B209FEDD1BE82F0F00F84250 /* Build configuration list for PBXNativeTarget "TimehopTests" */; 152 | buildPhases = ( 153 | B209FEC21BE82F0F00F84250 /* Sources */, 154 | B209FEC31BE82F0F00F84250 /* Frameworks */, 155 | B209FEC41BE82F0F00F84250 /* Resources */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | B209FEC81BE82F0F00F84250 /* PBXTargetDependency */, 161 | ); 162 | name = TimehopTests; 163 | productName = TimehopTests; 164 | productReference = B209FEC61BE82F0F00F84250 /* TimehopTests.xctest */; 165 | productType = "com.apple.product-type.bundle.unit-test"; 166 | }; 167 | B209FED01BE82F0F00F84250 /* TimehopUITests */ = { 168 | isa = PBXNativeTarget; 169 | buildConfigurationList = B209FEE01BE82F0F00F84250 /* Build configuration list for PBXNativeTarget "TimehopUITests" */; 170 | buildPhases = ( 171 | B209FECD1BE82F0F00F84250 /* Sources */, 172 | B209FECE1BE82F0F00F84250 /* Frameworks */, 173 | B209FECF1BE82F0F00F84250 /* Resources */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | B209FED31BE82F0F00F84250 /* PBXTargetDependency */, 179 | ); 180 | name = TimehopUITests; 181 | productName = TimehopUITests; 182 | productReference = B209FED11BE82F0F00F84250 /* TimehopUITests.xctest */; 183 | productType = "com.apple.product-type.bundle.ui-testing"; 184 | }; 185 | /* End PBXNativeTarget section */ 186 | 187 | /* Begin PBXProject section */ 188 | B209FEAD1BE82F0F00F84250 /* Project object */ = { 189 | isa = PBXProject; 190 | attributes = { 191 | LastSwiftUpdateCheck = 0710; 192 | LastUpgradeCheck = 0710; 193 | ORGANIZATIONNAME = "Benny Wong"; 194 | TargetAttributes = { 195 | B209FEB41BE82F0F00F84250 = { 196 | CreatedOnToolsVersion = 7.1; 197 | }; 198 | B209FEC51BE82F0F00F84250 = { 199 | CreatedOnToolsVersion = 7.1; 200 | TestTargetID = B209FEB41BE82F0F00F84250; 201 | }; 202 | B209FED01BE82F0F00F84250 = { 203 | CreatedOnToolsVersion = 7.1; 204 | TestTargetID = B209FEB41BE82F0F00F84250; 205 | }; 206 | }; 207 | }; 208 | buildConfigurationList = B209FEB01BE82F0F00F84250 /* Build configuration list for PBXProject "Timehop" */; 209 | compatibilityVersion = "Xcode 3.2"; 210 | developmentRegion = English; 211 | hasScannedForEncodings = 0; 212 | knownRegions = ( 213 | en, 214 | Base, 215 | ); 216 | mainGroup = B209FEAC1BE82F0F00F84250; 217 | productRefGroup = B209FEB61BE82F0F00F84250 /* Products */; 218 | projectDirPath = ""; 219 | projectRoot = ""; 220 | targets = ( 221 | B209FEB41BE82F0F00F84250 /* Timehop */, 222 | B209FEC51BE82F0F00F84250 /* TimehopTests */, 223 | B209FED01BE82F0F00F84250 /* TimehopUITests */, 224 | ); 225 | }; 226 | /* End PBXProject section */ 227 | 228 | /* Begin PBXResourcesBuildPhase section */ 229 | B209FEB31BE82F0F00F84250 /* Resources */ = { 230 | isa = PBXResourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | B209FEC01BE82F0F00F84250 /* Assets.xcassets in Resources */, 234 | B209FEBE1BE82F0F00F84250 /* Main.storyboard in Resources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | B209FEC41BE82F0F00F84250 /* Resources */ = { 239 | isa = PBXResourcesBuildPhase; 240 | buildActionMask = 2147483647; 241 | files = ( 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | B209FECF1BE82F0F00F84250 /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXResourcesBuildPhase section */ 253 | 254 | /* Begin PBXShellScriptBuildPhase section */ 255 | 0A0A22FE7F13D392E5A00919 /* Check Pods Manifest.lock */ = { 256 | isa = PBXShellScriptBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | inputPaths = ( 261 | ); 262 | name = "Check Pods Manifest.lock"; 263 | outputPaths = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 268 | showEnvVarsInLog = 0; 269 | }; 270 | EA20B8817D44F247A250D427 /* Embed Pods Frameworks */ = { 271 | isa = PBXShellScriptBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | ); 275 | inputPaths = ( 276 | ); 277 | name = "Embed Pods Frameworks"; 278 | outputPaths = ( 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | shellPath = /bin/sh; 282 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Timehop/Pods-Timehop-frameworks.sh\"\n"; 283 | showEnvVarsInLog = 0; 284 | }; 285 | F89682C06347F891DD217650 /* Copy Pods Resources */ = { 286 | isa = PBXShellScriptBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | ); 290 | inputPaths = ( 291 | ); 292 | name = "Copy Pods Resources"; 293 | outputPaths = ( 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | shellPath = /bin/sh; 297 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Timehop/Pods-Timehop-resources.sh\"\n"; 298 | showEnvVarsInLog = 0; 299 | }; 300 | /* End PBXShellScriptBuildPhase section */ 301 | 302 | /* Begin PBXSourcesBuildPhase section */ 303 | B209FEB11BE82F0F00F84250 /* Sources */ = { 304 | isa = PBXSourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | B209FEBB1BE82F0F00F84250 /* ViewController.swift in Sources */, 308 | B24A4D6E1BE9C8A800397CE7 /* AuthViewController.swift in Sources */, 309 | B209FEB91BE82F0F00F84250 /* AppDelegate.swift in Sources */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | B209FEC21BE82F0F00F84250 /* Sources */ = { 314 | isa = PBXSourcesBuildPhase; 315 | buildActionMask = 2147483647; 316 | files = ( 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | B209FECD1BE82F0F00F84250 /* Sources */ = { 321 | isa = PBXSourcesBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | }; 327 | /* End PBXSourcesBuildPhase section */ 328 | 329 | /* Begin PBXTargetDependency section */ 330 | B209FEC81BE82F0F00F84250 /* PBXTargetDependency */ = { 331 | isa = PBXTargetDependency; 332 | target = B209FEB41BE82F0F00F84250 /* Timehop */; 333 | targetProxy = B209FEC71BE82F0F00F84250 /* PBXContainerItemProxy */; 334 | }; 335 | B209FED31BE82F0F00F84250 /* PBXTargetDependency */ = { 336 | isa = PBXTargetDependency; 337 | target = B209FEB41BE82F0F00F84250 /* Timehop */; 338 | targetProxy = B209FED21BE82F0F00F84250 /* PBXContainerItemProxy */; 339 | }; 340 | /* End PBXTargetDependency section */ 341 | 342 | /* Begin PBXVariantGroup section */ 343 | B209FEBC1BE82F0F00F84250 /* Main.storyboard */ = { 344 | isa = PBXVariantGroup; 345 | children = ( 346 | B209FEBD1BE82F0F00F84250 /* Base */, 347 | ); 348 | name = Main.storyboard; 349 | sourceTree = ""; 350 | }; 351 | /* End PBXVariantGroup section */ 352 | 353 | /* Begin XCBuildConfiguration section */ 354 | B209FED81BE82F0F00F84250 /* Debug */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | ALWAYS_SEARCH_USER_PATHS = NO; 358 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 359 | CLANG_CXX_LIBRARY = "libc++"; 360 | CLANG_ENABLE_MODULES = YES; 361 | CLANG_ENABLE_OBJC_ARC = YES; 362 | CLANG_WARN_BOOL_CONVERSION = YES; 363 | CLANG_WARN_CONSTANT_CONVERSION = YES; 364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 365 | CLANG_WARN_EMPTY_BODY = YES; 366 | CLANG_WARN_ENUM_CONVERSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_UNREACHABLE_CODE = YES; 370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 371 | COPY_PHASE_STRIP = NO; 372 | DEBUG_INFORMATION_FORMAT = dwarf; 373 | ENABLE_STRICT_OBJC_MSGSEND = YES; 374 | ENABLE_TESTABILITY = YES; 375 | GCC_C_LANGUAGE_STANDARD = gnu99; 376 | GCC_DYNAMIC_NO_PIC = NO; 377 | GCC_NO_COMMON_BLOCKS = YES; 378 | GCC_OPTIMIZATION_LEVEL = 0; 379 | GCC_PREPROCESSOR_DEFINITIONS = ( 380 | "DEBUG=1", 381 | "$(inherited)", 382 | ); 383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 385 | GCC_WARN_UNDECLARED_SELECTOR = YES; 386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 387 | GCC_WARN_UNUSED_FUNCTION = YES; 388 | GCC_WARN_UNUSED_VARIABLE = YES; 389 | MTL_ENABLE_DEBUG_INFO = YES; 390 | ONLY_ACTIVE_ARCH = YES; 391 | SDKROOT = appletvos; 392 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 393 | TARGETED_DEVICE_FAMILY = 3; 394 | TVOS_DEPLOYMENT_TARGET = 9.0; 395 | }; 396 | name = Debug; 397 | }; 398 | B209FED91BE82F0F00F84250 /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 403 | CLANG_CXX_LIBRARY = "libc++"; 404 | CLANG_ENABLE_MODULES = YES; 405 | CLANG_ENABLE_OBJC_ARC = YES; 406 | CLANG_WARN_BOOL_CONVERSION = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 409 | CLANG_WARN_EMPTY_BODY = YES; 410 | CLANG_WARN_ENUM_CONVERSION = YES; 411 | CLANG_WARN_INT_CONVERSION = YES; 412 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | COPY_PHASE_STRIP = NO; 416 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 417 | ENABLE_NS_ASSERTIONS = NO; 418 | ENABLE_STRICT_OBJC_MSGSEND = YES; 419 | GCC_C_LANGUAGE_STANDARD = gnu99; 420 | GCC_NO_COMMON_BLOCKS = YES; 421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 423 | GCC_WARN_UNDECLARED_SELECTOR = YES; 424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 425 | GCC_WARN_UNUSED_FUNCTION = YES; 426 | GCC_WARN_UNUSED_VARIABLE = YES; 427 | MTL_ENABLE_DEBUG_INFO = NO; 428 | SDKROOT = appletvos; 429 | TARGETED_DEVICE_FAMILY = 3; 430 | TVOS_DEPLOYMENT_TARGET = 9.0; 431 | VALIDATE_PRODUCT = YES; 432 | }; 433 | name = Release; 434 | }; 435 | B209FEDB1BE82F0F00F84250 /* Debug */ = { 436 | isa = XCBuildConfiguration; 437 | baseConfigurationReference = D7D60B55EEC2762F553B43C4 /* Pods-Timehop.debug.xcconfig */; 438 | buildSettings = { 439 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 440 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 441 | INFOPLIST_FILE = Timehop/Info.plist; 442 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 443 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.Timehop; 444 | PRODUCT_NAME = "$(TARGET_NAME)"; 445 | }; 446 | name = Debug; 447 | }; 448 | B209FEDC1BE82F0F00F84250 /* Release */ = { 449 | isa = XCBuildConfiguration; 450 | baseConfigurationReference = B0862DD9629437924C6F11D7 /* Pods-Timehop.release.xcconfig */; 451 | buildSettings = { 452 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 453 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 454 | INFOPLIST_FILE = Timehop/Info.plist; 455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 456 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.Timehop; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | }; 459 | name = Release; 460 | }; 461 | B209FEDE1BE82F0F00F84250 /* Debug */ = { 462 | isa = XCBuildConfiguration; 463 | buildSettings = { 464 | BUNDLE_LOADER = "$(TEST_HOST)"; 465 | INFOPLIST_FILE = TimehopTests/Info.plist; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 467 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.TimehopTests; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Timehop.app/Timehop"; 470 | }; 471 | name = Debug; 472 | }; 473 | B209FEDF1BE82F0F00F84250 /* Release */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | BUNDLE_LOADER = "$(TEST_HOST)"; 477 | INFOPLIST_FILE = TimehopTests/Info.plist; 478 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 479 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.TimehopTests; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Timehop.app/Timehop"; 482 | }; 483 | name = Release; 484 | }; 485 | B209FEE11BE82F0F00F84250 /* Debug */ = { 486 | isa = XCBuildConfiguration; 487 | buildSettings = { 488 | INFOPLIST_FILE = TimehopUITests/Info.plist; 489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 490 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.TimehopUITests; 491 | PRODUCT_NAME = "$(TARGET_NAME)"; 492 | TEST_TARGET_NAME = Timehop; 493 | USES_XCTRUNNER = YES; 494 | }; 495 | name = Debug; 496 | }; 497 | B209FEE21BE82F0F00F84250 /* Release */ = { 498 | isa = XCBuildConfiguration; 499 | buildSettings = { 500 | INFOPLIST_FILE = TimehopUITests/Info.plist; 501 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 502 | PRODUCT_BUNDLE_IDENTIFIER = net.bwong.TimehopUITests; 503 | PRODUCT_NAME = "$(TARGET_NAME)"; 504 | TEST_TARGET_NAME = Timehop; 505 | USES_XCTRUNNER = YES; 506 | }; 507 | name = Release; 508 | }; 509 | /* End XCBuildConfiguration section */ 510 | 511 | /* Begin XCConfigurationList section */ 512 | B209FEB01BE82F0F00F84250 /* Build configuration list for PBXProject "Timehop" */ = { 513 | isa = XCConfigurationList; 514 | buildConfigurations = ( 515 | B209FED81BE82F0F00F84250 /* Debug */, 516 | B209FED91BE82F0F00F84250 /* Release */, 517 | ); 518 | defaultConfigurationIsVisible = 0; 519 | defaultConfigurationName = Release; 520 | }; 521 | B209FEDA1BE82F0F00F84250 /* Build configuration list for PBXNativeTarget "Timehop" */ = { 522 | isa = XCConfigurationList; 523 | buildConfigurations = ( 524 | B209FEDB1BE82F0F00F84250 /* Debug */, 525 | B209FEDC1BE82F0F00F84250 /* Release */, 526 | ); 527 | defaultConfigurationIsVisible = 0; 528 | defaultConfigurationName = Release; 529 | }; 530 | B209FEDD1BE82F0F00F84250 /* Build configuration list for PBXNativeTarget "TimehopTests" */ = { 531 | isa = XCConfigurationList; 532 | buildConfigurations = ( 533 | B209FEDE1BE82F0F00F84250 /* Debug */, 534 | B209FEDF1BE82F0F00F84250 /* Release */, 535 | ); 536 | defaultConfigurationIsVisible = 0; 537 | defaultConfigurationName = Release; 538 | }; 539 | B209FEE01BE82F0F00F84250 /* Build configuration list for PBXNativeTarget "TimehopUITests" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | B209FEE11BE82F0F00F84250 /* Debug */, 543 | B209FEE21BE82F0F00F84250 /* Release */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | defaultConfigurationName = Release; 547 | }; 548 | /* End XCConfigurationList section */ 549 | }; 550 | rootObject = B209FEAD1BE82F0F00F84250 /* Project object */; 551 | } 552 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Timehop 4 | // 5 | // Created by Benny Wong on 11/2/15. 6 | // Copyright © 2015 Benny Wong. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | var window: UIWindow? 14 | } 15 | 16 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/1.imageset/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdotdub/TriplePlay/aa0835f38a7fbf396778983743af33cd7112f96b/tvOS/Timehop/Timehop/Assets.xcassets/1.imageset/1.jpg -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/2.imageset/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdotdub/TriplePlay/aa0835f38a7fbf396778983743af33cd7112f96b/tvOS/Timehop/Timehop/Assets.xcassets/2.imageset/2.jpg -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/3.imageset/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdotdub/TriplePlay/aa0835f38a7fbf396778983743af33cd7112f96b/tvOS/Timehop/Timehop/Assets.xcassets/3.imageset/3.jpg -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/4.imageset/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdotdub/TriplePlay/aa0835f38a7fbf396778983743af33cd7112f96b/tvOS/Timehop/Timehop/Assets.xcassets/4.imageset/4.jpg -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - Large.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon - Small.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "1920x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image.imageset", 19 | "role" : "top-shelf-image" 20 | } 21 | ], 22 | "info" : { 23 | "version" : 1, 24 | "author" : "xcode" 25 | } 26 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/main.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "launch@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Assets.xcassets/main.imageset/launch@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdotdub/TriplePlay/aa0835f38a7fbf396778983743af33cd7112f96b/tvOS/Timehop/Timehop/Assets.xcassets/main.imageset/launch@2x.png -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/AuthViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AuthViewController.swift 3 | // Timehop 4 | // 5 | // Created by Benny Wong on 11/4/15. 6 | // Copyright © 2015 Benny Wong. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CocoaAsyncSocket 11 | 12 | class AuthViewController: UIViewController, NSNetServiceBrowserDelegate, NSNetServiceDelegate, GCDAsyncSocketDelegate { 13 | var browser = NSNetServiceBrowser() 14 | var service: NSNetService? 15 | var socket: GCDAsyncSocket? 16 | var sockets = [GCDAsyncSocket]() 17 | 18 | override func viewDidLoad() { 19 | // Start searching for services 20 | self.browser.delegate = self 21 | self.browser.searchForServicesOfType("_timehop_auth._tcp", inDomain: "local.") 22 | } 23 | 24 | // mark: NSNetServiceBrowserDelegate 25 | func netServiceBrowser(browser: NSNetServiceBrowser, didFindService service: NSNetService, moreComing: Bool) { 26 | // Hold a strong reference to service to it isn't dealloc-ed 27 | self.service = service 28 | 29 | self.service!.delegate = self 30 | self.service!.resolveWithTimeout(30) 31 | } 32 | 33 | // mark: NSNetServiceDelegate 34 | func netServiceDidResolveAddress(sender: NSNetService) { 35 | self.socket = GCDAsyncSocket(delegate: self, delegateQueue: dispatch_get_main_queue()) 36 | 37 | do { 38 | // Connect to 39 | try self.socket!.connectToAddress(sender.addresses![0]) 40 | } catch { 41 | self.presentError("Could not connect to service: \(sender.name)") 42 | } 43 | } 44 | 45 | func netService(sender: NSNetService, didNotResolve errorDict: [String : NSNumber]) { 46 | self.presentError("Could not resolve service: \(sender.name)") 47 | } 48 | 49 | // GCDAsyncSockerDelegate 50 | func socket(sock: GCDAsyncSocket!, didConnectToHost host: String!, port: UInt16) { 51 | // Once connected, let's start reading data! 52 | sock.readDataWithTimeout(-1, tag: 0) 53 | } 54 | 55 | func socket(sock: GCDAsyncSocket!, didReadData data: NSData!, withTag tag: Int) { 56 | // Read data from iOS service - in this case, an authentication token. 57 | let message = String(data: data!, encoding: NSUTF8StringEncoding) 58 | 59 | // Show the token 60 | let controller = UIAlertController(title: "Got token!", message: message!, preferredStyle: .Alert) 61 | controller.addAction(UIAlertAction(title: "OK", style: .Default) { 62 | _ in 63 | controller.dismissViewControllerAnimated(true, completion: nil) 64 | self.performSegueWithIdentifier("LoggedIn", sender: self) 65 | }) 66 | 67 | self.presentViewController(controller, animated: true, completion: nil) 68 | 69 | // Disconnect 70 | sock.disconnect() 71 | self.browser.stop() 72 | } 73 | 74 | // Utility 75 | func presentError(message: String) { 76 | let controller = UIAlertController(title: "An Error Occurred", message: message, preferredStyle: .Alert) 77 | controller.addAction(UIAlertAction(title: "OK", style: .Default) { 78 | _ in 79 | controller.dismissViewControllerAnimated(true, completion: nil) 80 | }) 81 | 82 | self.presentViewController(controller, animated: true, completion: nil) 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | arm64 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tvOS/Timehop/Timehop/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Timehop 4 | // 5 | // Created by Benny Wong on 11/2/15. 6 | // Copyright © 2015 Benny Wong. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | } --------------------------------------------------------------------------------