Skip to content

Commit 17674cb

Browse files
updated Apple Watch to show India data
1 parent 51c1e04 commit 17674cb

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

try! Extension/ComplicationController.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import Foundation
1212

1313
class ComplicationController: NSObject, CLKComplicationDataSource {
1414

15-
fileprivate let conferenceStartDate = Date.date(year: 2017, month: 9, day: 5, hour: 0, minute: 0, second: 0)
15+
fileprivate let conferenceStartDate = Date.date(year: 2017, month: 11, day: 18, hour: 0, minute: 0, second: 0)
1616

1717
fileprivate let sessionBlocks: [SessionBlock] = {
1818
let days = ConferenceDay.all
19-
let conferenceDays = [days[0], days[1]]
19+
let conferenceDays = [days[0]]
2020
let sessionBlocks = conferenceDays.flatMap { $0.sessionBlocks }
2121
return sessionBlocks
2222
}()
@@ -58,8 +58,8 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
5858

5959
if currentDate < conferenceStartDate {
6060
let tmpl = CLKComplicationTemplateModularLargeStandardBody()
61-
tmpl.headerTextProvider = CLKSimpleTextProvider(text: "try! NYC")
62-
tmpl.body1TextProvider = CLKSimpleTextProvider(text: "🗽🐥🎉")
61+
tmpl.headerTextProvider = CLKSimpleTextProvider(text: "try! India")
62+
tmpl.body1TextProvider = CLKSimpleTextProvider(text: "🇮🇳🐥🎉")
6363
let startDate = firstSession.startTime
6464
let style = CLKRelativeDateStyle.natural
6565
let units: NSCalendar.Unit = [.day, .hour, .minute]
@@ -70,8 +70,8 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
7070
} else if currentDate > lastSession.endTime as Date {
7171
let tmpl = CLKComplicationTemplateModularLargeStandardBody()
7272

73-
tmpl.headerTextProvider = CLKSimpleTextProvider(text: "try! NYC")
74-
tmpl.body1TextProvider = CLKSimpleTextProvider(text: "🗽🐥🎉")
73+
tmpl.headerTextProvider = CLKSimpleTextProvider(text: "try! India")
74+
tmpl.body1TextProvider = CLKSimpleTextProvider(text: "🇮🇳🐥🎉")
7575
tmpl.body2TextProvider = CLKTimeIntervalTextProvider(start: firstSession.startTime as Date, end: lastSession.endTime as Date)
7676
let timelineEntry = CLKComplicationTimelineEntry(date: currentDate, complicationTemplate: tmpl)
7777
handler(timelineEntry)
@@ -125,7 +125,7 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
125125
private extension Date {
126126
func toUTC() -> Date {
127127
// Conference timelines are defined in EST
128-
let jst = TimeZone(abbreviation: "EST")!
128+
let jst = TimeZone(abbreviation: "IST")!
129129
let calendar = Calendar.current
130130
guard let currentDate = calendar.date(byAdding: .second, value:
131131
-jst.secondsFromGMT(), to: self) else {

try! Extension/SessionsInterfaceController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SessionsInterfaceController: WKInterfaceController {
2424

2525
if SessionsInterfaceController.first {
2626
let days = ConferenceDay.all
27-
WKInterfaceController.reloadRootControllers(withNames: ["Sep5", "Sep6"], contexts: [days[0], days[1]])
27+
WKInterfaceController.reloadRootControllers(withNames: ["Nov19"], contexts: [days[0]])
2828
SessionsInterfaceController.first = false
2929
}
3030

try!/Base.lproj/Interface.storyboard

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
2+
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="13529" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
33
<device id="watch38" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="watchOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
9-
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="12029"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
9+
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="13507"/>
1010
</dependencies>
1111
<scenes>
12-
<!--try! Sep 5-->
12+
<!--try! Nov 19-->
1313
<scene sceneID="aou-V4-d1y">
1414
<objects>
15-
<controller identifier="Sep5" title="try! Sep 5" id="AgC-eL-Hgc" customClass="SessionsInterfaceController" customModule="try__Extension">
15+
<controller identifier="Nov19" title="try! Nov 19" id="AgC-eL-Hgc" customClass="SessionsInterfaceController" customModule="try__Extension">
1616
<items>
1717
<table alignment="left" pagingScroll="YES" id="OeU-Nt-vmO">
1818
<items>

0 commit comments

Comments
 (0)