├── .gitignore ├── README.md ├── WatchKitOpenAppDemo WatchKit App ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── Info.plist └── Interface.storyboard ├── WatchKitOpenAppDemo WatchKit Extension ├── Images.xcassets │ └── MyImage.imageset │ │ └── Contents.json ├── Info.plist └── InterfaceController.swift ├── WatchKitOpenAppDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── WatchKitOpenAppDemo ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── ColorInfo.swift ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist └── ViewController.swift └── WatchKitOpenAppDemoTests ├── Info.plist └── WatchKitOpenAppDemoTests.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 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | WatchKitOpenApplicationDemo 2 | =========================== 3 | 4 | Open iOS Application from your WatchKit app and pass info 5 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "14.5x14.5", 5 | "idiom" : "watch", 6 | "scale" : "2x", 7 | "role" : "notificationCenter", 8 | "subtype" : "38mm" 9 | }, 10 | { 11 | "size" : "18x18", 12 | "idiom" : "watch", 13 | "scale" : "2x", 14 | "role" : "notificationCenter", 15 | "subtype" : "42mm" 16 | }, 17 | { 18 | "size" : "29x29", 19 | "idiom" : "watch", 20 | "role" : "companionSettings", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "size" : "29.3x29.3", 25 | "idiom" : "watch", 26 | "role" : "companionSettings", 27 | "scale" : "3x" 28 | }, 29 | { 30 | "size" : "40x40", 31 | "idiom" : "watch", 32 | "scale" : "2x", 33 | "role" : "appLauncher", 34 | "subtype" : "38mm" 35 | }, 36 | { 37 | "size" : "44x44", 38 | "idiom" : "watch", 39 | "scale" : "2x", 40 | "role" : "appLauncher", 41 | "subtype" : "42mm" 42 | }, 43 | { 44 | "size" : "86x86", 45 | "idiom" : "watch", 46 | "scale" : "2x", 47 | "role" : "quickLook", 48 | "subtype" : "38mm" 49 | }, 50 | { 51 | "size" : "98x98", 52 | "idiom" : "watch", 53 | "scale" : "2x", 54 | "role" : "quickLook", 55 | "subtype" : "42mm" 56 | } 57 | ], 58 | "info" : { 59 | "version" : 1, 60 | "author" : "xcode" 61 | } 62 | } -------------------------------------------------------------------------------- /WatchKitOpenAppDemo WatchKit App/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "watch", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "8.0", 8 | "subtype" : "38mm", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "orientation" : "portrait", 13 | "idiom" : "watch", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "8.0", 16 | "subtype" : "42mm", 17 | "scale" : "2x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /WatchKitOpenAppDemo WatchKit App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | WatchKitOpenAppDemo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | com.natashatherobot.WatchKitOpenAppDemo.watchkitapp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | UISupportedInterfaceOrientations 26 | 27 | UIInterfaceOrientationPortrait 28 | UIInterfaceOrientationPortraitUpsideDown 29 | 30 | WKCompanionAppBundleIdentifier 31 | com.natashatherobot.WatchKitOpenAppDemo 32 | WKWatchKitApp 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo WatchKit App/Interface.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo WatchKit Extension/Images.xcassets/MyImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x" 14 | } 15 | ], 16 | "info" : { 17 | "version" : 1, 18 | "author" : "xcode" 19 | } 20 | } -------------------------------------------------------------------------------- /WatchKitOpenAppDemo WatchKit Extension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | WatchKitOpenAppDemo WatchKit Extension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | com.natashatherobot.WatchKitOpenAppDemo.watchkitextension 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | WKAppBundleIdentifier 30 | com.natashatherobot.WatchKitOpenAppDemo.watchkitapp 31 | 32 | NSExtensionPointIdentifier 33 | com.apple.watchkit 34 | 35 | RemoteInterfacePrincipalClass 36 | $(PRODUCT_MODULE_NAME).InterfaceController 37 | 38 | 39 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo WatchKit Extension/InterfaceController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.swift 3 | // WatchKitOpenAppDemo WatchKit Extension 4 | // 5 | // Created by Natasha Murashev on 12/11/14. 6 | // Copyright (c) 2014 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import WatchKit 10 | import Foundation 11 | 12 | 13 | class InterfaceController: WKInterfaceController { 14 | 15 | @IBOutlet weak var colorGroup: WKInterfaceGroup! 16 | 17 | override func awakeWithContext(context: AnyObject?) { 18 | super.awakeWithContext(context) 19 | 20 | // Configure interface objects here. 21 | NSLog("%@ awakeWithContext", self) 22 | } 23 | 24 | override func willActivate() { 25 | // This method is called when watch view controller is about to be visible to user 26 | super.willActivate() 27 | NSLog("%@ will activate", self) 28 | } 29 | 30 | override func didDeactivate() { 31 | // This method is called when watch view controller is no longer visible 32 | NSLog("%@ did deactivate", self) 33 | super.didDeactivate() 34 | } 35 | 36 | //MARK: Actions 37 | 38 | // 39 | // InterfaceController.swift 40 | // WatchKitOpenAppDemo WatchKit Extension 41 | 42 | @IBAction func onMarcoButtonTap() { 43 | 44 | let randomColorComponents = [ 45 | "red" : CGFloat(arc4random() % 255), 46 | "green" : CGFloat(arc4random() % 255), 47 | "blue" : CGFloat(arc4random() % 255)] 48 | 49 | WKInterfaceController.openParentApplication(randomColorComponents, 50 | reply: { [unowned self](reply, error) -> Void in 51 | 52 | if let reply = reply as? [String : CGFloat] { 53 | switch (reply["red"], reply["green"], reply["blue"]) { 54 | case let (.Some(red), .Some(green), .Some(blue)): 55 | 56 | let color = UIColor( 57 | red: red/255.0, 58 | green: green/255.0, 59 | blue: blue/255.0, 60 | alpha: 1.0) 61 | 62 | self.colorGroup.setBackgroundColor(color) 63 | default: 64 | self.colorGroup.setBackgroundColor(UIColor.blackColor()) 65 | } 66 | } else { 67 | self.colorGroup.setBackgroundColor(UIColor.blackColor()) 68 | } 69 | 70 | 71 | }) 72 | 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /WatchKitOpenAppDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FA09694F1A39D68D0041048C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA09694E1A39D68D0041048C /* AppDelegate.swift */; }; 11 | FA0969511A39D68D0041048C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0969501A39D68D0041048C /* ViewController.swift */; }; 12 | FA0969541A39D68D0041048C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA0969521A39D68D0041048C /* Main.storyboard */; }; 13 | FA0969561A39D68D0041048C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA0969551A39D68D0041048C /* Images.xcassets */; }; 14 | FA0969591A39D68D0041048C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA0969571A39D68D0041048C /* LaunchScreen.xib */; }; 15 | FA0969651A39D68D0041048C /* WatchKitOpenAppDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0969641A39D68D0041048C /* WatchKitOpenAppDemoTests.swift */; }; 16 | FA0969771A39D69A0041048C /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0969761A39D69A0041048C /* InterfaceController.swift */; }; 17 | FA0969791A39D69A0041048C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA0969781A39D69A0041048C /* Images.xcassets */; }; 18 | FA09697D1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App.app in Resources */ = {isa = PBXBuildFile; fileRef = FA09697C1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App.app */; }; 19 | FA0969841A39D69A0041048C /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA0969831A39D69A0041048C /* Interface.storyboard */; }; 20 | FA0969861A39D69A0041048C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA0969851A39D69A0041048C /* Images.xcassets */; }; 21 | FA0969891A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = FA0969721A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 22 | FACEDD741A3DB0E4002E9F0A /* ColorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = FACEDD731A3DB0E4002E9F0A /* ColorInfo.swift */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | FA09695F1A39D68D0041048C /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = FA0969411A39D68D0041048C /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = FA0969481A39D68D0041048C; 31 | remoteInfo = WatchKitOpenAppDemo; 32 | }; 33 | FA09697E1A39D69A0041048C /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = FA0969411A39D68D0041048C /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = FA09697B1A39D69A0041048C; 38 | remoteInfo = "WatchKitOpenAppDemo WatchKit App"; 39 | }; 40 | FA0969871A39D69A0041048C /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = FA0969411A39D68D0041048C /* Project object */; 43 | proxyType = 1; 44 | remoteGlobalIDString = FA0969711A39D69A0041048C; 45 | remoteInfo = "WatchKitOpenAppDemo WatchKit Extension"; 46 | }; 47 | /* End PBXContainerItemProxy section */ 48 | 49 | /* Begin PBXCopyFilesBuildPhase section */ 50 | FA0969901A39D69A0041048C /* Embed App Extensions */ = { 51 | isa = PBXCopyFilesBuildPhase; 52 | buildActionMask = 2147483647; 53 | dstPath = ""; 54 | dstSubfolderSpec = 13; 55 | files = ( 56 | FA0969891A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension.appex in Embed App Extensions */, 57 | ); 58 | name = "Embed App Extensions"; 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXCopyFilesBuildPhase section */ 62 | 63 | /* Begin PBXFileReference section */ 64 | FA0969491A39D68D0041048C /* WatchKitOpenAppDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatchKitOpenAppDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | FA09694D1A39D68D0041048C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | FA09694E1A39D68D0041048C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 67 | FA0969501A39D68D0041048C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 68 | FA0969531A39D68D0041048C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 69 | FA0969551A39D68D0041048C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 70 | FA0969581A39D68D0041048C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 71 | FA09695E1A39D68D0041048C /* WatchKitOpenAppDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WatchKitOpenAppDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 72 | FA0969631A39D68D0041048C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 73 | FA0969641A39D68D0041048C /* WatchKitOpenAppDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchKitOpenAppDemoTests.swift; sourceTree = ""; }; 74 | FA0969721A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "WatchKitOpenAppDemo WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | FA0969751A39D69A0041048C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 76 | FA0969761A39D69A0041048C /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; 77 | FA0969781A39D69A0041048C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 78 | FA09697C1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "WatchKitOpenAppDemo WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 79 | FA0969821A39D69A0041048C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 80 | FA0969831A39D69A0041048C /* Interface.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Interface.storyboard; sourceTree = ""; }; 81 | FA0969851A39D69A0041048C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 82 | FACEDD731A3DB0E4002E9F0A /* ColorInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorInfo.swift; sourceTree = ""; }; 83 | /* End PBXFileReference section */ 84 | 85 | /* Begin PBXFrameworksBuildPhase section */ 86 | FA0969461A39D68D0041048C /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | FA09695B1A39D68D0041048C /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | FA09696F1A39D69A0041048C /* Frameworks */ = { 101 | isa = PBXFrameworksBuildPhase; 102 | buildActionMask = 2147483647; 103 | files = ( 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | /* End PBXFrameworksBuildPhase section */ 108 | 109 | /* Begin PBXGroup section */ 110 | FA0969401A39D68D0041048C = { 111 | isa = PBXGroup; 112 | children = ( 113 | FA09694B1A39D68D0041048C /* WatchKitOpenAppDemo */, 114 | FA0969611A39D68D0041048C /* WatchKitOpenAppDemoTests */, 115 | FA0969731A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension */, 116 | FA0969801A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App */, 117 | FA09694A1A39D68D0041048C /* Products */, 118 | ); 119 | sourceTree = ""; 120 | }; 121 | FA09694A1A39D68D0041048C /* Products */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | FA0969491A39D68D0041048C /* WatchKitOpenAppDemo.app */, 125 | FA09695E1A39D68D0041048C /* WatchKitOpenAppDemoTests.xctest */, 126 | FA0969721A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension.appex */, 127 | FA09697C1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App.app */, 128 | ); 129 | name = Products; 130 | sourceTree = ""; 131 | }; 132 | FA09694B1A39D68D0041048C /* WatchKitOpenAppDemo */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | FA09694E1A39D68D0041048C /* AppDelegate.swift */, 136 | FA0969501A39D68D0041048C /* ViewController.swift */, 137 | FACEDD731A3DB0E4002E9F0A /* ColorInfo.swift */, 138 | FA0969521A39D68D0041048C /* Main.storyboard */, 139 | FA0969551A39D68D0041048C /* Images.xcassets */, 140 | FA0969571A39D68D0041048C /* LaunchScreen.xib */, 141 | FA09694C1A39D68D0041048C /* Supporting Files */, 142 | ); 143 | path = WatchKitOpenAppDemo; 144 | sourceTree = ""; 145 | }; 146 | FA09694C1A39D68D0041048C /* Supporting Files */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | FA09694D1A39D68D0041048C /* Info.plist */, 150 | ); 151 | name = "Supporting Files"; 152 | sourceTree = ""; 153 | }; 154 | FA0969611A39D68D0041048C /* WatchKitOpenAppDemoTests */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | FA0969641A39D68D0041048C /* WatchKitOpenAppDemoTests.swift */, 158 | FA0969621A39D68D0041048C /* Supporting Files */, 159 | ); 160 | path = WatchKitOpenAppDemoTests; 161 | sourceTree = ""; 162 | }; 163 | FA0969621A39D68D0041048C /* Supporting Files */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | FA0969631A39D68D0041048C /* Info.plist */, 167 | ); 168 | name = "Supporting Files"; 169 | sourceTree = ""; 170 | }; 171 | FA0969731A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | FA0969761A39D69A0041048C /* InterfaceController.swift */, 175 | FA0969781A39D69A0041048C /* Images.xcassets */, 176 | FA0969741A39D69A0041048C /* Supporting Files */, 177 | ); 178 | path = "WatchKitOpenAppDemo WatchKit Extension"; 179 | sourceTree = ""; 180 | }; 181 | FA0969741A39D69A0041048C /* Supporting Files */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | FA0969751A39D69A0041048C /* Info.plist */, 185 | ); 186 | name = "Supporting Files"; 187 | sourceTree = ""; 188 | }; 189 | FA0969801A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | FA0969831A39D69A0041048C /* Interface.storyboard */, 193 | FA0969851A39D69A0041048C /* Images.xcassets */, 194 | FA0969811A39D69A0041048C /* Supporting Files */, 195 | ); 196 | path = "WatchKitOpenAppDemo WatchKit App"; 197 | sourceTree = ""; 198 | }; 199 | FA0969811A39D69A0041048C /* Supporting Files */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | FA0969821A39D69A0041048C /* Info.plist */, 203 | ); 204 | name = "Supporting Files"; 205 | sourceTree = ""; 206 | }; 207 | /* End PBXGroup section */ 208 | 209 | /* Begin PBXNativeTarget section */ 210 | FA0969481A39D68D0041048C /* WatchKitOpenAppDemo */ = { 211 | isa = PBXNativeTarget; 212 | buildConfigurationList = FA0969681A39D68D0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemo" */; 213 | buildPhases = ( 214 | FA0969451A39D68D0041048C /* Sources */, 215 | FA0969461A39D68D0041048C /* Frameworks */, 216 | FA0969471A39D68D0041048C /* Resources */, 217 | FA0969901A39D69A0041048C /* Embed App Extensions */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | FA0969881A39D69A0041048C /* PBXTargetDependency */, 223 | ); 224 | name = WatchKitOpenAppDemo; 225 | productName = WatchKitOpenAppDemo; 226 | productReference = FA0969491A39D68D0041048C /* WatchKitOpenAppDemo.app */; 227 | productType = "com.apple.product-type.application"; 228 | }; 229 | FA09695D1A39D68D0041048C /* WatchKitOpenAppDemoTests */ = { 230 | isa = PBXNativeTarget; 231 | buildConfigurationList = FA09696B1A39D68D0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemoTests" */; 232 | buildPhases = ( 233 | FA09695A1A39D68D0041048C /* Sources */, 234 | FA09695B1A39D68D0041048C /* Frameworks */, 235 | FA09695C1A39D68D0041048C /* Resources */, 236 | ); 237 | buildRules = ( 238 | ); 239 | dependencies = ( 240 | FA0969601A39D68D0041048C /* PBXTargetDependency */, 241 | ); 242 | name = WatchKitOpenAppDemoTests; 243 | productName = WatchKitOpenAppDemoTests; 244 | productReference = FA09695E1A39D68D0041048C /* WatchKitOpenAppDemoTests.xctest */; 245 | productType = "com.apple.product-type.bundle.unit-test"; 246 | }; 247 | FA0969711A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension */ = { 248 | isa = PBXNativeTarget; 249 | buildConfigurationList = FA09698D1A39D69A0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemo WatchKit Extension" */; 250 | buildPhases = ( 251 | FA09696E1A39D69A0041048C /* Sources */, 252 | FA09696F1A39D69A0041048C /* Frameworks */, 253 | FA0969701A39D69A0041048C /* Resources */, 254 | ); 255 | buildRules = ( 256 | ); 257 | dependencies = ( 258 | FA09697F1A39D69A0041048C /* PBXTargetDependency */, 259 | ); 260 | name = "WatchKitOpenAppDemo WatchKit Extension"; 261 | productName = "WatchKitOpenAppDemo WatchKit Extension"; 262 | productReference = FA0969721A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension.appex */; 263 | productType = "com.apple.product-type.watchkit-extension"; 264 | }; 265 | FA09697B1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App */ = { 266 | isa = PBXNativeTarget; 267 | buildConfigurationList = FA09698A1A39D69A0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemo WatchKit App" */; 268 | buildPhases = ( 269 | FA09697A1A39D69A0041048C /* Resources */, 270 | ); 271 | buildRules = ( 272 | ); 273 | dependencies = ( 274 | ); 275 | name = "WatchKitOpenAppDemo WatchKit App"; 276 | productName = "WatchKitOpenAppDemo WatchKit App"; 277 | productReference = FA09697C1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App.app */; 278 | productType = "com.apple.product-type.application.watchapp"; 279 | }; 280 | /* End PBXNativeTarget section */ 281 | 282 | /* Begin PBXProject section */ 283 | FA0969411A39D68D0041048C /* Project object */ = { 284 | isa = PBXProject; 285 | attributes = { 286 | LastUpgradeCheck = 0620; 287 | ORGANIZATIONNAME = NatashaTheRobot; 288 | TargetAttributes = { 289 | FA0969481A39D68D0041048C = { 290 | CreatedOnToolsVersion = 6.2; 291 | }; 292 | FA09695D1A39D68D0041048C = { 293 | CreatedOnToolsVersion = 6.2; 294 | TestTargetID = FA0969481A39D68D0041048C; 295 | }; 296 | FA0969711A39D69A0041048C = { 297 | CreatedOnToolsVersion = 6.2; 298 | }; 299 | FA09697B1A39D69A0041048C = { 300 | CreatedOnToolsVersion = 6.2; 301 | }; 302 | }; 303 | }; 304 | buildConfigurationList = FA0969441A39D68D0041048C /* Build configuration list for PBXProject "WatchKitOpenAppDemo" */; 305 | compatibilityVersion = "Xcode 3.2"; 306 | developmentRegion = English; 307 | hasScannedForEncodings = 0; 308 | knownRegions = ( 309 | en, 310 | Base, 311 | ); 312 | mainGroup = FA0969401A39D68D0041048C; 313 | productRefGroup = FA09694A1A39D68D0041048C /* Products */; 314 | projectDirPath = ""; 315 | projectRoot = ""; 316 | targets = ( 317 | FA0969481A39D68D0041048C /* WatchKitOpenAppDemo */, 318 | FA09695D1A39D68D0041048C /* WatchKitOpenAppDemoTests */, 319 | FA0969711A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension */, 320 | FA09697B1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App */, 321 | ); 322 | }; 323 | /* End PBXProject section */ 324 | 325 | /* Begin PBXResourcesBuildPhase section */ 326 | FA0969471A39D68D0041048C /* Resources */ = { 327 | isa = PBXResourcesBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | FA0969541A39D68D0041048C /* Main.storyboard in Resources */, 331 | FA0969591A39D68D0041048C /* LaunchScreen.xib in Resources */, 332 | FA0969561A39D68D0041048C /* Images.xcassets in Resources */, 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | }; 336 | FA09695C1A39D68D0041048C /* Resources */ = { 337 | isa = PBXResourcesBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | }; 343 | FA0969701A39D69A0041048C /* Resources */ = { 344 | isa = PBXResourcesBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | FA09697D1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App.app in Resources */, 348 | FA0969791A39D69A0041048C /* Images.xcassets in Resources */, 349 | ); 350 | runOnlyForDeploymentPostprocessing = 0; 351 | }; 352 | FA09697A1A39D69A0041048C /* Resources */ = { 353 | isa = PBXResourcesBuildPhase; 354 | buildActionMask = 2147483647; 355 | files = ( 356 | FA0969841A39D69A0041048C /* Interface.storyboard in Resources */, 357 | FA0969861A39D69A0041048C /* Images.xcassets in Resources */, 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | }; 361 | /* End PBXResourcesBuildPhase section */ 362 | 363 | /* Begin PBXSourcesBuildPhase section */ 364 | FA0969451A39D68D0041048C /* Sources */ = { 365 | isa = PBXSourcesBuildPhase; 366 | buildActionMask = 2147483647; 367 | files = ( 368 | FACEDD741A3DB0E4002E9F0A /* ColorInfo.swift in Sources */, 369 | FA0969511A39D68D0041048C /* ViewController.swift in Sources */, 370 | FA09694F1A39D68D0041048C /* AppDelegate.swift in Sources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | FA09695A1A39D68D0041048C /* Sources */ = { 375 | isa = PBXSourcesBuildPhase; 376 | buildActionMask = 2147483647; 377 | files = ( 378 | FA0969651A39D68D0041048C /* WatchKitOpenAppDemoTests.swift in Sources */, 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | }; 382 | FA09696E1A39D69A0041048C /* Sources */ = { 383 | isa = PBXSourcesBuildPhase; 384 | buildActionMask = 2147483647; 385 | files = ( 386 | FA0969771A39D69A0041048C /* InterfaceController.swift in Sources */, 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | }; 390 | /* End PBXSourcesBuildPhase section */ 391 | 392 | /* Begin PBXTargetDependency section */ 393 | FA0969601A39D68D0041048C /* PBXTargetDependency */ = { 394 | isa = PBXTargetDependency; 395 | target = FA0969481A39D68D0041048C /* WatchKitOpenAppDemo */; 396 | targetProxy = FA09695F1A39D68D0041048C /* PBXContainerItemProxy */; 397 | }; 398 | FA09697F1A39D69A0041048C /* PBXTargetDependency */ = { 399 | isa = PBXTargetDependency; 400 | target = FA09697B1A39D69A0041048C /* WatchKitOpenAppDemo WatchKit App */; 401 | targetProxy = FA09697E1A39D69A0041048C /* PBXContainerItemProxy */; 402 | }; 403 | FA0969881A39D69A0041048C /* PBXTargetDependency */ = { 404 | isa = PBXTargetDependency; 405 | target = FA0969711A39D69A0041048C /* WatchKitOpenAppDemo WatchKit Extension */; 406 | targetProxy = FA0969871A39D69A0041048C /* PBXContainerItemProxy */; 407 | }; 408 | /* End PBXTargetDependency section */ 409 | 410 | /* Begin PBXVariantGroup section */ 411 | FA0969521A39D68D0041048C /* Main.storyboard */ = { 412 | isa = PBXVariantGroup; 413 | children = ( 414 | FA0969531A39D68D0041048C /* Base */, 415 | ); 416 | name = Main.storyboard; 417 | sourceTree = ""; 418 | }; 419 | FA0969571A39D68D0041048C /* LaunchScreen.xib */ = { 420 | isa = PBXVariantGroup; 421 | children = ( 422 | FA0969581A39D68D0041048C /* Base */, 423 | ); 424 | name = LaunchScreen.xib; 425 | sourceTree = ""; 426 | }; 427 | /* End PBXVariantGroup section */ 428 | 429 | /* Begin XCBuildConfiguration section */ 430 | FA0969661A39D68D0041048C /* Debug */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ALWAYS_SEARCH_USER_PATHS = NO; 434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 435 | CLANG_CXX_LIBRARY = "libc++"; 436 | CLANG_ENABLE_MODULES = YES; 437 | CLANG_ENABLE_OBJC_ARC = YES; 438 | CLANG_WARN_BOOL_CONVERSION = YES; 439 | CLANG_WARN_CONSTANT_CONVERSION = YES; 440 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 441 | CLANG_WARN_EMPTY_BODY = YES; 442 | CLANG_WARN_ENUM_CONVERSION = YES; 443 | CLANG_WARN_INT_CONVERSION = YES; 444 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 445 | CLANG_WARN_UNREACHABLE_CODE = YES; 446 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 448 | COPY_PHASE_STRIP = NO; 449 | ENABLE_STRICT_OBJC_MSGSEND = YES; 450 | GCC_C_LANGUAGE_STANDARD = gnu99; 451 | GCC_DYNAMIC_NO_PIC = NO; 452 | GCC_OPTIMIZATION_LEVEL = 0; 453 | GCC_PREPROCESSOR_DEFINITIONS = ( 454 | "DEBUG=1", 455 | "$(inherited)", 456 | ); 457 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 458 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 459 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 460 | GCC_WARN_UNDECLARED_SELECTOR = YES; 461 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 462 | GCC_WARN_UNUSED_FUNCTION = YES; 463 | GCC_WARN_UNUSED_VARIABLE = YES; 464 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 465 | MTL_ENABLE_DEBUG_INFO = YES; 466 | ONLY_ACTIVE_ARCH = YES; 467 | SDKROOT = iphoneos; 468 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 469 | }; 470 | name = Debug; 471 | }; 472 | FA0969671A39D68D0041048C /* Release */ = { 473 | isa = XCBuildConfiguration; 474 | buildSettings = { 475 | ALWAYS_SEARCH_USER_PATHS = NO; 476 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 477 | CLANG_CXX_LIBRARY = "libc++"; 478 | CLANG_ENABLE_MODULES = YES; 479 | CLANG_ENABLE_OBJC_ARC = YES; 480 | CLANG_WARN_BOOL_CONVERSION = YES; 481 | CLANG_WARN_CONSTANT_CONVERSION = YES; 482 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 483 | CLANG_WARN_EMPTY_BODY = YES; 484 | CLANG_WARN_ENUM_CONVERSION = YES; 485 | CLANG_WARN_INT_CONVERSION = YES; 486 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 487 | CLANG_WARN_UNREACHABLE_CODE = YES; 488 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 489 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 490 | COPY_PHASE_STRIP = YES; 491 | ENABLE_NS_ASSERTIONS = NO; 492 | ENABLE_STRICT_OBJC_MSGSEND = YES; 493 | GCC_C_LANGUAGE_STANDARD = gnu99; 494 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 495 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 496 | GCC_WARN_UNDECLARED_SELECTOR = YES; 497 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 498 | GCC_WARN_UNUSED_FUNCTION = YES; 499 | GCC_WARN_UNUSED_VARIABLE = YES; 500 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 501 | MTL_ENABLE_DEBUG_INFO = NO; 502 | SDKROOT = iphoneos; 503 | VALIDATE_PRODUCT = YES; 504 | }; 505 | name = Release; 506 | }; 507 | FA0969691A39D68D0041048C /* Debug */ = { 508 | isa = XCBuildConfiguration; 509 | buildSettings = { 510 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 511 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 512 | INFOPLIST_FILE = WatchKitOpenAppDemo/Info.plist; 513 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | }; 516 | name = Debug; 517 | }; 518 | FA09696A1A39D68D0041048C /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 522 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 523 | INFOPLIST_FILE = WatchKitOpenAppDemo/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | }; 527 | name = Release; 528 | }; 529 | FA09696C1A39D68D0041048C /* Debug */ = { 530 | isa = XCBuildConfiguration; 531 | buildSettings = { 532 | BUNDLE_LOADER = "$(TEST_HOST)"; 533 | FRAMEWORK_SEARCH_PATHS = ( 534 | "$(SDKROOT)/Developer/Library/Frameworks", 535 | "$(inherited)", 536 | ); 537 | GCC_PREPROCESSOR_DEFINITIONS = ( 538 | "DEBUG=1", 539 | "$(inherited)", 540 | ); 541 | INFOPLIST_FILE = WatchKitOpenAppDemoTests/Info.plist; 542 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 543 | PRODUCT_NAME = "$(TARGET_NAME)"; 544 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WatchKitOpenAppDemo.app/WatchKitOpenAppDemo"; 545 | }; 546 | name = Debug; 547 | }; 548 | FA09696D1A39D68D0041048C /* Release */ = { 549 | isa = XCBuildConfiguration; 550 | buildSettings = { 551 | BUNDLE_LOADER = "$(TEST_HOST)"; 552 | FRAMEWORK_SEARCH_PATHS = ( 553 | "$(SDKROOT)/Developer/Library/Frameworks", 554 | "$(inherited)", 555 | ); 556 | INFOPLIST_FILE = WatchKitOpenAppDemoTests/Info.plist; 557 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 558 | PRODUCT_NAME = "$(TARGET_NAME)"; 559 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WatchKitOpenAppDemo.app/WatchKitOpenAppDemo"; 560 | }; 561 | name = Release; 562 | }; 563 | FA09698B1A39D69A0041048C /* Debug */ = { 564 | isa = XCBuildConfiguration; 565 | buildSettings = { 566 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 567 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 568 | GCC_PREPROCESSOR_DEFINITIONS = ( 569 | "DEBUG=1", 570 | "$(inherited)", 571 | ); 572 | IBSC_MODULE = WatchKitOpenAppDemo_WatchKit_Extension; 573 | INFOPLIST_FILE = "WatchKitOpenAppDemo WatchKit App/Info.plist"; 574 | PRODUCT_NAME = "$(TARGET_NAME)"; 575 | SKIP_INSTALL = YES; 576 | TARGETED_DEVICE_FAMILY = 4; 577 | "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4"; 578 | }; 579 | name = Debug; 580 | }; 581 | FA09698C1A39D69A0041048C /* Release */ = { 582 | isa = XCBuildConfiguration; 583 | buildSettings = { 584 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 585 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 586 | IBSC_MODULE = WatchKitOpenAppDemo_WatchKit_Extension; 587 | INFOPLIST_FILE = "WatchKitOpenAppDemo WatchKit App/Info.plist"; 588 | PRODUCT_NAME = "$(TARGET_NAME)"; 589 | SKIP_INSTALL = YES; 590 | TARGETED_DEVICE_FAMILY = 4; 591 | "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4"; 592 | }; 593 | name = Release; 594 | }; 595 | FA09698E1A39D69A0041048C /* Debug */ = { 596 | isa = XCBuildConfiguration; 597 | buildSettings = { 598 | GCC_PREPROCESSOR_DEFINITIONS = ( 599 | "DEBUG=1", 600 | "$(inherited)", 601 | ); 602 | INFOPLIST_FILE = "WatchKitOpenAppDemo WatchKit Extension/Info.plist"; 603 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 604 | PRODUCT_NAME = "${TARGET_NAME}"; 605 | SKIP_INSTALL = YES; 606 | }; 607 | name = Debug; 608 | }; 609 | FA09698F1A39D69A0041048C /* Release */ = { 610 | isa = XCBuildConfiguration; 611 | buildSettings = { 612 | INFOPLIST_FILE = "WatchKitOpenAppDemo WatchKit Extension/Info.plist"; 613 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 614 | PRODUCT_NAME = "${TARGET_NAME}"; 615 | SKIP_INSTALL = YES; 616 | }; 617 | name = Release; 618 | }; 619 | /* End XCBuildConfiguration section */ 620 | 621 | /* Begin XCConfigurationList section */ 622 | FA0969441A39D68D0041048C /* Build configuration list for PBXProject "WatchKitOpenAppDemo" */ = { 623 | isa = XCConfigurationList; 624 | buildConfigurations = ( 625 | FA0969661A39D68D0041048C /* Debug */, 626 | FA0969671A39D68D0041048C /* Release */, 627 | ); 628 | defaultConfigurationIsVisible = 0; 629 | defaultConfigurationName = Release; 630 | }; 631 | FA0969681A39D68D0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemo" */ = { 632 | isa = XCConfigurationList; 633 | buildConfigurations = ( 634 | FA0969691A39D68D0041048C /* Debug */, 635 | FA09696A1A39D68D0041048C /* Release */, 636 | ); 637 | defaultConfigurationIsVisible = 0; 638 | defaultConfigurationName = Release; 639 | }; 640 | FA09696B1A39D68D0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemoTests" */ = { 641 | isa = XCConfigurationList; 642 | buildConfigurations = ( 643 | FA09696C1A39D68D0041048C /* Debug */, 644 | FA09696D1A39D68D0041048C /* Release */, 645 | ); 646 | defaultConfigurationIsVisible = 0; 647 | defaultConfigurationName = Release; 648 | }; 649 | FA09698A1A39D69A0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemo WatchKit App" */ = { 650 | isa = XCConfigurationList; 651 | buildConfigurations = ( 652 | FA09698B1A39D69A0041048C /* Debug */, 653 | FA09698C1A39D69A0041048C /* Release */, 654 | ); 655 | defaultConfigurationIsVisible = 0; 656 | defaultConfigurationName = Release; 657 | }; 658 | FA09698D1A39D69A0041048C /* Build configuration list for PBXNativeTarget "WatchKitOpenAppDemo WatchKit Extension" */ = { 659 | isa = XCConfigurationList; 660 | buildConfigurations = ( 661 | FA09698E1A39D69A0041048C /* Debug */, 662 | FA09698F1A39D69A0041048C /* Release */, 663 | ); 664 | defaultConfigurationIsVisible = 0; 665 | defaultConfigurationName = Release; 666 | }; 667 | /* End XCConfigurationList section */ 668 | }; 669 | rootObject = FA0969411A39D68D0041048C /* Project object */; 670 | } 671 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WatchKitOpenAppDemo 4 | // 5 | // Created by Natasha Murashev on 12/11/14. 6 | // Copyright (c) 2014 NatashaTheRobot. 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 | // AppDelegate.swift 45 | // WatchKitOpenAppDemo 46 | 47 | func application(application: UIApplication!, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]!, reply: (([NSObject : AnyObject]!) -> Void)!) { 48 | 49 | let colorInfo = ColorInfo(userInfo: userInfo, reply: reply) 50 | 51 | NSNotificationCenter.defaultCenter().postNotificationName("WatchKitSaysHello", 52 | object: colorInfo) 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo/ColorInfo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ColorInfo.swift 3 | // WatchKitOpenAppDemo 4 | // 5 | // Created by Natasha Murashev on 12/14/14. 6 | // Copyright (c) 2014 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ColorInfo: NSObject { 12 | 13 | let color: UIColor 14 | let replyBlock: ([NSObject : AnyObject]!) -> Void 15 | 16 | init(userInfo: [NSObject : AnyObject], reply: ([NSObject : AnyObject]!) -> Void) { 17 | if let userInfo = userInfo as? [String : CGFloat] { 18 | switch (userInfo["red"], userInfo["green"], userInfo["blue"]) { 19 | case let (.Some(red), .Some(green), .Some(blue)): 20 | color = UIColor(red: red/255.0, green: green/255.0, blue: blue/255.0, alpha: 1.0) 21 | default: 22 | color = UIColor.blackColor() 23 | } 24 | } else { 25 | color = UIColor.blackColor() 26 | } 27 | 28 | replyBlock = reply 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo/Images.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 | } -------------------------------------------------------------------------------- /WatchKitOpenAppDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.natashatherobot.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // WatchKitOpenAppDemo 4 | // 5 | // Created by Natasha Murashev on 12/11/14. 6 | // Copyright (c) 2014 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController, UIAlertViewDelegate { 12 | 13 | var colorInfo: ColorInfo? 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("handleWatchKitNotification:"), 19 | name: "WatchKitSaysHello", 20 | object: nil) 21 | } 22 | 23 | 24 | deinit { 25 | NSNotificationCenter.defaultCenter().removeObserver(self) 26 | } 27 | 28 | func handleWatchKitNotification(notification: NSNotification) { 29 | 30 | if let colorInfo = notification.object as? ColorInfo { 31 | 32 | view.backgroundColor = colorInfo.color 33 | 34 | self.colorInfo = colorInfo 35 | } 36 | } 37 | 38 | @IBAction func onPoloButtonTap(sender: AnyObject) { 39 | if let colorInfo = colorInfo { 40 | let randomColorComponents = [ 41 | "red" : CGFloat(arc4random() % 255), 42 | "green" : CGFloat(arc4random() % 255), 43 | "blue" : CGFloat(arc4random() % 255)] 44 | 45 | 46 | colorInfo.replyBlock(randomColorComponents) 47 | } 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.natashatherobot.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WatchKitOpenAppDemoTests/WatchKitOpenAppDemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WatchKitOpenAppDemoTests.swift 3 | // WatchKitOpenAppDemoTests 4 | // 5 | // Created by Natasha Murashev on 12/11/14. 6 | // Copyright (c) 2014 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class WatchKitOpenAppDemoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------