├── WCApplicationContext Extension ├── Assets.xcassets │ └── README__ignoredByTemplate__ ├── DataSource.swift ├── ExtensionDelegate.swift ├── InterfaceController.swift ├── Info.plist └── WatchSessionManager.swift ├── WCApplicationContextDemo.xcodeproj ├── xcuserdata │ └── natashatherobot.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ ├── WCApplicationContextDemo.xcscheme │ │ └── WCApplicationContext.xcscheme ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── natashatherobot.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── project.pbxproj ├── README.md ├── .gitignore ├── WCApplicationContextDemo ├── LabelTableViewCell.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── FoodSelectionViewController.swift ├── WatchSessionManager.swift └── AppDelegate.swift ├── WCApplicationContextDemoTests ├── Info.plist └── WCApplicationContextDemoTests.swift ├── WCApplicationContextDemoUITests ├── Info.plist └── WCApplicationContextDemoUITests.swift └── WCApplicationContext ├── Info.plist ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json └── Base.lproj └── Interface.storyboard /WCApplicationContext Extension/Assets.xcassets/README__ignoredByTemplate__: -------------------------------------------------------------------------------- 1 | Did you know that git does not support storing empty directories? 2 | -------------------------------------------------------------------------------- /WCApplicationContextDemo.xcodeproj/xcuserdata/natashatherobot.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /WCApplicationContextDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WatchConnectivityApplicationContextDemo 2 | Watch OS 2: Sharing data via WatchConnectivity's Application Context 3 | 4 | Blog post: [WatchConnectivity: Sharing The Latest Data via Application Context](http://natashatherobot.com/watchconnectivity-application-context/) 5 | -------------------------------------------------------------------------------- /WCApplicationContextDemo.xcodeproj/project.xcworkspace/xcuserdata/natashatherobot.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NatashaTheRobot/WatchConnectivityApplicationContextDemo/HEAD/WCApplicationContextDemo.xcodeproj/project.xcworkspace/xcuserdata/natashatherobot.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /WCApplicationContextDemo/LabelTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LabelTableViewCell.swift 3 | // WCApplicationContextDemo 4 | // 5 | // Created by Natasha Murashev on 9/20/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LabelTableViewCell: UITableViewCell { 12 | 13 | @IBOutlet weak private var label: UILabel! 14 | 15 | override func awakeFromNib() { 16 | super.awakeFromNib() 17 | // Initialization code 18 | } 19 | 20 | func configure(withText text: String) { 21 | label.text = text 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /WCApplicationContext Extension/DataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataSource.swift 3 | // WCApplicationContextDemo 4 | // 5 | // Created by Natasha Murashev on 9/24/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | struct DataSource { 10 | 11 | let item: Item 12 | 13 | enum Item { 14 | case Food(String) 15 | case Unknown 16 | } 17 | 18 | init(data: [String : AnyObject]) { 19 | if let foodItem = data["food"] as? String { 20 | item = Item.Food(foodItem) 21 | } else { 22 | item = Item.Unknown 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WCApplicationContextDemo/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 | } -------------------------------------------------------------------------------- /WCApplicationContextDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WCApplicationContextDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WCApplicationContext Extension/ExtensionDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExtensionDelegate.swift 3 | // WCApplicationContext Extension 4 | // 5 | // Created by Natasha Murashev on 9/20/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import WatchKit 10 | 11 | class ExtensionDelegate: NSObject, WKExtensionDelegate { 12 | 13 | func applicationDidFinishLaunching() { 14 | WatchSessionManager.sharedManager.startSession() 15 | } 16 | 17 | func applicationDidBecomeActive() { 18 | // 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. 19 | } 20 | 21 | func applicationWillResignActive() { 22 | // 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. 23 | // Use this method to pause ongoing tasks, disable timers, etc. 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /WCApplicationContextDemo.xcodeproj/xcuserdata/natashatherobot.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | WCApplicationContext.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | WCApplicationContextDemo.xcscheme 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | FA9BE22B1BAF24690016A7F7 21 | 22 | primary 23 | 24 | 25 | FA9BE23F1BAF24690016A7F7 26 | 27 | primary 28 | 29 | 30 | FA9BE24A1BAF24690016A7F7 31 | 32 | primary 33 | 34 | 35 | FA9BE25E1BAF285A0016A7F7 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /WCApplicationContextDemoTests/WCApplicationContextDemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WCApplicationContextDemoTests.swift 3 | // WCApplicationContextDemoTests 4 | // 5 | // Created by Natasha Murashev on 9/20/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import WCApplicationContextDemo 11 | 12 | class WCApplicationContextDemoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /WCApplicationContext/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | WCApplicationContextDemo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | UISupportedInterfaceOrientations 26 | 27 | UIInterfaceOrientationPortrait 28 | UIInterfaceOrientationPortraitUpsideDown 29 | 30 | WKCompanionAppBundleIdentifier 31 | com.natashatherobot.WCApplicationContextDemo 32 | WKWatchKitApp 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /WCApplicationContext Extension/InterfaceController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.swift 3 | // WCApplicationContext Extension 4 | // 5 | // Created by Natasha Murashev on 9/20/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import WatchKit 10 | import Foundation 11 | 12 | 13 | class InterfaceController: WKInterfaceController, DataSourceChangedDelegate { 14 | 15 | @IBOutlet var foodLabel: WKInterfaceLabel! 16 | 17 | override func awakeWithContext(context: AnyObject?) { 18 | super.awakeWithContext(context) 19 | } 20 | 21 | override func willActivate() { 22 | 23 | WatchSessionManager.sharedManager.addDataSourceChangedDelegate(self) 24 | 25 | super.willActivate() 26 | } 27 | 28 | override func didDeactivate() { 29 | 30 | WatchSessionManager.sharedManager.removeDataSourceChangedDelegate(self) 31 | 32 | super.didDeactivate() 33 | } 34 | 35 | // MARK: DataSourceUpdatedDelegate 36 | func dataSourceDidUpdate(dataSource: DataSource) { 37 | switch dataSource.item { 38 | case .Food(let foodItem): 39 | foodLabel.setText(foodItem) 40 | case .Unknown: 41 | foodLabel.setText("¯\\_(ツ)_/¯") 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /WCApplicationContextDemo/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 | -------------------------------------------------------------------------------- /WCApplicationContext Extension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | WCApplicationContext Extension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | WKAppBundleIdentifier 30 | com.natashatherobot.WCApplicationContextDemo.watchkitapp 31 | 32 | NSExtensionPointIdentifier 33 | com.apple.watchkit 34 | 35 | RemoteInterfacePrincipalClass 36 | $(PRODUCT_MODULE_NAME).InterfaceController 37 | WKExtensionDelegateClassName 38 | $(PRODUCT_MODULE_NAME).ExtensionDelegate 39 | 40 | 41 | -------------------------------------------------------------------------------- /WCApplicationContext/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "24x24", 5 | "idiom" : "watch", 6 | "scale" : "2x", 7 | "role" : "notificationCenter", 8 | "subtype" : "38mm" 9 | }, 10 | { 11 | "size" : "27.5x27.5", 12 | "idiom" : "watch", 13 | "scale" : "2x", 14 | "role" : "notificationCenter", 15 | "subtype" : "42mm" 16 | }, 17 | { 18 | "size" : "29x29", 19 | "idiom" : "watch", 20 | "role" : "companionSettings", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "size" : "29x29", 25 | "idiom" : "watch", 26 | "role" : "companionSettings", 27 | "scale" : "3x" 28 | }, 29 | { 30 | "size" : "40x40", 31 | "idiom" : "watch", 32 | "scale" : "2x", 33 | "role" : "appLauncher", 34 | "subtype" : "38mm" 35 | }, 36 | { 37 | "size" : "44x44", 38 | "idiom" : "watch", 39 | "scale" : "2x", 40 | "role" : "longLook", 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 | } 63 | -------------------------------------------------------------------------------- /WCApplicationContextDemoUITests/WCApplicationContextDemoUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WCApplicationContextDemoUITests.swift 3 | // WCApplicationContextDemoUITests 4 | // 5 | // Created by Natasha Murashev on 9/20/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class WCApplicationContextDemoUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /WCApplicationContext/Base.lproj/Interface.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /WCApplicationContextDemo/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 | -------------------------------------------------------------------------------- /WCApplicationContextDemo/FoodSelectionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FoodSelectionViewController.swift 3 | // WCApplicationContextDemo 4 | // 5 | // Created by Natasha Murashev on 9/20/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FoodSelectionViewController: UITableViewController { 12 | 13 | private let food = ["🍦", "🍮", "🍤","🍉", "🍨", "🍏", "🍌", "🍰", "🍚", "🍓", "🍪", "🍕"] 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | } 18 | 19 | // MARK: - Table view data source 20 | 21 | override func numberOfSectionsInTableView(tableView: UITableView) -> Int { 22 | return 1 23 | } 24 | 25 | override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 26 | return food.count 27 | } 28 | 29 | override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 30 | let cell = tableView.dequeueReusableCellWithIdentifier("LabelTableViewCell", forIndexPath: indexPath) as! LabelTableViewCell 31 | 32 | cell.configure(withText: food[indexPath.row]) 33 | 34 | return cell 35 | } 36 | 37 | // MARK: Table view delegate 38 | 39 | override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 40 | let foodItem = food[indexPath.row] 41 | do { 42 | try WatchSessionManager.sharedManager.updateApplicationContext(["food" : foodItem]) 43 | } catch { 44 | let alertController = UIAlertController(title: "Oops!", message: "Looks like your \(foodItem) got stuck on the way! Please send again!", preferredStyle: .Alert) 45 | presentViewController(alertController, animated: true, completion: nil) 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /WCApplicationContext Extension/WatchSessionManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WatchSessionManager.swift 3 | // WCApplicationContextDemo 4 | // 5 | // Created by Natasha Murashev on 9/22/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import WatchConnectivity 10 | 11 | protocol DataSourceChangedDelegate { 12 | func dataSourceDidUpdate(dataSource: DataSource) 13 | } 14 | 15 | 16 | class WatchSessionManager: NSObject, WCSessionDelegate { 17 | 18 | static let sharedManager = WatchSessionManager() 19 | private override init() { 20 | super.init() 21 | } 22 | 23 | private var dataSourceChangedDelegates = [DataSourceChangedDelegate]() 24 | 25 | private let session: WCSession = WCSession.defaultSession() 26 | 27 | func startSession() { 28 | session.delegate = self 29 | session.activateSession() 30 | } 31 | 32 | func addDataSourceChangedDelegate(delegate: T) { 33 | dataSourceChangedDelegates.append(delegate) 34 | } 35 | 36 | func removeDataSourceChangedDelegate(delegate: T) { 37 | for (index, indexDelegate) in dataSourceChangedDelegates.enumerate() { 38 | if let indexDelegate = indexDelegate as? T where indexDelegate == delegate { 39 | dataSourceChangedDelegates.removeAtIndex(index) 40 | break 41 | } 42 | } 43 | } 44 | } 45 | 46 | // MARK: Application Context 47 | // use when your app needs only the latest information 48 | // if the data was not sent, it will be replaced 49 | extension WatchSessionManager { 50 | 51 | // Receiver 52 | func session(session: WCSession, didReceiveApplicationContext applicationContext: [String : AnyObject]) { 53 | 54 | dispatch_async(dispatch_get_main_queue()) { [weak self] in 55 | self?.dataSourceChangedDelegates.forEach { $0.dataSourceDidUpdate(DataSource(data: applicationContext))} 56 | } 57 | 58 | } 59 | } -------------------------------------------------------------------------------- /WCApplicationContextDemo/WatchSessionManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WatchSessionManager.swift 3 | // WCApplicationContextDemo 4 | // 5 | // Created by Natasha Murashev on 9/22/15. 6 | // Copyright © 2015 NatashaTheRobot. All rights reserved. 7 | // 8 | 9 | import WatchConnectivity 10 | 11 | class WatchSessionManager: NSObject, WCSessionDelegate { 12 | 13 | static let sharedManager = WatchSessionManager() 14 | private override init() { 15 | super.init() 16 | } 17 | 18 | private let session: WCSession? = WCSession.isSupported() ? WCSession.defaultSession() : nil 19 | 20 | private var validSession: WCSession? { 21 | 22 | // paired - the user has to have their device paired to the watch 23 | // watchAppInstalled - the user must have your watch app installed 24 | 25 | // Note: if the device is paired, but your watch app is not installed 26 | // consider prompting the user to install it for a better experience 27 | 28 | if let session = session where session.paired && session.watchAppInstalled { 29 | return session 30 | } 31 | return nil 32 | } 33 | 34 | func startSession() { 35 | session?.delegate = self 36 | session?.activateSession() 37 | } 38 | } 39 | 40 | // MARK: Application Context 41 | // use when your app needs only the latest information 42 | // if the data was not sent, it will be replaced 43 | extension WatchSessionManager { 44 | 45 | // Sender 46 | func updateApplicationContext(applicationContext: [String : AnyObject]) throws { 47 | if let session = validSession { 48 | do { 49 | try session.updateApplicationContext(applicationContext) 50 | } catch let error { 51 | throw error 52 | } 53 | } 54 | } 55 | 56 | // Receiver 57 | func session(session: WCSession, didReceiveApplicationContext applicationContext: [String : AnyObject]) { 58 | // handle receiving application context 59 | 60 | dispatch_async(dispatch_get_main_queue()) { 61 | // make sure to put on the main queue to update UI! 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /WCApplicationContextDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WCApplicationContextDemo 4 | // 5 | // Created by Natasha Murashev on 9/20/15. 6 | // Copyright © 2015 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 | 19 | WatchSessionManager.sharedManager.startSession() 20 | 21 | return true 22 | } 23 | 24 | func applicationWillResignActive(application: UIApplication) { 25 | // 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. 26 | // 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. 27 | } 28 | 29 | func applicationDidEnterBackground(application: UIApplication) { 30 | // 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. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | func applicationWillEnterForeground(application: UIApplication) { 35 | // 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. 36 | } 37 | 38 | func applicationDidBecomeActive(application: UIApplication) { 39 | // 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. 40 | } 41 | 42 | func applicationWillTerminate(application: UIApplication) { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /WCApplicationContextDemo.xcodeproj/xcuserdata/natashatherobot.xcuserdatad/xcschemes/WCApplicationContextDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /WCApplicationContextDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /WCApplicationContextDemo.xcodeproj/xcuserdata/natashatherobot.xcuserdatad/xcschemes/WCApplicationContext.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 60 | 61 | 67 | 68 | 69 | 70 | 71 | 72 | 82 | 86 | 92 | 93 | 94 | 95 | 101 | 102 | 103 | 104 | 105 | 106 | 112 | 116 | 122 | 123 | 124 | 125 | 131 | 132 | 133 | 134 | 136 | 137 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /WCApplicationContextDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FA0E7C191BB43BD80068F06D /* DataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0E7C181BB43BD80068F06D /* DataSource.swift */; settings = {ASSET_TAGS = (); }; }; 11 | FA2524D01BB16F14005EE61E /* WatchSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2524CF1BB16F14005EE61E /* WatchSessionManager.swift */; settings = {ASSET_TAGS = (); }; }; 12 | FA2524D21BB17174005EE61E /* WatchSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2524D11BB17174005EE61E /* WatchSessionManager.swift */; settings = {ASSET_TAGS = (); }; }; 13 | FA9BE2301BAF24690016A7F7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9BE22F1BAF24690016A7F7 /* AppDelegate.swift */; }; 14 | FA9BE2351BAF24690016A7F7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA9BE2331BAF24690016A7F7 /* Main.storyboard */; }; 15 | FA9BE2371BAF24690016A7F7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA9BE2361BAF24690016A7F7 /* Assets.xcassets */; }; 16 | FA9BE23A1BAF24690016A7F7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA9BE2381BAF24690016A7F7 /* LaunchScreen.storyboard */; }; 17 | FA9BE2451BAF24690016A7F7 /* WCApplicationContextDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9BE2441BAF24690016A7F7 /* WCApplicationContextDemoTests.swift */; }; 18 | FA9BE2501BAF24690016A7F7 /* WCApplicationContextDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9BE24F1BAF24690016A7F7 /* WCApplicationContextDemoUITests.swift */; }; 19 | FA9BE2631BAF285A0016A7F7 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA9BE2611BAF285A0016A7F7 /* Interface.storyboard */; }; 20 | FA9BE2651BAF285A0016A7F7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA9BE2641BAF285A0016A7F7 /* Assets.xcassets */; }; 21 | FA9BE26C1BAF285A0016A7F7 /* WCApplicationContext Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = FA9BE26B1BAF285A0016A7F7 /* WCApplicationContext Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 22 | FA9BE2711BAF285A0016A7F7 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9BE2701BAF285A0016A7F7 /* InterfaceController.swift */; }; 23 | FA9BE2731BAF285A0016A7F7 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9BE2721BAF285A0016A7F7 /* ExtensionDelegate.swift */; }; 24 | FA9BE2751BAF285A0016A7F7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA9BE2741BAF285A0016A7F7 /* Assets.xcassets */; }; 25 | FA9BE2791BAF285A0016A7F7 /* WCApplicationContext.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = FA9BE25F1BAF285A0016A7F7 /* WCApplicationContext.app */; }; 26 | FA9BE2831BAF2E700016A7F7 /* LabelTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9BE2821BAF2E700016A7F7 /* LabelTableViewCell.swift */; settings = {ASSET_TAGS = (); }; }; 27 | FA9BE2851BAF2F130016A7F7 /* FoodSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9BE2841BAF2F130016A7F7 /* FoodSelectionViewController.swift */; settings = {ASSET_TAGS = (); }; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | FA9BE2411BAF24690016A7F7 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = FA9BE2241BAF24690016A7F7 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = FA9BE22B1BAF24690016A7F7; 36 | remoteInfo = WCApplicationContextDemo; 37 | }; 38 | FA9BE24C1BAF24690016A7F7 /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = FA9BE2241BAF24690016A7F7 /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = FA9BE22B1BAF24690016A7F7; 43 | remoteInfo = WCApplicationContextDemo; 44 | }; 45 | FA9BE26D1BAF285A0016A7F7 /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = FA9BE2241BAF24690016A7F7 /* Project object */; 48 | proxyType = 1; 49 | remoteGlobalIDString = FA9BE26A1BAF285A0016A7F7; 50 | remoteInfo = "WCApplicationContext Extension"; 51 | }; 52 | FA9BE2771BAF285A0016A7F7 /* PBXContainerItemProxy */ = { 53 | isa = PBXContainerItemProxy; 54 | containerPortal = FA9BE2241BAF24690016A7F7 /* Project object */; 55 | proxyType = 1; 56 | remoteGlobalIDString = FA9BE25E1BAF285A0016A7F7; 57 | remoteInfo = WCApplicationContext; 58 | }; 59 | /* End PBXContainerItemProxy section */ 60 | 61 | /* Begin PBXCopyFilesBuildPhase section */ 62 | FA9BE27D1BAF285A0016A7F7 /* Embed App Extensions */ = { 63 | isa = PBXCopyFilesBuildPhase; 64 | buildActionMask = 2147483647; 65 | dstPath = ""; 66 | dstSubfolderSpec = 13; 67 | files = ( 68 | FA9BE26C1BAF285A0016A7F7 /* WCApplicationContext Extension.appex in Embed App Extensions */, 69 | ); 70 | name = "Embed App Extensions"; 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | FA9BE2811BAF285A0016A7F7 /* Embed Watch Content */ = { 74 | isa = PBXCopyFilesBuildPhase; 75 | buildActionMask = 2147483647; 76 | dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; 77 | dstSubfolderSpec = 16; 78 | files = ( 79 | FA9BE2791BAF285A0016A7F7 /* WCApplicationContext.app in Embed Watch Content */, 80 | ); 81 | name = "Embed Watch Content"; 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | /* End PBXCopyFilesBuildPhase section */ 85 | 86 | /* Begin PBXFileReference section */ 87 | FA0E7C181BB43BD80068F06D /* DataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataSource.swift; sourceTree = ""; }; 88 | FA2524CF1BB16F14005EE61E /* WatchSessionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchSessionManager.swift; sourceTree = ""; }; 89 | FA2524D11BB17174005EE61E /* WatchSessionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchSessionManager.swift; sourceTree = ""; }; 90 | FA9BE22C1BAF24690016A7F7 /* WCApplicationContextDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WCApplicationContextDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 91 | FA9BE22F1BAF24690016A7F7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 92 | FA9BE2341BAF24690016A7F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 93 | FA9BE2361BAF24690016A7F7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 94 | FA9BE2391BAF24690016A7F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 95 | FA9BE23B1BAF24690016A7F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 96 | FA9BE2401BAF24690016A7F7 /* WCApplicationContextDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WCApplicationContextDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 97 | FA9BE2441BAF24690016A7F7 /* WCApplicationContextDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WCApplicationContextDemoTests.swift; sourceTree = ""; }; 98 | FA9BE2461BAF24690016A7F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 99 | FA9BE24B1BAF24690016A7F7 /* WCApplicationContextDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WCApplicationContextDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 100 | FA9BE24F1BAF24690016A7F7 /* WCApplicationContextDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WCApplicationContextDemoUITests.swift; sourceTree = ""; }; 101 | FA9BE2511BAF24690016A7F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 102 | FA9BE25F1BAF285A0016A7F7 /* WCApplicationContext.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WCApplicationContext.app; sourceTree = BUILT_PRODUCTS_DIR; }; 103 | FA9BE2621BAF285A0016A7F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; 104 | FA9BE2641BAF285A0016A7F7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 105 | FA9BE2661BAF285A0016A7F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 106 | FA9BE26B1BAF285A0016A7F7 /* WCApplicationContext Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "WCApplicationContext Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 107 | FA9BE2701BAF285A0016A7F7 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; 108 | FA9BE2721BAF285A0016A7F7 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; 109 | FA9BE2741BAF285A0016A7F7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 110 | FA9BE2761BAF285A0016A7F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 111 | FA9BE2821BAF2E700016A7F7 /* LabelTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LabelTableViewCell.swift; sourceTree = ""; }; 112 | FA9BE2841BAF2F130016A7F7 /* FoodSelectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FoodSelectionViewController.swift; sourceTree = ""; }; 113 | /* End PBXFileReference section */ 114 | 115 | /* Begin PBXFrameworksBuildPhase section */ 116 | FA9BE2291BAF24690016A7F7 /* Frameworks */ = { 117 | isa = PBXFrameworksBuildPhase; 118 | buildActionMask = 2147483647; 119 | files = ( 120 | ); 121 | runOnlyForDeploymentPostprocessing = 0; 122 | }; 123 | FA9BE23D1BAF24690016A7F7 /* Frameworks */ = { 124 | isa = PBXFrameworksBuildPhase; 125 | buildActionMask = 2147483647; 126 | files = ( 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | FA9BE2481BAF24690016A7F7 /* Frameworks */ = { 131 | isa = PBXFrameworksBuildPhase; 132 | buildActionMask = 2147483647; 133 | files = ( 134 | ); 135 | runOnlyForDeploymentPostprocessing = 0; 136 | }; 137 | FA9BE2681BAF285A0016A7F7 /* Frameworks */ = { 138 | isa = PBXFrameworksBuildPhase; 139 | buildActionMask = 2147483647; 140 | files = ( 141 | ); 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | /* End PBXFrameworksBuildPhase section */ 145 | 146 | /* Begin PBXGroup section */ 147 | FA9BE2231BAF24690016A7F7 = { 148 | isa = PBXGroup; 149 | children = ( 150 | FA9BE22E1BAF24690016A7F7 /* WCApplicationContextDemo */, 151 | FA9BE2431BAF24690016A7F7 /* WCApplicationContextDemoTests */, 152 | FA9BE24E1BAF24690016A7F7 /* WCApplicationContextDemoUITests */, 153 | FA9BE2601BAF285A0016A7F7 /* WCApplicationContext */, 154 | FA9BE26F1BAF285A0016A7F7 /* WCApplicationContext Extension */, 155 | FA9BE22D1BAF24690016A7F7 /* Products */, 156 | ); 157 | sourceTree = ""; 158 | }; 159 | FA9BE22D1BAF24690016A7F7 /* Products */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | FA9BE22C1BAF24690016A7F7 /* WCApplicationContextDemo.app */, 163 | FA9BE2401BAF24690016A7F7 /* WCApplicationContextDemoTests.xctest */, 164 | FA9BE24B1BAF24690016A7F7 /* WCApplicationContextDemoUITests.xctest */, 165 | FA9BE25F1BAF285A0016A7F7 /* WCApplicationContext.app */, 166 | FA9BE26B1BAF285A0016A7F7 /* WCApplicationContext Extension.appex */, 167 | ); 168 | name = Products; 169 | sourceTree = ""; 170 | }; 171 | FA9BE22E1BAF24690016A7F7 /* WCApplicationContextDemo */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | FA9BE22F1BAF24690016A7F7 /* AppDelegate.swift */, 175 | FA9BE2331BAF24690016A7F7 /* Main.storyboard */, 176 | FA2524CF1BB16F14005EE61E /* WatchSessionManager.swift */, 177 | FA9BE2841BAF2F130016A7F7 /* FoodSelectionViewController.swift */, 178 | FA9BE2821BAF2E700016A7F7 /* LabelTableViewCell.swift */, 179 | FA9BE2361BAF24690016A7F7 /* Assets.xcassets */, 180 | FA9BE2381BAF24690016A7F7 /* LaunchScreen.storyboard */, 181 | FA9BE23B1BAF24690016A7F7 /* Info.plist */, 182 | ); 183 | path = WCApplicationContextDemo; 184 | sourceTree = ""; 185 | }; 186 | FA9BE2431BAF24690016A7F7 /* WCApplicationContextDemoTests */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | FA9BE2441BAF24690016A7F7 /* WCApplicationContextDemoTests.swift */, 190 | FA9BE2461BAF24690016A7F7 /* Info.plist */, 191 | ); 192 | path = WCApplicationContextDemoTests; 193 | sourceTree = ""; 194 | }; 195 | FA9BE24E1BAF24690016A7F7 /* WCApplicationContextDemoUITests */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | FA9BE24F1BAF24690016A7F7 /* WCApplicationContextDemoUITests.swift */, 199 | FA9BE2511BAF24690016A7F7 /* Info.plist */, 200 | ); 201 | path = WCApplicationContextDemoUITests; 202 | sourceTree = ""; 203 | }; 204 | FA9BE2601BAF285A0016A7F7 /* WCApplicationContext */ = { 205 | isa = PBXGroup; 206 | children = ( 207 | FA9BE2611BAF285A0016A7F7 /* Interface.storyboard */, 208 | FA9BE2641BAF285A0016A7F7 /* Assets.xcassets */, 209 | FA9BE2661BAF285A0016A7F7 /* Info.plist */, 210 | ); 211 | path = WCApplicationContext; 212 | sourceTree = ""; 213 | }; 214 | FA9BE26F1BAF285A0016A7F7 /* WCApplicationContext Extension */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | FA9BE2721BAF285A0016A7F7 /* ExtensionDelegate.swift */, 218 | FA9BE2701BAF285A0016A7F7 /* InterfaceController.swift */, 219 | FA0E7C181BB43BD80068F06D /* DataSource.swift */, 220 | FA2524D11BB17174005EE61E /* WatchSessionManager.swift */, 221 | FA9BE2741BAF285A0016A7F7 /* Assets.xcassets */, 222 | FA9BE2761BAF285A0016A7F7 /* Info.plist */, 223 | ); 224 | path = "WCApplicationContext Extension"; 225 | sourceTree = ""; 226 | }; 227 | /* End PBXGroup section */ 228 | 229 | /* Begin PBXNativeTarget section */ 230 | FA9BE22B1BAF24690016A7F7 /* WCApplicationContextDemo */ = { 231 | isa = PBXNativeTarget; 232 | buildConfigurationList = FA9BE2541BAF24690016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContextDemo" */; 233 | buildPhases = ( 234 | FA9BE2281BAF24690016A7F7 /* Sources */, 235 | FA9BE2291BAF24690016A7F7 /* Frameworks */, 236 | FA9BE22A1BAF24690016A7F7 /* Resources */, 237 | FA9BE2811BAF285A0016A7F7 /* Embed Watch Content */, 238 | ); 239 | buildRules = ( 240 | ); 241 | dependencies = ( 242 | FA9BE2781BAF285A0016A7F7 /* PBXTargetDependency */, 243 | ); 244 | name = WCApplicationContextDemo; 245 | productName = WCApplicationContextDemo; 246 | productReference = FA9BE22C1BAF24690016A7F7 /* WCApplicationContextDemo.app */; 247 | productType = "com.apple.product-type.application"; 248 | }; 249 | FA9BE23F1BAF24690016A7F7 /* WCApplicationContextDemoTests */ = { 250 | isa = PBXNativeTarget; 251 | buildConfigurationList = FA9BE2571BAF24690016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContextDemoTests" */; 252 | buildPhases = ( 253 | FA9BE23C1BAF24690016A7F7 /* Sources */, 254 | FA9BE23D1BAF24690016A7F7 /* Frameworks */, 255 | FA9BE23E1BAF24690016A7F7 /* Resources */, 256 | ); 257 | buildRules = ( 258 | ); 259 | dependencies = ( 260 | FA9BE2421BAF24690016A7F7 /* PBXTargetDependency */, 261 | ); 262 | name = WCApplicationContextDemoTests; 263 | productName = WCApplicationContextDemoTests; 264 | productReference = FA9BE2401BAF24690016A7F7 /* WCApplicationContextDemoTests.xctest */; 265 | productType = "com.apple.product-type.bundle.unit-test"; 266 | }; 267 | FA9BE24A1BAF24690016A7F7 /* WCApplicationContextDemoUITests */ = { 268 | isa = PBXNativeTarget; 269 | buildConfigurationList = FA9BE25A1BAF24690016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContextDemoUITests" */; 270 | buildPhases = ( 271 | FA9BE2471BAF24690016A7F7 /* Sources */, 272 | FA9BE2481BAF24690016A7F7 /* Frameworks */, 273 | FA9BE2491BAF24690016A7F7 /* Resources */, 274 | ); 275 | buildRules = ( 276 | ); 277 | dependencies = ( 278 | FA9BE24D1BAF24690016A7F7 /* PBXTargetDependency */, 279 | ); 280 | name = WCApplicationContextDemoUITests; 281 | productName = WCApplicationContextDemoUITests; 282 | productReference = FA9BE24B1BAF24690016A7F7 /* WCApplicationContextDemoUITests.xctest */; 283 | productType = "com.apple.product-type.bundle.ui-testing"; 284 | }; 285 | FA9BE25E1BAF285A0016A7F7 /* WCApplicationContext */ = { 286 | isa = PBXNativeTarget; 287 | buildConfigurationList = FA9BE27E1BAF285A0016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContext" */; 288 | buildPhases = ( 289 | FA9BE25D1BAF285A0016A7F7 /* Resources */, 290 | FA9BE27D1BAF285A0016A7F7 /* Embed App Extensions */, 291 | ); 292 | buildRules = ( 293 | ); 294 | dependencies = ( 295 | FA9BE26E1BAF285A0016A7F7 /* PBXTargetDependency */, 296 | ); 297 | name = WCApplicationContext; 298 | productName = WCApplicationContext; 299 | productReference = FA9BE25F1BAF285A0016A7F7 /* WCApplicationContext.app */; 300 | productType = "com.apple.product-type.application.watchapp2"; 301 | }; 302 | FA9BE26A1BAF285A0016A7F7 /* WCApplicationContext Extension */ = { 303 | isa = PBXNativeTarget; 304 | buildConfigurationList = FA9BE27A1BAF285A0016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContext Extension" */; 305 | buildPhases = ( 306 | FA9BE2671BAF285A0016A7F7 /* Sources */, 307 | FA9BE2681BAF285A0016A7F7 /* Frameworks */, 308 | FA9BE2691BAF285A0016A7F7 /* Resources */, 309 | ); 310 | buildRules = ( 311 | ); 312 | dependencies = ( 313 | ); 314 | name = "WCApplicationContext Extension"; 315 | productName = "WCApplicationContext Extension"; 316 | productReference = FA9BE26B1BAF285A0016A7F7 /* WCApplicationContext Extension.appex */; 317 | productType = "com.apple.product-type.watchkit2-extension"; 318 | }; 319 | /* End PBXNativeTarget section */ 320 | 321 | /* Begin PBXProject section */ 322 | FA9BE2241BAF24690016A7F7 /* Project object */ = { 323 | isa = PBXProject; 324 | attributes = { 325 | LastUpgradeCheck = 0700; 326 | ORGANIZATIONNAME = NatashaTheRobot; 327 | TargetAttributes = { 328 | FA9BE22B1BAF24690016A7F7 = { 329 | CreatedOnToolsVersion = 7.0; 330 | }; 331 | FA9BE23F1BAF24690016A7F7 = { 332 | CreatedOnToolsVersion = 7.0; 333 | TestTargetID = FA9BE22B1BAF24690016A7F7; 334 | }; 335 | FA9BE24A1BAF24690016A7F7 = { 336 | CreatedOnToolsVersion = 7.0; 337 | TestTargetID = FA9BE22B1BAF24690016A7F7; 338 | }; 339 | FA9BE25E1BAF285A0016A7F7 = { 340 | CreatedOnToolsVersion = 7.0; 341 | }; 342 | FA9BE26A1BAF285A0016A7F7 = { 343 | CreatedOnToolsVersion = 7.0; 344 | }; 345 | }; 346 | }; 347 | buildConfigurationList = FA9BE2271BAF24690016A7F7 /* Build configuration list for PBXProject "WCApplicationContextDemo" */; 348 | compatibilityVersion = "Xcode 3.2"; 349 | developmentRegion = English; 350 | hasScannedForEncodings = 0; 351 | knownRegions = ( 352 | en, 353 | Base, 354 | ); 355 | mainGroup = FA9BE2231BAF24690016A7F7; 356 | productRefGroup = FA9BE22D1BAF24690016A7F7 /* Products */; 357 | projectDirPath = ""; 358 | projectRoot = ""; 359 | targets = ( 360 | FA9BE22B1BAF24690016A7F7 /* WCApplicationContextDemo */, 361 | FA9BE23F1BAF24690016A7F7 /* WCApplicationContextDemoTests */, 362 | FA9BE24A1BAF24690016A7F7 /* WCApplicationContextDemoUITests */, 363 | FA9BE25E1BAF285A0016A7F7 /* WCApplicationContext */, 364 | FA9BE26A1BAF285A0016A7F7 /* WCApplicationContext Extension */, 365 | ); 366 | }; 367 | /* End PBXProject section */ 368 | 369 | /* Begin PBXResourcesBuildPhase section */ 370 | FA9BE22A1BAF24690016A7F7 /* Resources */ = { 371 | isa = PBXResourcesBuildPhase; 372 | buildActionMask = 2147483647; 373 | files = ( 374 | FA9BE23A1BAF24690016A7F7 /* LaunchScreen.storyboard in Resources */, 375 | FA9BE2371BAF24690016A7F7 /* Assets.xcassets in Resources */, 376 | FA9BE2351BAF24690016A7F7 /* Main.storyboard in Resources */, 377 | ); 378 | runOnlyForDeploymentPostprocessing = 0; 379 | }; 380 | FA9BE23E1BAF24690016A7F7 /* Resources */ = { 381 | isa = PBXResourcesBuildPhase; 382 | buildActionMask = 2147483647; 383 | files = ( 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | FA9BE2491BAF24690016A7F7 /* Resources */ = { 388 | isa = PBXResourcesBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | ); 392 | runOnlyForDeploymentPostprocessing = 0; 393 | }; 394 | FA9BE25D1BAF285A0016A7F7 /* Resources */ = { 395 | isa = PBXResourcesBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | FA9BE2651BAF285A0016A7F7 /* Assets.xcassets in Resources */, 399 | FA9BE2631BAF285A0016A7F7 /* Interface.storyboard in Resources */, 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | }; 403 | FA9BE2691BAF285A0016A7F7 /* Resources */ = { 404 | isa = PBXResourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | FA9BE2751BAF285A0016A7F7 /* Assets.xcassets in Resources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | /* End PBXResourcesBuildPhase section */ 412 | 413 | /* Begin PBXSourcesBuildPhase section */ 414 | FA9BE2281BAF24690016A7F7 /* Sources */ = { 415 | isa = PBXSourcesBuildPhase; 416 | buildActionMask = 2147483647; 417 | files = ( 418 | FA9BE2301BAF24690016A7F7 /* AppDelegate.swift in Sources */, 419 | FA9BE2851BAF2F130016A7F7 /* FoodSelectionViewController.swift in Sources */, 420 | FA2524D01BB16F14005EE61E /* WatchSessionManager.swift in Sources */, 421 | FA9BE2831BAF2E700016A7F7 /* LabelTableViewCell.swift in Sources */, 422 | ); 423 | runOnlyForDeploymentPostprocessing = 0; 424 | }; 425 | FA9BE23C1BAF24690016A7F7 /* Sources */ = { 426 | isa = PBXSourcesBuildPhase; 427 | buildActionMask = 2147483647; 428 | files = ( 429 | FA9BE2451BAF24690016A7F7 /* WCApplicationContextDemoTests.swift in Sources */, 430 | ); 431 | runOnlyForDeploymentPostprocessing = 0; 432 | }; 433 | FA9BE2471BAF24690016A7F7 /* Sources */ = { 434 | isa = PBXSourcesBuildPhase; 435 | buildActionMask = 2147483647; 436 | files = ( 437 | FA9BE2501BAF24690016A7F7 /* WCApplicationContextDemoUITests.swift in Sources */, 438 | ); 439 | runOnlyForDeploymentPostprocessing = 0; 440 | }; 441 | FA9BE2671BAF285A0016A7F7 /* Sources */ = { 442 | isa = PBXSourcesBuildPhase; 443 | buildActionMask = 2147483647; 444 | files = ( 445 | FA0E7C191BB43BD80068F06D /* DataSource.swift in Sources */, 446 | FA2524D21BB17174005EE61E /* WatchSessionManager.swift in Sources */, 447 | FA9BE2731BAF285A0016A7F7 /* ExtensionDelegate.swift in Sources */, 448 | FA9BE2711BAF285A0016A7F7 /* InterfaceController.swift in Sources */, 449 | ); 450 | runOnlyForDeploymentPostprocessing = 0; 451 | }; 452 | /* End PBXSourcesBuildPhase section */ 453 | 454 | /* Begin PBXTargetDependency section */ 455 | FA9BE2421BAF24690016A7F7 /* PBXTargetDependency */ = { 456 | isa = PBXTargetDependency; 457 | target = FA9BE22B1BAF24690016A7F7 /* WCApplicationContextDemo */; 458 | targetProxy = FA9BE2411BAF24690016A7F7 /* PBXContainerItemProxy */; 459 | }; 460 | FA9BE24D1BAF24690016A7F7 /* PBXTargetDependency */ = { 461 | isa = PBXTargetDependency; 462 | target = FA9BE22B1BAF24690016A7F7 /* WCApplicationContextDemo */; 463 | targetProxy = FA9BE24C1BAF24690016A7F7 /* PBXContainerItemProxy */; 464 | }; 465 | FA9BE26E1BAF285A0016A7F7 /* PBXTargetDependency */ = { 466 | isa = PBXTargetDependency; 467 | target = FA9BE26A1BAF285A0016A7F7 /* WCApplicationContext Extension */; 468 | targetProxy = FA9BE26D1BAF285A0016A7F7 /* PBXContainerItemProxy */; 469 | }; 470 | FA9BE2781BAF285A0016A7F7 /* PBXTargetDependency */ = { 471 | isa = PBXTargetDependency; 472 | target = FA9BE25E1BAF285A0016A7F7 /* WCApplicationContext */; 473 | targetProxy = FA9BE2771BAF285A0016A7F7 /* PBXContainerItemProxy */; 474 | }; 475 | /* End PBXTargetDependency section */ 476 | 477 | /* Begin PBXVariantGroup section */ 478 | FA9BE2331BAF24690016A7F7 /* Main.storyboard */ = { 479 | isa = PBXVariantGroup; 480 | children = ( 481 | FA9BE2341BAF24690016A7F7 /* Base */, 482 | ); 483 | name = Main.storyboard; 484 | sourceTree = ""; 485 | }; 486 | FA9BE2381BAF24690016A7F7 /* LaunchScreen.storyboard */ = { 487 | isa = PBXVariantGroup; 488 | children = ( 489 | FA9BE2391BAF24690016A7F7 /* Base */, 490 | ); 491 | name = LaunchScreen.storyboard; 492 | sourceTree = ""; 493 | }; 494 | FA9BE2611BAF285A0016A7F7 /* Interface.storyboard */ = { 495 | isa = PBXVariantGroup; 496 | children = ( 497 | FA9BE2621BAF285A0016A7F7 /* Base */, 498 | ); 499 | name = Interface.storyboard; 500 | sourceTree = ""; 501 | }; 502 | /* End PBXVariantGroup section */ 503 | 504 | /* Begin XCBuildConfiguration section */ 505 | FA9BE2521BAF24690016A7F7 /* Debug */ = { 506 | isa = XCBuildConfiguration; 507 | buildSettings = { 508 | ALWAYS_SEARCH_USER_PATHS = NO; 509 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 510 | CLANG_CXX_LIBRARY = "libc++"; 511 | CLANG_ENABLE_MODULES = YES; 512 | CLANG_ENABLE_OBJC_ARC = YES; 513 | CLANG_WARN_BOOL_CONVERSION = YES; 514 | CLANG_WARN_CONSTANT_CONVERSION = YES; 515 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 516 | CLANG_WARN_EMPTY_BODY = YES; 517 | CLANG_WARN_ENUM_CONVERSION = YES; 518 | CLANG_WARN_INT_CONVERSION = YES; 519 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 520 | CLANG_WARN_UNREACHABLE_CODE = YES; 521 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 522 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 523 | COPY_PHASE_STRIP = NO; 524 | DEBUG_INFORMATION_FORMAT = dwarf; 525 | ENABLE_STRICT_OBJC_MSGSEND = YES; 526 | ENABLE_TESTABILITY = YES; 527 | GCC_C_LANGUAGE_STANDARD = gnu99; 528 | GCC_DYNAMIC_NO_PIC = NO; 529 | GCC_NO_COMMON_BLOCKS = YES; 530 | GCC_OPTIMIZATION_LEVEL = 0; 531 | GCC_PREPROCESSOR_DEFINITIONS = ( 532 | "DEBUG=1", 533 | "$(inherited)", 534 | ); 535 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 536 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 537 | GCC_WARN_UNDECLARED_SELECTOR = YES; 538 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 539 | GCC_WARN_UNUSED_FUNCTION = YES; 540 | GCC_WARN_UNUSED_VARIABLE = YES; 541 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 542 | MTL_ENABLE_DEBUG_INFO = YES; 543 | ONLY_ACTIVE_ARCH = YES; 544 | SDKROOT = iphoneos; 545 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 546 | }; 547 | name = Debug; 548 | }; 549 | FA9BE2531BAF24690016A7F7 /* Release */ = { 550 | isa = XCBuildConfiguration; 551 | buildSettings = { 552 | ALWAYS_SEARCH_USER_PATHS = NO; 553 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 554 | CLANG_CXX_LIBRARY = "libc++"; 555 | CLANG_ENABLE_MODULES = YES; 556 | CLANG_ENABLE_OBJC_ARC = YES; 557 | CLANG_WARN_BOOL_CONVERSION = YES; 558 | CLANG_WARN_CONSTANT_CONVERSION = YES; 559 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 560 | CLANG_WARN_EMPTY_BODY = YES; 561 | CLANG_WARN_ENUM_CONVERSION = YES; 562 | CLANG_WARN_INT_CONVERSION = YES; 563 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 564 | CLANG_WARN_UNREACHABLE_CODE = YES; 565 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 566 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 567 | COPY_PHASE_STRIP = NO; 568 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 569 | ENABLE_NS_ASSERTIONS = NO; 570 | ENABLE_STRICT_OBJC_MSGSEND = YES; 571 | GCC_C_LANGUAGE_STANDARD = gnu99; 572 | GCC_NO_COMMON_BLOCKS = YES; 573 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 574 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 575 | GCC_WARN_UNDECLARED_SELECTOR = YES; 576 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 577 | GCC_WARN_UNUSED_FUNCTION = YES; 578 | GCC_WARN_UNUSED_VARIABLE = YES; 579 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 580 | MTL_ENABLE_DEBUG_INFO = NO; 581 | SDKROOT = iphoneos; 582 | VALIDATE_PRODUCT = YES; 583 | }; 584 | name = Release; 585 | }; 586 | FA9BE2551BAF24690016A7F7 /* Debug */ = { 587 | isa = XCBuildConfiguration; 588 | buildSettings = { 589 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 590 | INFOPLIST_FILE = WCApplicationContextDemo/Info.plist; 591 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 592 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemo; 593 | PRODUCT_NAME = "$(TARGET_NAME)"; 594 | }; 595 | name = Debug; 596 | }; 597 | FA9BE2561BAF24690016A7F7 /* Release */ = { 598 | isa = XCBuildConfiguration; 599 | buildSettings = { 600 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 601 | INFOPLIST_FILE = WCApplicationContextDemo/Info.plist; 602 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 603 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemo; 604 | PRODUCT_NAME = "$(TARGET_NAME)"; 605 | }; 606 | name = Release; 607 | }; 608 | FA9BE2581BAF24690016A7F7 /* Debug */ = { 609 | isa = XCBuildConfiguration; 610 | buildSettings = { 611 | BUNDLE_LOADER = "$(TEST_HOST)"; 612 | INFOPLIST_FILE = WCApplicationContextDemoTests/Info.plist; 613 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 614 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemoTests; 615 | PRODUCT_NAME = "$(TARGET_NAME)"; 616 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WCApplicationContextDemo.app/WCApplicationContextDemo"; 617 | }; 618 | name = Debug; 619 | }; 620 | FA9BE2591BAF24690016A7F7 /* Release */ = { 621 | isa = XCBuildConfiguration; 622 | buildSettings = { 623 | BUNDLE_LOADER = "$(TEST_HOST)"; 624 | INFOPLIST_FILE = WCApplicationContextDemoTests/Info.plist; 625 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 626 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemoTests; 627 | PRODUCT_NAME = "$(TARGET_NAME)"; 628 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WCApplicationContextDemo.app/WCApplicationContextDemo"; 629 | }; 630 | name = Release; 631 | }; 632 | FA9BE25B1BAF24690016A7F7 /* Debug */ = { 633 | isa = XCBuildConfiguration; 634 | buildSettings = { 635 | INFOPLIST_FILE = WCApplicationContextDemoUITests/Info.plist; 636 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 637 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemoUITests; 638 | PRODUCT_NAME = "$(TARGET_NAME)"; 639 | TEST_TARGET_NAME = WCApplicationContextDemo; 640 | USES_XCTRUNNER = YES; 641 | }; 642 | name = Debug; 643 | }; 644 | FA9BE25C1BAF24690016A7F7 /* Release */ = { 645 | isa = XCBuildConfiguration; 646 | buildSettings = { 647 | INFOPLIST_FILE = WCApplicationContextDemoUITests/Info.plist; 648 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 649 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemoUITests; 650 | PRODUCT_NAME = "$(TARGET_NAME)"; 651 | TEST_TARGET_NAME = WCApplicationContextDemo; 652 | USES_XCTRUNNER = YES; 653 | }; 654 | name = Release; 655 | }; 656 | FA9BE27B1BAF285A0016A7F7 /* Debug */ = { 657 | isa = XCBuildConfiguration; 658 | buildSettings = { 659 | INFOPLIST_FILE = "WCApplicationContext Extension/Info.plist"; 660 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 661 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemo.watchkitapp.watchkitextension; 662 | PRODUCT_NAME = "${TARGET_NAME}"; 663 | SDKROOT = watchos; 664 | SKIP_INSTALL = YES; 665 | TARGETED_DEVICE_FAMILY = 4; 666 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 667 | }; 668 | name = Debug; 669 | }; 670 | FA9BE27C1BAF285A0016A7F7 /* Release */ = { 671 | isa = XCBuildConfiguration; 672 | buildSettings = { 673 | INFOPLIST_FILE = "WCApplicationContext Extension/Info.plist"; 674 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 675 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemo.watchkitapp.watchkitextension; 676 | PRODUCT_NAME = "${TARGET_NAME}"; 677 | SDKROOT = watchos; 678 | SKIP_INSTALL = YES; 679 | TARGETED_DEVICE_FAMILY = 4; 680 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 681 | }; 682 | name = Release; 683 | }; 684 | FA9BE27F1BAF285A0016A7F7 /* Debug */ = { 685 | isa = XCBuildConfiguration; 686 | buildSettings = { 687 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 688 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 689 | IBSC_MODULE = WCApplicationContext_Extension; 690 | INFOPLIST_FILE = WCApplicationContext/Info.plist; 691 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemo.watchkitapp; 692 | PRODUCT_NAME = "$(TARGET_NAME)"; 693 | SDKROOT = watchos; 694 | SKIP_INSTALL = YES; 695 | TARGETED_DEVICE_FAMILY = 4; 696 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 697 | }; 698 | name = Debug; 699 | }; 700 | FA9BE2801BAF285A0016A7F7 /* Release */ = { 701 | isa = XCBuildConfiguration; 702 | buildSettings = { 703 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 704 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 705 | IBSC_MODULE = WCApplicationContext_Extension; 706 | INFOPLIST_FILE = WCApplicationContext/Info.plist; 707 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.WCApplicationContextDemo.watchkitapp; 708 | PRODUCT_NAME = "$(TARGET_NAME)"; 709 | SDKROOT = watchos; 710 | SKIP_INSTALL = YES; 711 | TARGETED_DEVICE_FAMILY = 4; 712 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 713 | }; 714 | name = Release; 715 | }; 716 | /* End XCBuildConfiguration section */ 717 | 718 | /* Begin XCConfigurationList section */ 719 | FA9BE2271BAF24690016A7F7 /* Build configuration list for PBXProject "WCApplicationContextDemo" */ = { 720 | isa = XCConfigurationList; 721 | buildConfigurations = ( 722 | FA9BE2521BAF24690016A7F7 /* Debug */, 723 | FA9BE2531BAF24690016A7F7 /* Release */, 724 | ); 725 | defaultConfigurationIsVisible = 0; 726 | defaultConfigurationName = Release; 727 | }; 728 | FA9BE2541BAF24690016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContextDemo" */ = { 729 | isa = XCConfigurationList; 730 | buildConfigurations = ( 731 | FA9BE2551BAF24690016A7F7 /* Debug */, 732 | FA9BE2561BAF24690016A7F7 /* Release */, 733 | ); 734 | defaultConfigurationIsVisible = 0; 735 | defaultConfigurationName = Release; 736 | }; 737 | FA9BE2571BAF24690016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContextDemoTests" */ = { 738 | isa = XCConfigurationList; 739 | buildConfigurations = ( 740 | FA9BE2581BAF24690016A7F7 /* Debug */, 741 | FA9BE2591BAF24690016A7F7 /* Release */, 742 | ); 743 | defaultConfigurationIsVisible = 0; 744 | defaultConfigurationName = Release; 745 | }; 746 | FA9BE25A1BAF24690016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContextDemoUITests" */ = { 747 | isa = XCConfigurationList; 748 | buildConfigurations = ( 749 | FA9BE25B1BAF24690016A7F7 /* Debug */, 750 | FA9BE25C1BAF24690016A7F7 /* Release */, 751 | ); 752 | defaultConfigurationIsVisible = 0; 753 | defaultConfigurationName = Release; 754 | }; 755 | FA9BE27A1BAF285A0016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContext Extension" */ = { 756 | isa = XCConfigurationList; 757 | buildConfigurations = ( 758 | FA9BE27B1BAF285A0016A7F7 /* Debug */, 759 | FA9BE27C1BAF285A0016A7F7 /* Release */, 760 | ); 761 | defaultConfigurationIsVisible = 0; 762 | defaultConfigurationName = Release; 763 | }; 764 | FA9BE27E1BAF285A0016A7F7 /* Build configuration list for PBXNativeTarget "WCApplicationContext" */ = { 765 | isa = XCConfigurationList; 766 | buildConfigurations = ( 767 | FA9BE27F1BAF285A0016A7F7 /* Debug */, 768 | FA9BE2801BAF285A0016A7F7 /* Release */, 769 | ); 770 | defaultConfigurationIsVisible = 0; 771 | defaultConfigurationName = Release; 772 | }; 773 | /* End XCConfigurationList section */ 774 | }; 775 | rootObject = FA9BE2241BAF24690016A7F7 /* Project object */; 776 | } 777 | --------------------------------------------------------------------------------