├── .gitignore
├── README.md
├── Tutorial_1_GettingStartedTutorial
├── .DS_Store
├── Apple Watch Tutorial Watch App
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── Interface.storyboard
├── Apple Watch Tutorial WatchKit Extension
│ ├── Images.xcassets
│ │ └── MyImage.imageset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── InterfaceController.h
│ └── InterfaceController.m
├── Apple Watch Tutorial.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── Apple Watch Tutorial.xccheckout
│ │ └── xcuserdata
│ │ │ └── ravinsardal.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── ravinsardal.xcuserdatad
│ │ └── xcschemes
│ │ ├── Apple Watch Tutorial Watch App.xcscheme
│ │ ├── Apple Watch Tutorial.xcscheme
│ │ └── xcschememanagement.plist
├── Apple Watch Tutorial
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── Apple Watch TutorialTests
│ ├── Apple_Watch_TutorialTests.m
│ └── Info.plist
├── Tutorial_2_SharingDataTutorial
├── ObjC
│ ├── README.md
│ ├── SharingDataTutorial Watch App
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ └── Interface.storyboard
│ ├── SharingDataTutorial WatchKit Extension
│ │ ├── Images.xcassets
│ │ │ └── MyImage.imageset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── InterfaceController.h
│ │ ├── InterfaceController.m
│ │ └── SharingDataTutorial WatchKit Extension.entitlements
│ ├── SharingDataTutorial.xcodeproj
│ │ └── project.pbxproj
│ ├── SharingDataTutorial
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── SharingDataTutorial.entitlements
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ └── SharingDataTutorialTests
│ │ ├── Info.plist
│ │ └── SharingDataTutorialTests.m
└── Swift
│ ├── SharingDataTutorial WatchKit App
│ ├── Base.lproj
│ │ └── Interface.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ └── Info.plist
│ ├── SharingDataTutorial WatchKit Extension
│ ├── Images.xcassets
│ │ └── README__ignoredByTemplate__
│ ├── Info.plist
│ ├── InterfaceController.swift
│ └── SharingDataTutorial WatchKit Extension.entitlements
│ ├── SharingDataTutorial.xcodeproj
│ └── project.pbxproj
│ ├── SharingDataTutorial
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── SharingDataTutorial.entitlements
│ └── ViewController.swift
│ └── SharingDataTutorialTests
│ ├── Info.plist
│ └── SharingDataTutorialTests.swift
├── Tutorial_3_HTTPRequestTutorialAppleWatch
├── .DS_Store
├── HTTPRequestTutorialAppleWatch Watch App
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── Interface.storyboard
├── HTTPRequestTutorialAppleWatch WatchKit Extension
│ ├── Images.xcassets
│ │ └── MyImage.imageset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── InterfaceController.h
│ └── InterfaceController.m
├── HTTPRequestTutorialAppleWatch.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── HTTPRequestTutorialAppleWatch.xccheckout
│ │ └── xcuserdata
│ │ │ └── ravinsardal.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── ravinsardal.xcuserdatad
│ │ └── xcschemes
│ │ ├── HTTPRequestTutorialAppleWatch Watch App.xcscheme
│ │ ├── HTTPRequestTutorialAppleWatch.xcscheme
│ │ └── xcschememanagement.plist
├── HTTPRequestTutorialAppleWatch
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── HTTPRequestTutorialAppleWatchTests
│ ├── HTTPRequestTutorialAppleWatchTests.m
│ └── Info.plist
├── Tutorial_4_WatchNotification
├── .DS_Store
├── WatchNotification WatchKit App
│ ├── Base.lproj
│ │ └── Interface.storyboard
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ └── Info.plist
├── WatchNotification WatchKit Extension
│ ├── Images.xcassets
│ │ └── MyImage.imageset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── InterfaceController.h
│ ├── InterfaceController.m
│ ├── NotificationController.h
│ ├── NotificationController.m
│ └── PushNotificationPayload.apns
├── WatchNotification.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── WatchNotification.xccheckout
│ │ └── xcuserdata
│ │ │ └── ravinsardal.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── ravinsardal.xcuserdatad
│ │ └── xcschemes
│ │ ├── Notification ------ of WatchNotification WatchKit App.xcscheme
│ │ ├── WatchNotification WatchKit App.xcscheme
│ │ ├── WatchNotification.xcscheme
│ │ └── xcschememanagement.plist
├── WatchNotification
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── WatchNotificationTests
│ ├── Info.plist
│ └── WatchNotificationTests.m
├── Tutorial_5_MapKitAppleWatchTutorial
├── MapKitAppleWatchTutorial WatchKit App
│ ├── Base.lproj
│ │ └── Interface.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ └── Info.plist
├── MapKitAppleWatchTutorial WatchKit Extension
│ ├── Images.xcassets
│ │ └── README__ignoredByTemplate__
│ ├── Info.plist
│ └── InterfaceController.swift
├── MapKitAppleWatchTutorial.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── ravinsardal.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── ravinsardal.xcuserdatad
│ │ └── xcschemes
│ │ ├── MapKitAppleWatchTutorial WatchKit App.xcscheme
│ │ ├── MapKitAppleWatchTutorial.xcscheme
│ │ └── xcschememanagement.plist
├── MapKitAppleWatchTutorial
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
└── MapKitAppleWatchTutorialTests
│ ├── Info.plist
│ └── MapKitAppleWatchTutorialTests.swift
├── Tutorial_6_WatchKitAnimation
├── ObjectiveC
│ └── AppleWatchAnimationsTutorial
│ │ ├── AppleWatchAnimationsTutorial WatchKit App
│ │ ├── Base.lproj
│ │ │ └── Interface.storyboard
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── wheel-0.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── wheel-0.png
│ │ │ ├── wheel-1.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── wheel-1.png
│ │ │ ├── wheel-2.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── wheel-2.png
│ │ │ ├── wheel-3.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── wheel-3.png
│ │ │ ├── wheel-4.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── wheel-4.png
│ │ │ └── wheel-5.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── wheel-5.png
│ │ └── Info.plist
│ │ ├── AppleWatchAnimationsTutorial WatchKit Extension
│ │ ├── Images.xcassets
│ │ │ └── README__ignoredByTemplate__
│ │ ├── Info.plist
│ │ ├── InterfaceController.h
│ │ └── InterfaceController.m
│ │ ├── AppleWatchAnimationsTutorial.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ └── AppleWatchAnimationsTutorial.xccheckout
│ │ │ └── xcuserdata
│ │ │ │ └── ravinsardal.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── ravinsardal.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── AppleWatchAnimationsTutorial WatchKit App.xcscheme
│ │ │ ├── AppleWatchAnimationsTutorial.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ ├── AppleWatchAnimationsTutorial
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ │ └── AppleWatchAnimationsTutorialTests
│ │ ├── AppleWatchAnimationsTutorialTests.m
│ │ └── Info.plist
└── Swift
│ └── AppleWatchAnimationsTutorial
│ ├── AppleWatchAnimationsTutorial WatchKit App
│ ├── Base.lproj
│ │ └── Interface.storyboard
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── wheel-0.imageset
│ │ │ ├── Contents.json
│ │ │ └── wheel-0.png
│ │ ├── wheel-1.imageset
│ │ │ ├── Contents.json
│ │ │ └── wheel-1.png
│ │ ├── wheel-2.imageset
│ │ │ ├── Contents.json
│ │ │ └── wheel-2.png
│ │ ├── wheel-3.imageset
│ │ │ ├── Contents.json
│ │ │ └── wheel-3.png
│ │ ├── wheel-4.imageset
│ │ │ ├── Contents.json
│ │ │ └── wheel-4.png
│ │ └── wheel-5.imageset
│ │ │ ├── Contents.json
│ │ │ └── wheel-5.png
│ └── Info.plist
│ ├── AppleWatchAnimationsTutorial WatchKit Extension
│ ├── Images.xcassets
│ │ └── README__ignoredByTemplate__
│ ├── Info.plist
│ └── InterfaceController.swift
│ ├── AppleWatchAnimationsTutorial.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── AppleWatchAnimationsTutorial.xccheckout
│ │ └── xcuserdata
│ │ │ └── ravinsardal.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── ravinsardal.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── AppleWatchAnimationsTutorial WatchKit App.xcscheme
│ │ ├── AppleWatchAnimationsTutorial.xcscheme
│ │ └── xcschememanagement.plist
│ ├── AppleWatchAnimationsTutorial
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
│ └── AppleWatchAnimationsTutorialTests
│ ├── AppleWatchAnimationsTutorialTests.swift
│ └── Info.plist
├── Tutorial_7_NativeWatchApp(VideoPlayer)
├── ObjC
│ └── NativeWatchApp
│ │ ├── NativeWatchApp WatchKit App
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ └── Interface.storyboard
│ │ └── Info.plist
│ │ ├── NativeWatchApp WatchKit Extension
│ │ ├── Assets.xcassets
│ │ │ └── README__ignoredByTemplate__
│ │ ├── ExtensionDelegate.h
│ │ ├── ExtensionDelegate.m
│ │ ├── Info.plist
│ │ ├── InterfaceController.h
│ │ └── InterfaceController.m
│ │ ├── NativeWatchApp.xcodeproj
│ │ └── project.pbxproj
│ │ └── NativeWatchApp
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ ├── main.m
│ │ └── test.mov
└── Swift
│ └── NativeWatchApp
│ ├── NativeWatchApp WatchKit App
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ └── Interface.storyboard
│ └── Info.plist
│ ├── NativeWatchApp WatchKit Extension
│ ├── Assets.xcassets
│ │ └── README__ignoredByTemplate__
│ ├── ExtensionDelegate.swift
│ ├── Info.plist
│ └── InterfaceController.swift
│ ├── NativeWatchApp.xcodeproj
│ └── project.pbxproj
│ └── NativeWatchApp
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.swift
│ └── test.mov
└── Tutorial_8_WatchConnectivityFramework
├── ObjC
└── WatchConnectivityTutorial
│ ├── WatchApp Extension
│ ├── Assets.xcassets
│ │ └── README__ignoredByTemplate__
│ ├── ExtensionDelegate.h
│ ├── ExtensionDelegate.m
│ ├── Info.plist
│ ├── InterfaceController.h
│ └── InterfaceController.m
│ ├── WatchApp
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ └── Interface.storyboard
│ └── Info.plist
│ ├── WatchConnectivityTutorial.xcodeproj
│ └── project.pbxproj
│ └── WatchConnectivityTutorial
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── Swift
└── WatchConnectivityTutorial
├── WatchApp Extension
├── Assets.xcassets
│ └── README__ignoredByTemplate__
├── ExtensionDelegate.swift
├── Info.plist
└── InterfaceController.swift
├── WatchApp
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ └── Interface.storyboard
└── Info.plist
├── WatchConnectivityTutorial.xcodeproj
└── project.pbxproj
└── WatchConnectivityTutorial
├── AppDelegate.swift
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
└── ViewController.swift
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | build/
3 | *.pbxuser
4 | !default.pbxuser
5 | *.mode1v3
6 | !default.mode1v3
7 | *.mode2v3
8 | !default.mode2v3
9 | *.perspectivev3
10 | !default.perspectivev3
11 | *.xcworkspace
12 | !default.xcworkspace
13 | xcuserdata
14 | profile
15 | *.moved-aside
16 | DerivedData
17 | .idea/
18 | Pods
19 | UserInterfaceState.xcuserstate
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### Apple Watch Tutorials
2 |
3 | [Link to Youtube playlist] (http://www.youtube.com/playlist?list=PLPXQAmNk2rv1XXVfJY4g1rpPXtxPVyNt2)
4 |
5 | ### Getting Started
6 | In my [first tutorial](http://youtu.be/MeGArZtbGZ8?list=PLPXQAmNk2rv1XXVfJY4g1rpPXtxPVyNt2) I explain how to download and setup up Xcode Beta for Apple Watch Development.
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_1_GettingStartedTutorial/.DS_Store
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial Watch 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 | }
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial Watch 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 | }
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial Watch App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Apple Watch Tutorial
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.Apple-Watch-Tutorial.watchapp
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 | ravin.Apple-Watch-Tutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial 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 | }
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Apple Watch Tutorial WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.Apple-Watch-Tutorial.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 | ravin.Apple-Watch-Tutorial.watchapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial WatchKit Extension/InterfaceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.h
3 | // Apple Watch Tutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 11/19/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface InterfaceController : WKInterfaceController
13 | @property (strong, nonatomic) IBOutlet WKInterfaceLabel *myLabel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial WatchKit Extension/InterfaceController.m:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.m
3 | // Apple Watch Tutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 11/19/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "InterfaceController.h"
10 |
11 |
12 | @interface InterfaceController()
13 |
14 | @end
15 |
16 | int x = 0;
17 |
18 | @implementation InterfaceController
19 |
20 | - (instancetype)initWithContext:(id)context {
21 | self = [super init];
22 | if (self){
23 | // Initialize variables here.
24 | // Configure interface objects here.
25 | //NSLog(@"%@ initWithContext", self);
26 | }
27 | return self;
28 | }
29 |
30 | - (void)willActivate {
31 | // This method is called when watch view controller is about to be visible to user
32 | //NSLog(@"%@ will activate", self);
33 |
34 | self.myLabel.text = @"0";
35 | }
36 |
37 | - (void)didDeactivate {
38 | // This method is called when watch view controller is no longer visible
39 | //NSLog(@"%@ did deactivate", self);
40 | }
41 |
42 | - (IBAction)upButton {
43 |
44 | x++;
45 | NSString *myString = [NSString stringWithFormat:@"%d",x];
46 | self.myLabel.text = myString;
47 |
48 | }
49 |
50 | - (IBAction)downButton {
51 | x--;
52 | NSString *myString = [NSString stringWithFormat:@"%d",x];
53 | self.myLabel.text = myString;
54 |
55 | }
56 |
57 |
58 | @end
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial.xcodeproj/xcuserdata/ravinsardal.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Apple Watch Tutorial Watch App.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | Apple Watch Tutorial.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 12B2D6B51A1D11A400513C0A
21 |
22 | primary
23 |
24 |
25 | 12B2D6CE1A1D11A400513C0A
26 |
27 | primary
28 |
29 |
30 | 12B2D6F01A1D11D900513C0A
31 |
32 | primary
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Apple Watch Tutorial
4 | //
5 | // Created by Ravin Sardal on 11/19/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Apple Watch Tutorial
4 | //
5 | // Created by Ravin Sardal on 11/19/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // Apple Watch Tutorial
4 | //
5 | // Created by Ravin Sardal on 11/19/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch Tutorial/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Apple Watch Tutorial
4 | //
5 | // Created by Ravin Sardal on 11/19/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch TutorialTests/Apple_Watch_TutorialTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Apple_Watch_TutorialTests.m
3 | // Apple Watch TutorialTests
4 | //
5 | // Created by Ravin Sardal on 11/19/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface Apple_Watch_TutorialTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation Apple_Watch_TutorialTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Tutorial_1_GettingStartedTutorial/Apple Watch TutorialTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_2_SharingDataTutorial/ObjC/README.md
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial Watch 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 | }
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial Watch 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 | }
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial Watch App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | SharingDataTutorial
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.SharingDataTutorial.watchapp
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 | ravin.SharingDataTutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial Watch App/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial 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 | }
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | SharingDataTutorial WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.SharingDataTutorial.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 | ravin.SharingDataTutorial.watchapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial WatchKit Extension/InterfaceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.h
3 | // SharingDataTutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 11/25/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface InterfaceController : WKInterfaceController
13 | @property (strong, nonatomic) IBOutlet WKInterfaceLabel *myLabel;
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial WatchKit Extension/InterfaceController.m:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.m
3 | // SharingDataTutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 11/25/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "InterfaceController.h"
10 |
11 |
12 | @interface InterfaceController()
13 |
14 | @end
15 |
16 |
17 | @implementation InterfaceController
18 | @synthesize myLabel;
19 |
20 | - (instancetype)initWithContext:(id)context {
21 | self = [super init];
22 | if (self){
23 | // Initialize variables here.
24 | // Configure interface objects here.
25 | NSLog(@"%@ initWithContext", self);
26 |
27 | }
28 | return self;
29 | }
30 |
31 | - (void)willActivate {
32 | // This method is called when watch view controller is about to be visible to user
33 | NSLog(@"%@ will activate", self);
34 | }
35 |
36 | - (void)didDeactivate {
37 | // This method is called when watch view controller is no longer visible
38 | NSLog(@"%@ did deactivate", self);
39 | }
40 | - (IBAction)showUserInfo {
41 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.sharingdata"];
42 | [mySharedDefaults synchronize];
43 | self.myLabel.text = [mySharedDefaults stringForKey:@"savedUserInput"];
44 | }
45 |
46 | @end
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial WatchKit Extension/SharingDataTutorial WatchKit Extension.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.sharingdata
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SharingDataTutorial
4 | //
5 | // Created by Ravin Sardal on 11/25/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial/SharingDataTutorial.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.sharingdata
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SharingDataTutorial
4 | //
5 | // Created by Ravin Sardal on 11/25/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 | @property (strong, nonatomic) IBOutlet UILabel *myLabel;
13 | @property (strong, nonatomic) IBOutlet UITextField *myTextField;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // SharingDataTutorial
4 | //
5 | // Created by Ravin Sardal on 11/25/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | @synthesize myLabel;
18 | @synthesize myTextField;
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 | // Do any additional setup after loading the view, typically from a nib.
23 | }
24 |
25 | - (void)didReceiveMemoryWarning {
26 | [super didReceiveMemoryWarning];
27 | // Dispose of any resources that can be recreated.
28 | }
29 |
30 | - (IBAction)saveInfo:(id)sender {
31 |
32 | NSString* myString = [myTextField text];
33 | self.myLabel.text = myString;
34 |
35 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.sharingdata"];
36 | [mySharedDefaults setObject:myString forKey:@"savedUserInput"];
37 | [mySharedDefaults synchronize];
38 |
39 | }
40 |
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorial/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SharingDataTutorial
4 | //
5 | // Created by Ravin Sardal on 11/25/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorialTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/ObjC/SharingDataTutorialTests/SharingDataTutorialTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SharingDataTutorialTests.m
3 | // SharingDataTutorialTests
4 | //
5 | // Created by Ravin Sardal on 11/25/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface SharingDataTutorialTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation SharingDataTutorialTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial WatchKit App/Base.lproj/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial WatchKit App/Images.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 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | SharingDataTutorial
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.SharingDataTutorial.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 | ravin.SharingDataTutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial WatchKit Extension/Images.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | SharingDataTutorial WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.SharingDataTutorial.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 | ravin.SharingDataTutorial.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | $(PRODUCT_MODULE_NAME).InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial WatchKit Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // SharingDataTutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 5/22/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | @IBOutlet var myLabel: WKInterfaceLabel!
16 |
17 | override func awakeWithContext(context: AnyObject?) {
18 | super.awakeWithContext(context)
19 |
20 | // Configure interface objects here.
21 | }
22 |
23 | override func willActivate() {
24 | // This method is called when watch view controller is about to be visible to user
25 | super.willActivate()
26 | }
27 |
28 | override func didDeactivate() {
29 | // This method is called when watch view controller is no longer visible
30 | super.didDeactivate()
31 | }
32 |
33 | @IBAction func showUserInfo() {
34 |
35 | let mySharedDefaults = NSUserDefaults(suiteName: "group.sharingdata")
36 |
37 | mySharedDefaults?.synchronize()
38 |
39 | self.myLabel.setText(mySharedDefaults?.stringForKey("savedUserInput"))
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial WatchKit Extension/SharingDataTutorial WatchKit Extension.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.sharingdata
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial/SharingDataTutorial.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.sharingdata
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorial/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SharingDataTutorial
4 | //
5 | // Created by Ravin Sardal on 5/22/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | @IBOutlet var myLabel: UILabel!
14 | @IBOutlet var myTextField: UITextField!
15 |
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | override func didReceiveMemoryWarning() {
23 | super.didReceiveMemoryWarning()
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @IBAction func saveInfo(sender: AnyObject) {
28 | var myString = self.myTextField.text
29 | self.myLabel.text = myString
30 |
31 | let mySharedDefaults = NSUserDefaults(suiteName: "group.sharingdata")
32 |
33 | mySharedDefaults?.setObject(myString, forKey: "savedUserInput")
34 |
35 | mySharedDefaults?.synchronize()
36 |
37 | }
38 |
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorialTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_2_SharingDataTutorial/Swift/SharingDataTutorialTests/SharingDataTutorialTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SharingDataTutorialTests.swift
3 | // SharingDataTutorialTests
4 | //
5 | // Created by Ravin Sardal on 5/22/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class SharingDataTutorialTests: 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 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_3_HTTPRequestTutorialAppleWatch/.DS_Store
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch Watch 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 | }
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch Watch 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 | }
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch Watch App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | HTTPRequestTutorialAppleWatch
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.HTTPRequestTutorialAppleWatch.watchapp
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 | ravin.HTTPRequestTutorialAppleWatch
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch Watch App/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch 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 | }
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | HTTPRequestTutorialAppleWatch WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.HTTPRequestTutorialAppleWatch.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 | ravin.HTTPRequestTutorialAppleWatch.watchapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch WatchKit Extension/InterfaceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.h
3 | // HTTPRequestTutorialAppleWatch WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 12/3/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface InterfaceController : WKInterfaceController
13 | @property (strong, nonatomic) IBOutlet WKInterfaceLabel *myLabel;
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch.xcodeproj/xcuserdata/ravinsardal.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HTTPRequestTutorialAppleWatch Watch App.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | HTTPRequestTutorialAppleWatch.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 128811401A30189E00987E7D
21 |
22 | primary
23 |
24 |
25 | 128811591A30189E00987E7D
26 |
27 | primary
28 |
29 |
30 | 1288117B1A3018C200987E7D
31 |
32 | primary
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HTTPRequestTutorialAppleWatch
4 | //
5 | // Created by Ravin Sardal on 12/3/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch/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 | }
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // HTTPRequestTutorialAppleWatch
4 | //
5 | // Created by Ravin Sardal on 12/3/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // HTTPRequestTutorialAppleWatch
4 | //
5 | // Created by Ravin Sardal on 12/3/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatch/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HTTPRequestTutorialAppleWatch
4 | //
5 | // Created by Ravin Sardal on 12/3/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatchTests/HTTPRequestTutorialAppleWatchTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // HTTPRequestTutorialAppleWatchTests.m
3 | // HTTPRequestTutorialAppleWatchTests
4 | //
5 | // Created by Ravin Sardal on 12/3/14.
6 | // Copyright (c) 2014 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface HTTPRequestTutorialAppleWatchTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation HTTPRequestTutorialAppleWatchTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Tutorial_3_HTTPRequestTutorialAppleWatch/HTTPRequestTutorialAppleWatchTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_4_WatchNotification/.DS_Store
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification 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 | }
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification 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 | }
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | WatchNotification
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.WatchNotification.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 | ravin.WatchNotification
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification 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 | }
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | WatchNotification WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.WatchNotification.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 | ravin.WatchNotification.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification WatchKit Extension/InterfaceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.h
3 | // WatchNotification WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface InterfaceController : WKInterfaceController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification WatchKit Extension/InterfaceController.m:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.m
3 | // WatchNotification WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "InterfaceController.h"
10 |
11 |
12 | @interface InterfaceController()
13 |
14 | @end
15 |
16 |
17 | @implementation InterfaceController
18 |
19 | - (void)awakeWithContext:(id)context {
20 | [super awakeWithContext:context];
21 |
22 | // Configure interface objects here.
23 | }
24 |
25 | - (void)willActivate {
26 | // This method is called when watch view controller is about to be visible to user
27 | [super willActivate];
28 | }
29 |
30 | - (void)didDeactivate {
31 | // This method is called when watch view controller is no longer visible
32 | [super didDeactivate];
33 | }
34 |
35 | @end
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification WatchKit Extension/NotificationController.h:
--------------------------------------------------------------------------------
1 | //
2 | // NotificationController.h
3 | // WatchNotification WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface NotificationController : WKUserNotificationInterfaceController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification WatchKit Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Feed Cat!",
5 | "title": "Pet Reminder"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_4_WatchNotification/WatchNotification.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification.xcodeproj/xcuserdata/ravinsardal.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Notification ------ of WatchNotification WatchKit App.xcscheme
8 |
9 | orderHint
10 | 2
11 |
12 | WatchNotification WatchKit App.xcscheme
13 |
14 | orderHint
15 | 1
16 |
17 | WatchNotification.xcscheme
18 |
19 | orderHint
20 | 0
21 |
22 |
23 | SuppressBuildableAutocreation
24 |
25 | 12001A1A1A8C8FD100514E19
26 |
27 | primary
28 |
29 |
30 | 12001A331A8C8FD100514E19
31 |
32 | primary
33 |
34 |
35 | 12001A561A8C8FF900514E19
36 |
37 | primary
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // WatchNotification
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification/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 | }
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // WatchNotification
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // WatchNotification
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotification/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // WatchNotification
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotificationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_4_WatchNotification/WatchNotificationTests/WatchNotificationTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // WatchNotificationTests.m
3 | // WatchNotificationTests
4 | //
5 | // Created by Ravin Sardal on 2/11/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface WatchNotificationTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation WatchNotificationTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial WatchKit App/Base.lproj/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial WatchKit App/Images.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 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | MapKitAppleWatchTutorial
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.MapKitAppleWatchTutorial.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 | ravin.MapKitAppleWatchTutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial WatchKit Extension/Images.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | MapKitAppleWatchTutorial WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.MapKitAppleWatchTutorial.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 | ravin.MapKitAppleWatchTutorial.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | $(PRODUCT_MODULE_NAME).InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial WatchKit Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // MapKitAppleWatchTutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 4/29/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 | import MapKit
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | @IBOutlet var myMapView: WKInterfaceMap!
16 |
17 | override func awakeWithContext(context: AnyObject?) {
18 | super.awakeWithContext(context)
19 |
20 | // Configure interface objects here.
21 | }
22 |
23 | override func willActivate() {
24 | // This method is called when watch view controller is about to be visible to user
25 | super.willActivate()
26 |
27 | let infiniteLoopCoordinates = CLLocationCoordinate2D(latitude: 37.3324698, longitude: -122.0310092)
28 |
29 | let areaSpan = MKCoordinateSpanMake(0.05, 0.05)
30 |
31 | let areaRegion = MKCoordinateRegion(center: infiniteLoopCoordinates, span: areaSpan)
32 |
33 | myMapView.setRegion(areaRegion)
34 | }
35 |
36 | override func didDeactivate() {
37 | // This method is called when watch view controller is no longer visible
38 | super.didDeactivate()
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial.xcodeproj/xcuserdata/ravinsardal.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MapKitAppleWatchTutorial WatchKit App.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | MapKitAppleWatchTutorial.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 12055CE31AF2037B0013F4BC
21 |
22 | primary
23 |
24 |
25 | 12055CF81AF2037B0013F4BC
26 |
27 | primary
28 |
29 |
30 | 12055D161AF2039F0013F4BC
31 |
32 | primary
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorial/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // MapKitAppleWatchTutorial
4 | //
5 | // Created by Ravin Sardal on 4/29/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorialTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_5_MapKitAppleWatchTutorial/MapKitAppleWatchTutorialTests/MapKitAppleWatchTutorialTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MapKitAppleWatchTutorialTests.swift
3 | // MapKitAppleWatchTutorialTests
4 | //
5 | // Created by Ravin Sardal on 4/29/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class MapKitAppleWatchTutorialTests: 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 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Base.lproj/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.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 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-0.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-0.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-0.imageset/wheel-0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-0.imageset/wheel-0.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-1.imageset/wheel-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-1.imageset/wheel-1.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-2.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-2.imageset/wheel-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-2.imageset/wheel-2.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-3.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-3.imageset/wheel-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-3.imageset/wheel-3.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-4.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-4.imageset/wheel-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-4.imageset/wheel-4.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-5.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-5.imageset/wheel-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-5.imageset/wheel-5.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | AppleWatchAnimationsTutorial
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.AppleWatchAnimationsTutorial.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 | ravin.AppleWatchAnimationsTutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit Extension/Images.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | AppleWatchAnimationsTutorial WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.AppleWatchAnimationsTutorial.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 | ravin.AppleWatchAnimationsTutorial.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit Extension/InterfaceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.h
3 | // AppleWatchAnimationsTutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface InterfaceController : WKInterfaceController
13 | @property (strong, nonatomic) IBOutlet WKInterfaceImage *myImageView;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit Extension/InterfaceController.m:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.m
3 | // AppleWatchAnimationsTutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "InterfaceController.h"
10 |
11 |
12 | @interface InterfaceController()
13 |
14 | @end
15 |
16 |
17 | @implementation InterfaceController
18 |
19 | - (void)awakeWithContext:(id)context {
20 | [super awakeWithContext:context];
21 |
22 | [self.myImageView setImageNamed:@"wheel-"];
23 | [self.myImageView startAnimatingWithImagesInRange:NSMakeRange(0, 5) duration:1 repeatCount:-1];
24 |
25 | }
26 |
27 | - (void)willActivate {
28 | // This method is called when watch view controller is about to be visible to user
29 | [super willActivate];
30 | }
31 |
32 | - (void)didDeactivate {
33 | // This method is called when watch view controller is no longer visible
34 | [super didDeactivate];
35 | }
36 |
37 | @end
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/xcuserdata/ravinsardal.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AppleWatchAnimationsTutorial WatchKit App.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | AppleWatchAnimationsTutorial.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 12FDCF4D1B0B036B00B152D0
21 |
22 | primary
23 |
24 |
25 | 12FDCF661B0B036B00B152D0
26 |
27 | primary
28 |
29 |
30 | 12FDCF851B0B037500B152D0
31 |
32 | primary
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AppleWatchAnimationsTutorial
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AppleWatchAnimationsTutorial
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // AppleWatchAnimationsTutorial
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AppleWatchAnimationsTutorial
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorialTests/AppleWatchAnimationsTutorialTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppleWatchAnimationsTutorialTests.m
3 | // AppleWatchAnimationsTutorialTests
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface AppleWatchAnimationsTutorialTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation AppleWatchAnimationsTutorialTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/ObjectiveC/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorialTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Base.lproj/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.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 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-0.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-0.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-0.imageset/wheel-0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-0.imageset/wheel-0.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-1.imageset/wheel-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-1.imageset/wheel-1.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-2.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-2.imageset/wheel-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-2.imageset/wheel-2.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-3.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-3.imageset/wheel-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-3.imageset/wheel-3.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-4.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-4.imageset/wheel-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-4.imageset/wheel-4.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wheel-5.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-5.imageset/wheel-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Images.xcassets/wheel-5.imageset/wheel-5.png
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | AppleWatchAnimationsTutorial
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.AppleWatchAnimationsTutorial.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 | ravin.AppleWatchAnimationsTutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit Extension/Images.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | AppleWatchAnimationsTutorial WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | ravin.AppleWatchAnimationsTutorial.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 | ravin.AppleWatchAnimationsTutorial.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | $(PRODUCT_MODULE_NAME).InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial WatchKit Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // AppleWatchAnimationsTutorial WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | @IBOutlet var myImageView: WKInterfaceImage!
16 |
17 | override func awakeWithContext(context: AnyObject?) {
18 | super.awakeWithContext(context)
19 |
20 | self.myImageView.setImageNamed("wheel-")
21 |
22 | self.myImageView.startAnimatingWithImagesInRange(NSMakeRange(0, 5), duration: 1, repeatCount: -1)
23 | // Configure interface objects here.
24 | }
25 |
26 | override func willActivate() {
27 | // This method is called when watch view controller is about to be visible to user
28 | super.willActivate()
29 | }
30 |
31 | override func didDeactivate() {
32 | // This method is called when watch view controller is no longer visible
33 | super.didDeactivate()
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/project.xcworkspace/xcuserdata/ravinsardal.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/xcuserdata/ravinsardal.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial.xcodeproj/xcuserdata/ravinsardal.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AppleWatchAnimationsTutorial WatchKit App.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | AppleWatchAnimationsTutorial.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 12EEA3321B0AFD2800D7D4B7
21 |
22 | primary
23 |
24 |
25 | 12EEA3471B0AFD2800D7D4B7
26 |
27 | primary
28 |
29 |
30 | 12EEA3651B0AFD3900D7D4B7
31 |
32 | primary
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorial/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // AppleWatchAnimationsTutorial
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorialTests/AppleWatchAnimationsTutorialTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppleWatchAnimationsTutorialTests.swift
3 | // AppleWatchAnimationsTutorialTests
4 | //
5 | // Created by Ravin Sardal on 5/18/15.
6 | // Copyright (c) 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class AppleWatchAnimationsTutorialTests: 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 |
--------------------------------------------------------------------------------
/Tutorial_6_WatchKitAnimation/Swift/AppleWatchAnimationsTutorial/AppleWatchAnimationsTutorialTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ravin.$(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 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "24x24",
5 | "idiom" : "watch",
6 | "scale" : "2x",
7 | "role" : "notificationCenter",
8 | "subtype" : "38mm"
9 | },
10 | {
11 | "size" : "27.5x27.5",
12 | "idiom" : "watch",
13 | "scale" : "2x",
14 | "role" : "notificationCenter",
15 | "subtype" : "42mm"
16 | },
17 | {
18 | "size" : "29x29",
19 | "idiom" : "watch",
20 | "role" : "companionSettings",
21 | "scale" : "2x"
22 | },
23 | {
24 | "size" : "29x29",
25 | "idiom" : "watch",
26 | "role" : "companionSettings",
27 | "scale" : "3x"
28 | },
29 | {
30 | "size" : "40x40",
31 | "idiom" : "watch",
32 | "scale" : "2x",
33 | "role" : "appLauncher",
34 | "subtype" : "38mm"
35 | },
36 | {
37 | "size" : "44x44",
38 | "idiom" : "watch",
39 | "scale" : "2x",
40 | "role" : "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 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit App/Base.lproj/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | NativeWatchApp WatchKit App
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | UISupportedInterfaceOrientations
26 |
27 | UIInterfaceOrientationPortrait
28 | UIInterfaceOrientationPortraitUpsideDown
29 |
30 | WKCompanionAppBundleIdentifier
31 | ravin.NativeWatchApp
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit Extension/ExtensionDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.h
3 | // NativeWatchApp WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ExtensionDelegate : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit Extension/ExtensionDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.m
3 | // NativeWatchApp WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ExtensionDelegate.h"
10 |
11 | @implementation ExtensionDelegate
12 |
13 | - (void)applicationDidFinishLaunching {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | - (void)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 | - (void)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 | @end
27 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | NativeWatchApp WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | XPC!
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | NSExtension
26 |
27 | NSExtensionAttributes
28 |
29 | WKAppBundleIdentifier
30 | ravin.NativeWatchApp.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | InterfaceController
37 | WKExtensionDelegateClassName
38 | ExtensionDelegate
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit Extension/InterfaceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.h
3 | // NativeWatchApp WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface InterfaceController : WKInterfaceController
13 | @property (strong, nonatomic) IBOutlet WKInterfaceMovie *myMoviePlayer;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp WatchKit Extension/InterfaceController.m:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.m
3 | // NativeWatchApp WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "InterfaceController.h"
10 |
11 |
12 | @interface InterfaceController()
13 |
14 | @end
15 |
16 |
17 | @implementation InterfaceController
18 |
19 | - (void)awakeWithContext:(id)context {
20 | [super awakeWithContext:context];
21 |
22 | // Configure interface objects here.
23 | }
24 |
25 | - (void)willActivate {
26 | // This method is called when watch view controller is about to be visible to user
27 | [super willActivate];
28 | NSURL* url = [[NSBundle mainBundle] URLForResource:@"test" withExtension:@"mov"];
29 | [self.myMoviePlayer setMovieURL:url];
30 | }
31 |
32 | - (void)didDeactivate {
33 | // This method is called when watch view controller is no longer visible
34 | [super didDeactivate];
35 | }
36 |
37 | @end
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // NativeWatchApp
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/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 | }
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/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 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // NativeWatchApp
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // NativeWatchApp
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // NativeWatchApp
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/test.mov:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_7_NativeWatchApp(VideoPlayer)/ObjC/NativeWatchApp/NativeWatchApp/test.mov
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "24x24",
5 | "idiom" : "watch",
6 | "scale" : "2x",
7 | "role" : "notificationCenter",
8 | "subtype" : "38mm"
9 | },
10 | {
11 | "size" : "27.5x27.5",
12 | "idiom" : "watch",
13 | "scale" : "2x",
14 | "role" : "notificationCenter",
15 | "subtype" : "42mm"
16 | },
17 | {
18 | "size" : "29x29",
19 | "idiom" : "watch",
20 | "role" : "companionSettings",
21 | "scale" : "2x"
22 | },
23 | {
24 | "size" : "29x29",
25 | "idiom" : "watch",
26 | "role" : "companionSettings",
27 | "scale" : "3x"
28 | },
29 | {
30 | "size" : "40x40",
31 | "idiom" : "watch",
32 | "scale" : "2x",
33 | "role" : "appLauncher",
34 | "subtype" : "38mm"
35 | },
36 | {
37 | "size" : "44x44",
38 | "idiom" : "watch",
39 | "scale" : "2x",
40 | "role" : "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 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp WatchKit App/Base.lproj/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | NativeWatchApp WatchKit App
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | UISupportedInterfaceOrientations
26 |
27 | UIInterfaceOrientationPortrait
28 | UIInterfaceOrientationPortraitUpsideDown
29 |
30 | WKCompanionAppBundleIdentifier
31 | ravin.NativeWatchApp
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp WatchKit Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp WatchKit Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // NativeWatchApp WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
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 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | NativeWatchApp WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | XPC!
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | NSExtension
26 |
27 | NSExtensionAttributes
28 |
29 | WKAppBundleIdentifier
30 | ravin.NativeWatchApp.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 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp WatchKit Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // NativeWatchApp WatchKit Extension
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 | @IBOutlet var myMoviePlayer: WKInterfaceMovie!
15 |
16 | override func awakeWithContext(context: AnyObject?) {
17 | super.awakeWithContext(context)
18 |
19 | // Configure interface objects here.
20 | }
21 |
22 | override func willActivate() {
23 | // This method is called when watch view controller is about to be visible to user
24 | super.willActivate()
25 |
26 | let url = NSBundle.mainBundle().URLForResource("test", withExtension: "mov")
27 | self.myMoviePlayer.setMovieURL(url!)
28 | }
29 |
30 | override func didDeactivate() {
31 | // This method is called when watch view controller is no longer visible
32 | super.didDeactivate()
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp/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 | }
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp/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 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // NativeWatchApp
4 | //
5 | // Created by Ravin Sardal on 6/14/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp/test.mov:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/randomite/AppleWatchTutorialSeries/b62b88b495bf4898fa1a102948723aae54b70e24/Tutorial_7_NativeWatchApp(VideoPlayer)/Swift/NativeWatchApp/NativeWatchApp/test.mov
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp Extension/ExtensionDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.h
3 | // WatchApp Extension
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ExtensionDelegate : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp Extension/ExtensionDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.m
3 | // WatchApp Extension
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ExtensionDelegate.h"
10 |
11 | @implementation ExtensionDelegate
12 |
13 | - (void)applicationDidFinishLaunching {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | - (void)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 | - (void)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 | @end
27 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | WatchApp 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 | ravin.WatchConnectivityTutorial.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | InterfaceController
37 | WKExtensionDelegateClassName
38 | ExtensionDelegate
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp Extension/InterfaceController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.h
3 | // WatchApp Extension
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 |
14 | @interface InterfaceController : WKInterfaceController
15 | @property (strong, nonatomic) IBOutlet WKInterfaceLabel *messageLabel;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp Extension/InterfaceController.m:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.m
3 | // WatchApp Extension
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "InterfaceController.h"
10 | #import
11 |
12 | @interface InterfaceController()
13 |
14 | @end
15 |
16 |
17 | @implementation InterfaceController
18 |
19 | - (void)awakeWithContext:(id)context {
20 | [super awakeWithContext:context];
21 |
22 | // Configure interface objects here.
23 | }
24 |
25 | - (void)willActivate {
26 | // This method is called when watch view controller is about to be visible to user
27 | [super willActivate];
28 | }
29 |
30 | - (void)didDeactivate {
31 | // This method is called when watch view controller is no longer visible
32 | [super didDeactivate];
33 | }
34 |
35 | - (IBAction)sendMessage {
36 | WCSession* session = [WCSession defaultSession];
37 | session.delegate = self;
38 | [session activateSession];
39 |
40 | [session sendMessage:@{@"b":@"goodBye"} replyHandler:^(NSDictionary * _Nonnull replyMessage) {
41 |
42 | } errorHandler:^(NSError * _Nonnull error) {
43 |
44 | }];
45 |
46 | }
47 |
48 | - (void) session:(nonnull WCSession *)session didReceiveMessage:(nonnull NSDictionary *)message replyHandler:(nonnull void (^)(NSDictionary * __nonnull))replyHandler{
49 | [[self messageLabel] setText:message[@"a"]];
50 | //NSLog(message);
51 | }
52 |
53 |
54 | @end
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp/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 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp/Base.lproj/Interface.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | WatchConnectivityTutorial
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 | ravin.WatchConnectivityTutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchConnectivityTutorial/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // WatchConnectivityTutorial
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchConnectivityTutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchConnectivityTutorial/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 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchConnectivityTutorial/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // WatchConnectivityTutorial
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 |
13 | @interface ViewController : UIViewController
14 | @property (strong, nonatomic) IBOutlet UILabel *messageLabel;
15 |
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchConnectivityTutorial/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // WatchConnectivityTutorial
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import
11 |
12 | @interface ViewController ()
13 | @end
14 |
15 | @implementation ViewController
16 |
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 | WCSession* session = [WCSession defaultSession];
22 | session.delegate = self;
23 | [session activateSession];
24 | }
25 |
26 | - (void)didReceiveMemoryWarning {
27 | [super didReceiveMemoryWarning];
28 | // Dispose of any resources that can be recreated.
29 | }
30 | - (IBAction)sendMessageToWatch:(id)sender {
31 | WCSession* session = [WCSession defaultSession];
32 | session.delegate = self;
33 | [session activateSession];
34 |
35 | [session sendMessage:@{@"a":@"hello"} replyHandler:^(NSDictionary * _Nonnull replyMessage) {
36 |
37 | } errorHandler:^(NSError * _Nonnull error) {
38 |
39 | }];
40 | }
41 |
42 |
43 | #pragma mark - WatchConnectivity Delegate Method
44 |
45 | - (void) session:(nonnull WCSession *)session didReceiveMessage:(nonnull NSDictionary *)message replyHandler:(nonnull void (^)(NSDictionary * __nonnull))replyHandler{
46 | dispatch_async(dispatch_get_main_queue(), ^{
47 | self.messageLabel.text = message[@"b"];
48 | NSLog(@"%@",message);
49 | });
50 |
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/ObjC/WatchConnectivityTutorial/WatchConnectivityTutorial/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // WatchConnectivityTutorial
4 | //
5 | // Created by Ravin Sardal on 9/27/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchApp Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchApp Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // WatchApp Extension
4 | //
5 | // Created by Ravin Sardal on 9/26/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
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 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchApp Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | WatchApp 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 | ravin.WatchConnectivityTutorial.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 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchApp Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // WatchApp Extension
4 | //
5 | // Created by Ravin Sardal on 9/26/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 | import WatchConnectivity
12 |
13 |
14 | class InterfaceController: WKInterfaceController, WCSessionDelegate {
15 |
16 | @IBOutlet var messageLabel: WKInterfaceLabel!
17 | var session:WCSession!
18 |
19 | override func awakeWithContext(context: AnyObject?) {
20 | super.awakeWithContext(context)
21 | // Configure interface objects here.
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 | if(WCSession.isSupported()){
28 | self.session = WCSession.defaultSession()
29 | self.session.delegate = self
30 | self.session.activateSession()
31 | }
32 | }
33 |
34 | override func didDeactivate() {
35 | // This method is called when watch view controller is no longer visible
36 | super.didDeactivate()
37 | }
38 |
39 | @IBAction func sendMessageToWatch() {
40 | if(WCSession.isSupported()){
41 | session.sendMessage(["b":"goodBye"], replyHandler: nil, errorHandler: nil)
42 | }
43 | }
44 |
45 | func session(session: WCSession, didReceiveMessage message: [String : AnyObject]) {
46 | //recieving message from iphone
47 | self.messageLabel.setText(message["a"]! as? String)
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchApp/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 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | WatchConnectivityTutorial
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 | ravin.WatchConnectivityTutorial
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchConnectivityTutorial/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 | }
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchConnectivityTutorial/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 |
--------------------------------------------------------------------------------
/Tutorial_8_WatchConnectivityFramework/Swift/WatchConnectivityTutorial/WatchConnectivityTutorial/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // WatchConnectivityTutorial
4 | //
5 | // Created by Ravin Sardal on 9/26/15.
6 | // Copyright © 2015 Ravin Sardal. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import WatchConnectivity
11 |
12 | class ViewController: UIViewController, WCSessionDelegate {
13 | var session: WCSession!
14 | @IBOutlet var messageLabel: UILabel!
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | // Do any additional setup after loading the view, typically from a nib.
18 | if(WCSession.isSupported()){
19 | self.session = WCSession.defaultSession()
20 | self.session.delegate = self
21 | self.session.activateSession()
22 | }
23 | }
24 |
25 | override func didReceiveMemoryWarning() {
26 | super.didReceiveMemoryWarning()
27 | // Dispose of any resources that can be recreated.
28 | }
29 |
30 | @IBAction func sendMessageToWatch(sender: AnyObject) {
31 | //send message to watch
32 | session.sendMessage(["a":"hello"], replyHandler: nil, errorHandler: nil)
33 | }
34 |
35 | func session(session: WCSession, didReceiveMessage message: [String : AnyObject]) {
36 | //recieve messages from watch
37 | self.messageLabel.text = message["b"]! as? String
38 | dispatch_async(dispatch_get_main_queue(), {
39 | self.messageLabel.text = message["b"]! as? String
40 | })
41 | }
42 |
43 |
44 | }
45 |
46 |
--------------------------------------------------------------------------------