diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..02434c3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+
+.DS_Store
+.gitignore
\ No newline at end of file
diff --git a/DesktopShim/AppDelegate.h b/DesktopShim/AppDelegate.h
old mode 100644
new mode 100755
diff --git a/DesktopShim/AppDelegate.m b/DesktopShim/AppDelegate.m
old mode 100644
new mode 100755
diff --git a/DesktopShim/Assets.xcassets/AppIcon.appiconset/Contents.json b/DesktopShim/Assets.xcassets/AppIcon.appiconset/Contents.json
old mode 100644
new mode 100755
diff --git a/DesktopShim/Assets.xcassets/Contents.json b/DesktopShim/Assets.xcassets/Contents.json
old mode 100644
new mode 100755
diff --git a/DesktopShim/Base.lproj/Main.storyboard b/DesktopShim/Base.lproj/Main.storyboard
old mode 100644
new mode 100755
diff --git a/DesktopShim/DesktopShim.entitlements b/DesktopShim/DesktopShim.entitlements
old mode 100644
new mode 100755
diff --git a/DesktopShim/FaceWindow.h b/DesktopShim/FaceWindow.h
old mode 100644
new mode 100755
diff --git a/DesktopShim/FaceWindow.m b/DesktopShim/FaceWindow.m
old mode 100644
new mode 100755
diff --git a/DesktopShim/Info.plist b/DesktopShim/Info.plist
old mode 100644
new mode 100755
diff --git a/DesktopShim/ViewController.h b/DesktopShim/ViewController.h
old mode 100644
new mode 100755
diff --git a/DesktopShim/ViewController.m b/DesktopShim/ViewController.m
old mode 100644
new mode 100755
diff --git a/DesktopShim/main.m b/DesktopShim/main.m
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json b/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/i40@2x.png b/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/i40@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/i44@2x.png b/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/i44@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/i50@2x.png b/SpriteKitWatchFace WatchKit App/Assets.xcassets/AppIcon.appiconset/i50@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit App/Assets.xcassets/Contents.json b/SpriteKitWatchFace WatchKit App/Assets.xcassets/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit App/Base.lproj/Interface.storyboard b/SpriteKitWatchFace WatchKit App/Base.lproj/Interface.storyboard
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit App/Info.plist b/SpriteKitWatchFace WatchKit App/Info.plist
old mode 100644
new mode 100755
index 3248abd..1578cba
--- a/SpriteKitWatchFace WatchKit App/Info.plist
+++ b/SpriteKitWatchFace WatchKit App/Info.plist
@@ -5,7 +5,7 @@
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleDisplayName
- SpriteKitWatchFace WatchKit App
+ Watchie
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.0
CFBundleVersion
- 97
+ 213
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/CenterCircle.imageset/CenterCircle@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/CenterCircle.imageset/CenterCircle@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/CenterCircle.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/CenterCircle.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircle.imageset/ColorRegionCircle@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircle.imageset/ColorRegionCircle@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircle.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircle.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircleReflection.imageset/ColorRegionCircleReflection@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircleReflection.imageset/ColorRegionCircleReflection@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircleReflection.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionCircleReflection.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRing.imageset/ColorRegionRing@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRing.imageset/ColorRegionRing@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRing.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRing.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRingReflection.imageset/ColorRegionRingReflection@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRingReflection.imageset/ColorRegionRingReflection@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRingReflection.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/ColorRegionRingReflection.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_Inlay_vert-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_Inlay_vert-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_Inlay_vert-regular.imageset/Hour_Hand_Inlay_vert-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_Inlay_vert-regular.imageset/Hour_Hand_Inlay_vert-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert-regular.imageset/Hour_Hand-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert-regular.imageset/Hour_Hand-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert_shadow-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert_shadow-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert_shadow-regular.imageset/Hour_Hand_vert_shadow-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Hour_Hand_vert_shadow-regular.imageset/Hour_Hand_vert_shadow-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_Inlay_vert-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_Inlay_vert-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_Inlay_vert-regular.imageset/Minute_Hand_Inlay_vert-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_Inlay_vert-regular.imageset/Minute_Hand_Inlay_vert-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert-regular.imageset/Minute_Hand-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert-regular.imageset/Minute_Hand-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert_shadow-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert_shadow-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert_shadow-regular.imageset/Minute_Hand_vert_shadow-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Minute_Hand_vert_shadow-regular.imageset/Minute_Hand_vert_shadow-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/S4Numbers.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/S4Numbers.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/S4Numbers.imageset/S4Numbers.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/S4Numbers.imageset/S4Numbers.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert-regular.imageset/Second_Hand-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert-regular.imageset/Second_Hand-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert_shadow-regular.imageset/Contents.json b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert_shadow-regular.imageset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert_shadow-regular.imageset/Second_Hand_vert_shadow-regular@2x.png b/SpriteKitWatchFace WatchKit Extension/Assets.xcassets/Second_Hand_vert_shadow-regular.imageset/Second_Hand_vert_shadow-regular@2x.png
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/ExtensionDelegate.h b/SpriteKitWatchFace WatchKit Extension/ExtensionDelegate.h
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/ExtensionDelegate.m b/SpriteKitWatchFace WatchKit Extension/ExtensionDelegate.m
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/FaceScene.h b/SpriteKitWatchFace WatchKit Extension/FaceScene.h
old mode 100644
new mode 100755
index bce03af..714597a
--- a/SpriteKitWatchFace WatchKit Extension/FaceScene.h
+++ b/SpriteKitWatchFace WatchKit Extension/FaceScene.h
@@ -7,6 +7,7 @@
//
#import
+#import
NS_ASSUME_NONNULL_BEGIN
@@ -104,8 +105,15 @@ typedef enum : NSUInteger {
@property BOOL useProgrammaticLayout;
@property BOOL useMasking;
@property BOOL showDate;
+@property BOOL showBattery;
+@property BOOL showDailyMessage;
+@property BOOL showWeather;
@property BOOL showCenterDisc;
+@property BOOL batteryCenter;
+@property BOOL romanNumerals;
+@property BOOL romanBattery;
+
@property CGSize faceSize;
@end
diff --git a/SpriteKitWatchFace WatchKit Extension/FaceScene.m b/SpriteKitWatchFace WatchKit Extension/FaceScene.m
old mode 100644
new mode 100755
index 9eded67..61a4680
--- a/SpriteKitWatchFace WatchKit Extension/FaceScene.m
+++ b/SpriteKitWatchFace WatchKit Extension/FaceScene.m
@@ -86,14 +86,20 @@ - (instancetype)initWithCoder:(NSCoder *)coder
self.theme = [[NSUserDefaults standardUserDefaults] integerForKey:@"Theme"];
self.useProgrammaticLayout = YES;
- self.faceStyle = FaceStyleRound;
+ self.faceStyle = FaceStyleRectangular;
self.numeralStyle = NumeralStyleAll;
- self.tickmarkStyle = TickmarkStyleAll;
+ self.tickmarkStyle = TickmarkStyleNone;
self.majorTickmarkShape = TickmarkShapeRectangular;
self.minorTickmarkShape = TickmarkShapeRectangular;
self.colorRegionStyle = ColorRegionStyleDynamicDuo;
self.showDate = YES;
+ self.showBattery = YES;
+ self.showDailyMessage = YES;
+ self.showWeather = YES;
+ self.batteryCenter = NO;
+ self.romanNumerals = YES;
+ self.romanBattery = NO;
[self refreshTheme];
@@ -102,6 +108,28 @@ - (instancetype)initWithCoder:(NSCoder *)coder
return self;
}
+- (NSString*)romain:(int)num {
+ if (num < 0 || num > 9999) { return @""; } // out of range
+
+ NSArray *r_ones = [NSArray arrayWithObjects:@"I", @"II", @"III", @"IV", @"V", @"VI", @"VII", @"VIII", @"IX", nil];
+ NSArray *r_tens = [NSArray arrayWithObjects:@"X", @"XX", @"XXX", @"XL", @"L", @"LX", @"LXX",@"LXXX", @"XC", nil];
+ NSArray *r_hund = [NSArray arrayWithObjects:@"C", @"CC", @"CCC", @"CD", @"D", @"DC", @"DCC",@"DCCC", @"CM", nil];
+ NSArray *r_thou = [NSArray arrayWithObjects:@"M", @"MM", @"MMM", @"MMMM", @"MMMMM", @"MMMMMM", @"MMMMMMM", @"MMMMMMMM", @"MMMMMMMMM", nil];
+ // real romans should have an horizontal __ ___ _____
+ // bar over number to make x 1000: 4000 is IV, 16000 is XVI, 32767 is XXXMMDCCLXVII...
+
+ int thou = num / 1000;
+ int hundreds = (num -= thou*1000) / 100;
+ int tens = (num -= hundreds*100) / 10;
+ int ones = num % 10; // cheap %, 'cause num is < 100!
+
+ return [NSString stringWithFormat:@"%@%@%@%@",
+ thou ? [r_thou objectAtIndex:thou-1] : @"",
+ hundreds ? [r_hund objectAtIndex:hundreds-1] : @"",
+ tens ? [r_tens objectAtIndex:tens-1] : @"",
+ ones ? [r_ones objectAtIndex:ones-1] : @""];
+}
+
#pragma mark -
-(void)setupTickmarksForRoundFaceWithLayerName:(NSString *)layerName
@@ -160,12 +188,22 @@ -(void)setupTickmarksForRoundFaceWithLayerName:(NSString *)layerName
}
}
-
- CGFloat h = 25;
-
- NSDictionary *attribs = @{NSFontAttributeName : [NSFont systemFontOfSize:h weight:NSFontWeightMedium], NSForegroundColorAttributeName : self.textColor};
-
- NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%i", i == 0 ? 12 : i] attributes:attribs];
+
+ NSAttributedString *labelText;
+
+ if (self.romanNumerals) {
+ CGFloat h = 20;
+
+ NSDictionary *attribs = @{NSFontAttributeName : [NSFont systemFontOfSize:h weight:NSFontWeightMedium], NSForegroundColorAttributeName : self.textColor};
+
+ labelText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@", [self romain:i == 0 ? 12 : i]] attributes:attribs];
+ } else {
+ CGFloat h = 25;
+
+ NSDictionary *attribs = @{NSFontAttributeName : [NSFont systemFontOfSize:h weight:NSFontWeightMedium], NSForegroundColorAttributeName : self.textColor};
+
+ labelText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%i", i == 0 ? 12 : i] attributes:attribs];
+ }
SKLabelNode *numberLabel = [SKLabelNode labelNodeWithAttributedText:labelText];
numberLabel.position = CGPointMake((workingRadius-labelMargin) * -sin(angle), (workingRadius-labelMargin) * cos(angle) - 9);
@@ -245,6 +283,91 @@ -(void)setupTickmarksForRoundFaceWithLayerName:(NSString *)layerName
[faceMarkings addChild:numberLabel];
}
+
+ if (self.showBattery)
+ {
+ [WKInterfaceDevice currentDevice].batteryMonitoringEnabled = YES;
+ float watchBatteryPercentage = [WKInterfaceDevice currentDevice].batteryLevel;
+
+ CGFloat h = 12;
+
+ NSDictionary *attribs = @{NSFontAttributeName : [[NSFont systemFontOfSize:h weight:NSFontWeightMedium] smallCaps], NSForegroundColorAttributeName : self.textColor};
+
+ NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:[[NSString stringWithFormat:@"%.0f%%", watchBatteryPercentage * 100] uppercaseString] attributes:attribs];
+ if (self.romanBattery) {
+ labelText = [[NSAttributedString alloc] initWithString:[[NSString stringWithFormat:@"%@%%", [self romain:watchBatteryPercentage * 100]] uppercaseString] attributes:attribs];
+ }
+
+ SKLabelNode *numberLabel = [SKLabelNode labelNodeWithAttributedText:labelText];
+ CGFloat numeralDelta = 0.0;
+
+ if (self.numeralStyle == NumeralStyleNone)
+ numeralDelta = 10.0;
+
+ if (self.batteryCenter) {
+ numberLabel.position = CGPointMake(0+numeralDelta, -40);
+ } else {
+ numberLabel.position = CGPointMake(-32+numeralDelta, -4);
+ }
+
+ [faceMarkings addChild:numberLabel];
+ }
+
+ if (self.showWeather)
+ {
+
+ NSURLSession *aSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+ [[aSession dataTaskWithURL:[NSURL URLWithString:@"https://custom-y7ru.frb.io/"] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ if (((NSHTTPURLResponse *)response).statusCode == 200) {
+ if (data) {
+ NSString *contentOfURL = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+ NSLog(@"%@", contentOfURL);
+ CGFloat h = 18;
+
+ NSDictionary *attribs = @{NSFontAttributeName : [[NSFont systemFontOfSize:h weight:NSFontWeightMedium] smallCaps], NSForegroundColorAttributeName : self.textColor};
+
+ NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:[[NSString stringWithFormat:@"%@", contentOfURL] uppercaseString] attributes:attribs];
+
+ SKLabelNode *numberLabel = [SKLabelNode labelNodeWithAttributedText:labelText];
+ CGFloat numeralDelta = 0.0;
+
+ if (self.numeralStyle == NumeralStyleNone)
+ numeralDelta = 10.0;
+
+ numberLabel.position = CGPointMake(0+numeralDelta, 40);
+
+ [faceMarkings addChild:numberLabel];
+ }
+ }
+ }] resume];
+ }
+
+// if (self.showDailyMessage)
+// {
+//// [WKInterfaceDevice currentDevice].batteryMonitoringEnabled = YES;
+//// float watchBatteryPercentage = [WKInterfaceDevice currentDevice].batteryLevel;
+//
+// CGFloat h = 12;
+//
+// NSDictionary *attribs = @{NSFontAttributeName : [[NSFont systemFontOfSize:h weight:NSFontWeightMedium] smallCaps], NSForegroundColorAttributeName : self.textColor};
+//
+// NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:[[NSString stringWithFormat:@"Failure is just another chance of getting better."] uppercaseString] attributes:attribs];
+//
+// SKLabelNode *numberLabel = [SKLabelNode labelNodeWithAttributedText:labelText];
+// CGFloat numeralDelta = 0.0;
+//
+// if (self.numeralStyle == NumeralStyleNone)
+// numeralDelta = 10.0;
+//
+//// if (self.dailyMessageCenter) {
+//// numberLabel.position = CGPointMake(0+numeralDelta, 40);
+//// } else {
+//// numberLabel.position = CGPointMake(-32+numeralDelta, -4);
+//// }
+// numberLabel.position = CGPointMake(0+numeralDelta, 40);
+//
+// [faceMarkings addChild:numberLabel];
+// }
[self addChild:faceMarkings];
}
@@ -388,9 +511,19 @@ -(void)setupTickmarksForRectangularFaceWithLayerName:(NSString *)layerName
[faceMarkings addChild:labelNode];
- NSDictionary *attribs = @{NSFontAttributeName : [NSFont fontWithName:@"Futura-Medium" size:fontSize], NSForegroundColorAttributeName : self.textColor};
-
- NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%i", i] attributes:attribs];
+
+ NSAttributedString *labelText;
+
+ if (self.romanNumerals) {
+ CGFloat fontSize = 20;
+ NSDictionary *attribs = @{NSFontAttributeName : [NSFont fontWithName:@"Futura-Medium" size:fontSize], NSForegroundColorAttributeName : self.textColor};
+
+ labelText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@", [self romain:i]] attributes:attribs];
+ } else {
+ NSDictionary *attribs = @{NSFontAttributeName : [NSFont fontWithName:@"Futura-Medium" size:fontSize], NSForegroundColorAttributeName : self.textColor};
+
+ labelText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%i", i] attributes:attribs];
+ }
SKLabelNode *numberLabel = [SKLabelNode labelNodeWithAttributedText:labelText];
@@ -422,6 +555,65 @@ -(void)setupTickmarksForRectangularFaceWithLayerName:(NSString *)layerName
[faceMarkings addChild:numberLabel];
}
+
+ if (self.showBattery)
+ {
+ [WKInterfaceDevice currentDevice].batteryMonitoringEnabled = YES;
+ float watchBatteryPercentage = [WKInterfaceDevice currentDevice].batteryLevel;
+
+ CGFloat h = 12;
+
+ NSDictionary *attribs = @{NSFontAttributeName : [[NSFont systemFontOfSize:h weight:NSFontWeightMedium] smallCaps], NSForegroundColorAttributeName : self.textColor};
+
+ NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:[[NSString stringWithFormat:@"%.0f%%", watchBatteryPercentage * 100] uppercaseString] attributes:attribs];
+
+ if (self.romanBattery) {
+ labelText = [[NSAttributedString alloc] initWithString:[[NSString stringWithFormat:@"%@%%", [self romain:watchBatteryPercentage * 100]] uppercaseString] attributes:attribs];
+ }
+
+ SKLabelNode *numberLabel = [SKLabelNode labelNodeWithAttributedText:labelText];
+ CGFloat numeralDelta = 0.0;
+
+ if (self.numeralStyle == NumeralStyleNone)
+ numeralDelta = 10.0;
+
+ if (self.batteryCenter) {
+ numberLabel.position = CGPointMake(0+numeralDelta, -40);
+ } else {
+ numberLabel.position = CGPointMake(-32+numeralDelta, -4);
+ }
+
+ [faceMarkings addChild:numberLabel];
+ }
+
+ if (self.showWeather)
+ {
+
+ NSURLSession *aSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+ [[aSession dataTaskWithURL:[NSURL URLWithString:@"https://custom-y7ru.frb.io/"] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ if (((NSHTTPURLResponse *)response).statusCode == 200) {
+ if (data) {
+ NSString *contentOfURL = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+ NSLog(@"%@", contentOfURL);
+ CGFloat h = 18;
+
+ NSDictionary *attribs = @{NSFontAttributeName : [[NSFont systemFontOfSize:h weight:NSFontWeightMedium] smallCaps], NSForegroundColorAttributeName : self.textColor};
+
+ NSAttributedString *labelText = [[NSAttributedString alloc] initWithString:[[NSString stringWithFormat:@"%@", contentOfURL] uppercaseString] attributes:attribs];
+
+ SKLabelNode *numberLabel = [SKLabelNode labelNodeWithAttributedText:labelText];
+ CGFloat numeralDelta = 0.0;
+
+ if (self.numeralStyle == NumeralStyleNone)
+ numeralDelta = 10.0;
+
+ numberLabel.position = CGPointMake(0+numeralDelta, 40);
+
+ [faceMarkings addChild:numberLabel];
+ }
+ }
+ }] resume];
+ }
[self addChild:faceMarkings];
}
diff --git a/SpriteKitWatchFace WatchKit Extension/FaceScene.sks b/SpriteKitWatchFace WatchKit Extension/FaceScene.sks
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace WatchKit Extension/Info.plist b/SpriteKitWatchFace WatchKit Extension/Info.plist
old mode 100644
new mode 100755
index d152f8f..bdbc75c
--- a/SpriteKitWatchFace WatchKit Extension/Info.plist
+++ b/SpriteKitWatchFace WatchKit Extension/Info.plist
@@ -5,7 +5,7 @@
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleDisplayName
- SpriteKitWatchFace WatchKit Extension
+ Watchie WatchKit Extension
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.0
CFBundleVersion
- 97
+ 213
NSExtension
NSExtensionAttributes
@@ -30,6 +30,14 @@
NSExtensionPointIdentifier
com.apple.watchkit
+ NSLocationAlwaysAndWhenInUseUsageDescription
+ SpriteKitWatchFace requires your location to use the Weather Complication.
+ NSLocationAlwaysUsageDescription
+ SpriteKitWatchFace requires your location to use the Weather Complication.
+ NSLocationUsageDescription
+ SpriteKitWatchFace requires your location to use the Weather Complication.
+ NSLocationWhenInUseUsageDescription
+ SpriteKitWatchFace requires your location to use the Weather Complication.
WKExtensionDelegateClassName
ExtensionDelegate
diff --git a/SpriteKitWatchFace WatchKit Extension/InterfaceController.h b/SpriteKitWatchFace WatchKit Extension/InterfaceController.h
old mode 100644
new mode 100755
index 9d185a1..2df554f
--- a/SpriteKitWatchFace WatchKit Extension/InterfaceController.h
+++ b/SpriteKitWatchFace WatchKit Extension/InterfaceController.h
@@ -8,9 +8,12 @@
#import
#import
+#import
+#import
@import SpriteKit;
-@interface InterfaceController : WKInterfaceController
+@interface InterfaceController : WKInterfaceController
@property IBOutlet WKInterfaceSKScene * scene;
+@property CLLocationManager *locationManager;
@end
diff --git a/SpriteKitWatchFace WatchKit Extension/InterfaceController.m b/SpriteKitWatchFace WatchKit Extension/InterfaceController.m
old mode 100644
new mode 100755
index c95dae2..e4284be
--- a/SpriteKitWatchFace WatchKit Extension/InterfaceController.m
+++ b/SpriteKitWatchFace WatchKit Extension/InterfaceController.m
@@ -60,6 +60,11 @@ - (void)didAppear
- (void)willActivate {
// This method is called when watch view controller is about to be visible to user
[super willActivate];
+ if ([WCSession isSupported]) {
+ WCSession *session = [WCSession defaultSession];
+ session.delegate = self;
+ [session activateSession];
+ }
}
- (void)didDeactivate {
@@ -89,11 +94,107 @@ - (void)crownDidRotate:(nullable WKCrownSequencer *)crownSequencer rotationalDel
scene.theme = 0;
[scene refreshTheme];
-
+
totalRotation = 0;
}
}
+- (void)session:(nonnull WCSession *)session didReceiveMessage:(nonnull NSDictionary *)message replyHandler:(nonnull void (^)(NSDictionary * __nonnull))replyHandler {
+ if ([message objectForKey:@"themeChange"]) {
+ NSArray *themes = @[@"ThemeHermesPink", @"ThemeHermesOrange", @"ThemeNavy", @"ThemeTidepod", @"ThemeBretonnia", @"ThemeNoir", @"ThemeContrast", @"ThemeVictoire", @"ThemeLiquid", @"ThemeAngler", @"ThemeSculley", @"ThemeKitty", @"ThemeDelay", @"ThemeDiesel", @"ThemeLuxe", @"ThemeSage", @"ThemeBondi", @"ThemeTangerine", @"ThemeStrawberry", @"ThemePawn", @"ThemeRoyal", @"ThemeMarques", @"ThemeVox", @"ThemeSummer", @"ThemeMAX"];
+ int key = [themes indexOfObject:[NSString stringWithFormat:@"Theme%@", [message objectForKey:@"themeChange"]]];
+
+ FaceScene *scene = (FaceScene *)self.scene.scene;
+
+ scene.theme = key;
+
+
+ [scene refreshTheme];
+ } else if ([message objectForKey:@"faceChange"]) {
+ NSArray *faceStyles = @[@"FaceStyleRound", @"FaceStyleRectangular", @"FaceStyleMAX"];
+ int key = [faceStyles indexOfObject:[NSString stringWithFormat:@"FaceStyle%@", [[message objectForKey:@"faceChange"] stringByReplacingOccurrencesOfString:@" Face" withString:@""]]];
+ FaceScene *scene = (FaceScene *)self.scene.scene;
+
+ scene.faceStyle = key;
+
+
+ [scene refreshTheme];
+ } else if ([message objectForKey:@"tickmarkChange"]) {
+ NSArray *faceStyles = @[@"TickmarkStyleAll", @"TickmarkStyleMajor", @"TickmarkStyleMinor", @"TickmarkStyleNone", @"TickmarkStyleMAX"];
+ int key = [faceStyles indexOfObject:[NSString stringWithFormat:@"TickmarkStyle%@", [message objectForKey:@"tickmarkChange"]]];
+ FaceScene *scene = (FaceScene *)self.scene.scene;
+
+ scene.tickmarkStyle = key;
+
+
+ [scene refreshTheme];
+ } else if ([message objectForKey:@"colorRegionChange"]) {
+ NSArray *faceStyles = @[@"ColorRegionStyleNone", @"ColorRegionStyleDynamicDuo", @"ColorRegionStyleHalf", @"ColorRegionStyleCircle", @"ColorRegionStyleRing", @"ColorRegionStyleMAX"];
+ int key = [faceStyles indexOfObject:[NSString stringWithFormat:@"ColorRegionStyle%@", [[message objectForKey:@"colorRegionChange"] stringByReplacingOccurrencesOfString:@" " withString:@""]]];
+ FaceScene *scene = (FaceScene *)self.scene.scene;
+
+ scene.colorRegionStyle = key;
+
+
+ [scene refreshTheme];
+ } else if ([message objectForKey:@"numberStyleChange"]) {
+ NSArray *faceStyles = @[@"NumeralStyleAll", @"NumeralStyleCardinal", @"NumeralStyleNone", @"NumeralStyleMAX"];
+ int key = [faceStyles indexOfObject:[NSString stringWithFormat:@"NumeralStyle%@", [[message objectForKey:@"numberStyleChange"] stringByReplacingOccurrencesOfString:@" " withString:@""]]];
+ FaceScene *scene = (FaceScene *)self.scene.scene;
+
+ scene.numeralStyle = key;
+
+
+ [scene refreshTheme];
+ } else if ([message objectForKey:@"numberTextChange"]) {
+ NSString *numberTextType = [NSString stringWithFormat:@"%@", [[[message objectForKey:@"numberTextChange"] stringByReplacingOccurrencesOfString:@" (I, II, III)" withString:@""] stringByReplacingOccurrencesOfString:@" (1, 2, 3)" withString:@""]];
+ FaceScene *scene = (FaceScene *)self.scene.scene;
+
+ if ([numberTextType isEqual: @"Roman Numerals"]) {
+ scene.romanNumerals = YES;
+ } else {
+ scene.romanNumerals = NO;
+ }
+
+
+ [scene refreshTheme];
+ } else if ([message objectForKey:@"complicationChange"]) {
+ NSString *complicationType = [NSString stringWithFormat:@"%@", [message objectForKey:@"complicationChange"]];
+ FaceScene *scene = (FaceScene *)self.scene.scene;
+
+ if ([complicationType isEqual: @"All"]) {
+ scene.showWeather = YES;
+ scene.showDate = YES;
+ scene.showBattery = YES;
+ } else if ([complicationType isEqual:@"Battery"]) {
+ scene.showWeather = NO;
+ scene.showDate = NO;
+ scene.showBattery = YES;
+ } else if ([complicationType isEqual:@"Date"]) {
+ scene.showWeather = NO;
+ scene.showDate = YES;
+ scene.showBattery = NO;
+ } else if ([complicationType isEqual:@"Weather"]) {
+ scene.showWeather = YES;
+ scene.showDate = NO;
+ scene.showBattery = NO;
+ } else if ([complicationType isEqual:@"None"]) {
+ scene.showWeather = NO;
+ scene.showDate = NO;
+ scene.showBattery = NO;
+ } else {
+ scene.showWeather = NO;
+ scene.showDate = NO;
+ scene.showBattery = NO;
+ }
+
+
+ [scene refreshTheme];
+ } else {
+
+ }
+}
+
@end
diff --git a/SpriteKitWatchFace.xcodeproj/project.pbxproj b/SpriteKitWatchFace.xcodeproj/project.pbxproj
old mode 100644
new mode 100755
index 16e4113..f9b2498
--- a/SpriteKitWatchFace.xcodeproj/project.pbxproj
+++ b/SpriteKitWatchFace.xcodeproj/project.pbxproj
@@ -31,6 +31,11 @@
B0EB7304216E69C40098CF27 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0D30B00216D5B2800444765 /* Assets.xcassets */; };
B0EB7307216E6C380098CF27 /* FaceScene.m in Sources */ = {isa = PBXBuildFile; fileRef = B0EB7306216E6C380098CF27 /* FaceScene.m */; };
B0EB7308216E6C380098CF27 /* FaceScene.m in Sources */ = {isa = PBXBuildFile; fileRef = B0EB7306216E6C380098CF27 /* FaceScene.m */; };
+ FE13264121743C7A003E54EC /* RoundedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE13264021743C7A003E54EC /* RoundedView.swift */; };
+ FE13264421744146003E54EC /* ThemesTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE13264321744146003E54EC /* ThemesTableViewController.m */; };
+ FE8B39DB2174317C0097622D /* WatchConnectivity.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE8B39DA2174317C0097622D /* WatchConnectivity.framework */; };
+ FEDEDC34217458400087957E /* WatchFaceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FEDEDC33217458400087957E /* WatchFaceTableViewCell.m */; };
+ FEDEDC3721745F760087957E /* WatchOptionsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FEDEDC3621745F760087957E /* WatchOptionsTableViewController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -113,6 +118,15 @@
B0EB72FF216E69AB0098CF27 /* DesktopShim.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DesktopShim.entitlements; sourceTree = ""; };
B0EB7305216E6C380098CF27 /* FaceScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FaceScene.h; sourceTree = ""; };
B0EB7306216E6C380098CF27 /* FaceScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FaceScene.m; sourceTree = ""; };
+ FE13263F21743C79003E54EC /* SpriteKitWatchFace-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SpriteKitWatchFace-Bridging-Header.h"; sourceTree = ""; };
+ FE13264021743C7A003E54EC /* RoundedView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoundedView.swift; sourceTree = ""; };
+ FE13264221744146003E54EC /* ThemesTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ThemesTableViewController.h; sourceTree = ""; };
+ FE13264321744146003E54EC /* ThemesTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ThemesTableViewController.m; sourceTree = ""; };
+ FE8B39DA2174317C0097622D /* WatchConnectivity.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WatchConnectivity.framework; path = System/Library/Frameworks/WatchConnectivity.framework; sourceTree = SDKROOT; };
+ FEDEDC32217458400087957E /* WatchFaceTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WatchFaceTableViewCell.h; sourceTree = ""; };
+ FEDEDC33217458400087957E /* WatchFaceTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WatchFaceTableViewCell.m; sourceTree = ""; };
+ FEDEDC3521745F760087957E /* WatchOptionsTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WatchOptionsTableViewController.h; sourceTree = ""; };
+ FEDEDC3621745F760087957E /* WatchOptionsTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WatchOptionsTableViewController.m; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -120,6 +134,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ FE8B39DB2174317C0097622D /* WatchConnectivity.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -149,6 +164,7 @@
B0D30AF9216D5B2700444765 /* SpriteKitWatchFace WatchKit Extension */,
B0EB72E9216E69AA0098CF27 /* DesktopShim */,
B0D30AD1216D5B2500444765 /* Products */,
+ FE8B39D92174317C0097622D /* Frameworks */,
);
sourceTree = "";
};
@@ -170,11 +186,19 @@
B0D30AD4216D5B2500444765 /* AppDelegate.m */,
B0D30AD6216D5B2500444765 /* ViewController.h */,
B0D30AD7216D5B2500444765 /* ViewController.m */,
+ FE13264021743C7A003E54EC /* RoundedView.swift */,
B0D30AD9216D5B2500444765 /* Main.storyboard */,
B0D30ADC216D5B2700444765 /* Assets.xcassets */,
B0D30ADE216D5B2700444765 /* LaunchScreen.storyboard */,
B0D30AE1216D5B2700444765 /* Info.plist */,
B0D30AE2216D5B2700444765 /* main.m */,
+ FE13263F21743C79003E54EC /* SpriteKitWatchFace-Bridging-Header.h */,
+ FE13264221744146003E54EC /* ThemesTableViewController.h */,
+ FE13264321744146003E54EC /* ThemesTableViewController.m */,
+ FEDEDC32217458400087957E /* WatchFaceTableViewCell.h */,
+ FEDEDC33217458400087957E /* WatchFaceTableViewCell.m */,
+ FEDEDC3521745F760087957E /* WatchOptionsTableViewController.h */,
+ FEDEDC3621745F760087957E /* WatchOptionsTableViewController.m */,
);
path = SpriteKitWatchFace;
sourceTree = "";
@@ -223,6 +247,14 @@
path = DesktopShim;
sourceTree = "";
};
+ FE8B39D92174317C0097622D /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ FE8B39DA2174317C0097622D /* WatchConnectivity.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -310,6 +342,7 @@
TargetAttributes = {
B0D30ACF216D5B2500444765 = {
CreatedOnToolsVersion = 10.0;
+ LastSwiftMigration = 1010;
};
B0D30AE5216D5B2700444765 = {
CreatedOnToolsVersion = 10.0;
@@ -447,8 +480,12 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ FE13264121743C7A003E54EC /* RoundedView.swift in Sources */,
+ FE13264421744146003E54EC /* ThemesTableViewController.m in Sources */,
B0D30AD8216D5B2500444765 /* ViewController.m in Sources */,
B0D30AE3216D5B2700444765 /* main.m in Sources */,
+ FEDEDC34217458400087957E /* WatchFaceTableViewCell.m in Sources */,
+ FEDEDC3721745F760087957E /* WatchOptionsTableViewController.m in Sources */,
B0D30AD5216D5B2500444765 /* AppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -643,7 +680,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
INFOPLIST_FILE = "SpriteKitWatchFace WatchKit Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -664,7 +701,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
INFOPLIST_FILE = "SpriteKitWatchFace WatchKit Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -685,7 +722,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
IBSC_MODULE = SpriteKitWatchFace_WatchKit_Extension;
INFOPLIST_FILE = "SpriteKitWatchFace WatchKit App/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.highcaffeinecontent.SpriteKitWatchFace.watchkitapp;
@@ -702,7 +739,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
IBSC_MODULE = SpriteKitWatchFace_WatchKit_Extension;
INFOPLIST_FILE = "SpriteKitWatchFace WatchKit App/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.highcaffeinecontent.SpriteKitWatchFace.watchkitapp;
@@ -718,8 +755,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
INFOPLIST_FILE = SpriteKitWatchFace/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -727,6 +765,9 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.highcaffeinecontent.SpriteKitWatchFace;
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "SpriteKitWatchFace/SpriteKitWatchFace-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@@ -735,8 +776,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
INFOPLIST_FILE = SpriteKitWatchFace/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -744,6 +786,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.highcaffeinecontent.SpriteKitWatchFace;
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "SpriteKitWatchFace/SpriteKitWatchFace-Bridging-Header.h";
+ SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
@@ -756,7 +800,7 @@
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
INFOPLIST_FILE = DesktopShim/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -777,7 +821,7 @@
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- DEVELOPMENT_TEAM = 2ZDN69KUUV;
+ DEVELOPMENT_TEAM = 6578A826QL;
INFOPLIST_FILE = DesktopShim/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
diff --git a/SpriteKitWatchFace.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SpriteKitWatchFace.xcodeproj/project.xcworkspace/contents.xcworkspacedata
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SpriteKitWatchFace.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/SpriteKitWatchFace.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/SpriteKitWatchFace.xcodeproj/project.xcworkspace/xcuserdata/josephshenton.xcuserdatad/UserInterfaceState.xcuserstate b/SpriteKitWatchFace.xcodeproj/project.xcworkspace/xcuserdata/josephshenton.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..af075a0
Binary files /dev/null and b/SpriteKitWatchFace.xcodeproj/project.xcworkspace/xcuserdata/josephshenton.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/SpriteKitWatchFace.xcodeproj/xcuserdata/josephshenton.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/SpriteKitWatchFace.xcodeproj/xcuserdata/josephshenton.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
new file mode 100644
index 0000000..fe2b454
--- /dev/null
+++ b/SpriteKitWatchFace.xcodeproj/xcuserdata/josephshenton.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -0,0 +1,5 @@
+
+
+
diff --git a/SpriteKitWatchFace.xcodeproj/xcuserdata/josephshenton.xcuserdatad/xcschemes/xcschememanagement.plist b/SpriteKitWatchFace.xcodeproj/xcuserdata/josephshenton.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..6252abf
--- /dev/null
+++ b/SpriteKitWatchFace.xcodeproj/xcuserdata/josephshenton.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,24 @@
+
+
+
+
+ SchemeUserState
+
+ DesktopShim.xcscheme
+
+ orderHint
+ 2
+
+ SpriteKitWatchFace WatchKit App.xcscheme
+
+ orderHint
+ 1
+
+ SpriteKitWatchFace.xcscheme
+
+ orderHint
+ 0
+
+
+
+
diff --git a/SpriteKitWatchFace/AppDelegate.h b/SpriteKitWatchFace/AppDelegate.h
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace/AppDelegate.m b/SpriteKitWatchFace/AppDelegate.m
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace/Assets.xcassets/AppIcon.appiconset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/AppIcon.appiconset/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace/Assets.xcassets/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Contents.json
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Angler.imageset/Angler.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Angler.imageset/Angler.png
new file mode 100644
index 0000000..5894f90
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Angler.imageset/Angler.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Angler.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Angler.imageset/Contents.json
new file mode 100644
index 0000000..76ceb39
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Angler.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Angler.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bondi.imageset/Bondi.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bondi.imageset/Bondi.png
new file mode 100644
index 0000000..569a03c
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bondi.imageset/Bondi.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bondi.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bondi.imageset/Contents.json
new file mode 100644
index 0000000..0f187a0
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bondi.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Bondi.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bretonnia.imageset/Bretonnia.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bretonnia.imageset/Bretonnia.png
new file mode 100644
index 0000000..86e47cc
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bretonnia.imageset/Bretonnia.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bretonnia.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bretonnia.imageset/Contents.json
new file mode 100644
index 0000000..95e6af8
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Bretonnia.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Bretonnia.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contrast.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contrast.imageset/Contents.json
new file mode 100644
index 0000000..50afce0
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contrast.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Contrast.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contrast.imageset/Contrast.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contrast.imageset/Contrast.png
new file mode 100644
index 0000000..0d06d51
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Contrast.imageset/Contrast.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Delay.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Delay.imageset/Contents.json
new file mode 100644
index 0000000..d913385
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Delay.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Delay.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Delay.imageset/Delay.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Delay.imageset/Delay.png
new file mode 100644
index 0000000..12b385f
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Delay.imageset/Delay.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Diesel.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Diesel.imageset/Contents.json
new file mode 100644
index 0000000..17cf100
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Diesel.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Diesel.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Diesel.imageset/Diesel.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Diesel.imageset/Diesel.png
new file mode 100644
index 0000000..e362057
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Diesel.imageset/Diesel.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesOrange.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesOrange.imageset/Contents.json
new file mode 100644
index 0000000..9ac69ea
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesOrange.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "HermesOrange.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesOrange.imageset/HermesOrange.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesOrange.imageset/HermesOrange.png
new file mode 100644
index 0000000..d209b84
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesOrange.imageset/HermesOrange.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesPink.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesPink.imageset/Contents.json
new file mode 100644
index 0000000..459fbd6
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesPink.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "HermesPink.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesPink.imageset/HermesPink.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesPink.imageset/HermesPink.png
new file mode 100644
index 0000000..69bc0a1
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/HermesPink.imageset/HermesPink.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Kitty.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Kitty.imageset/Contents.json
new file mode 100644
index 0000000..2e918b6
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Kitty.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Kitty.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Kitty.imageset/Kitty.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Kitty.imageset/Kitty.png
new file mode 100644
index 0000000..24116a2
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Kitty.imageset/Kitty.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Liquid.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Liquid.imageset/Contents.json
new file mode 100644
index 0000000..6018700
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Liquid.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Liquid.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Liquid.imageset/Liquid.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Liquid.imageset/Liquid.png
new file mode 100644
index 0000000..ba8b262
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Liquid.imageset/Liquid.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Luxe.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Luxe.imageset/Contents.json
new file mode 100644
index 0000000..39b4c48
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Luxe.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Luxe.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Luxe.imageset/Luxe.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Luxe.imageset/Luxe.png
new file mode 100644
index 0000000..8f212f8
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Luxe.imageset/Luxe.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Marques.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Marques.imageset/Contents.json
new file mode 100644
index 0000000..4f4bd57
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Marques.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Marques.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Marques.imageset/Marques.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Marques.imageset/Marques.png
new file mode 100644
index 0000000..3f578c9
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Marques.imageset/Marques.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Navy.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Navy.imageset/Contents.json
new file mode 100644
index 0000000..4d9b28d
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Navy.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Navy.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Navy.imageset/Navy.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Navy.imageset/Navy.png
new file mode 100644
index 0000000..4fb1649
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Navy.imageset/Navy.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Noir.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Noir.imageset/Contents.json
new file mode 100644
index 0000000..3c1cfba
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Noir.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Noir.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Noir.imageset/Noir.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Noir.imageset/Noir.png
new file mode 100644
index 0000000..1d96d93
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Noir.imageset/Noir.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Pawn.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Pawn.imageset/Contents.json
new file mode 100644
index 0000000..81527cc
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Pawn.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Pawn.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Pawn.imageset/Pawn.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Pawn.imageset/Pawn.png
new file mode 100644
index 0000000..9f034a1
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Pawn.imageset/Pawn.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Royal.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Royal.imageset/Contents.json
new file mode 100644
index 0000000..3cb8127
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Royal.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Royal.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Royal.imageset/Royal.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Royal.imageset/Royal.png
new file mode 100644
index 0000000..c8c9ca1
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Royal.imageset/Royal.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sage.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sage.imageset/Contents.json
new file mode 100644
index 0000000..e95a46b
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sage.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Sage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sage.imageset/Sage.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sage.imageset/Sage.png
new file mode 100644
index 0000000..0cb123b
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sage.imageset/Sage.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sculley.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sculley.imageset/Contents.json
new file mode 100644
index 0000000..7e33e8e
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sculley.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Sculley.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sculley.imageset/Sculley.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sculley.imageset/Sculley.png
new file mode 100644
index 0000000..c4624d7
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Sculley.imageset/Sculley.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Strawberry.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Strawberry.imageset/Contents.json
new file mode 100644
index 0000000..b3934a5
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Strawberry.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Strawberry.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Strawberry.imageset/Strawberry.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Strawberry.imageset/Strawberry.png
new file mode 100644
index 0000000..062b492
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Strawberry.imageset/Strawberry.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Summer.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Summer.imageset/Contents.json
new file mode 100644
index 0000000..cb63c12
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Summer.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Summer.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Summer.imageset/Summer.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Summer.imageset/Summer.png
new file mode 100644
index 0000000..37b8b71
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Summer.imageset/Summer.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tangerine.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tangerine.imageset/Contents.json
new file mode 100644
index 0000000..3228b8f
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tangerine.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Tangerine.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tangerine.imageset/Tangerine.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tangerine.imageset/Tangerine.png
new file mode 100644
index 0000000..39a8fe8
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tangerine.imageset/Tangerine.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tidepod.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tidepod.imageset/Contents.json
new file mode 100644
index 0000000..14d87c3
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tidepod.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Tidepod.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tidepod.imageset/Tidepod.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tidepod.imageset/Tidepod.png
new file mode 100644
index 0000000..98d29e6
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Tidepod.imageset/Tidepod.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Victoire.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Victoire.imageset/Contents.json
new file mode 100644
index 0000000..13bfc67
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Victoire.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Victoire.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Victoire.imageset/Victoire.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Victoire.imageset/Victoire.png
new file mode 100644
index 0000000..a47cc18
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Victoire.imageset/Victoire.png differ
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Vox.imageset/Contents.json b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Vox.imageset/Contents.json
new file mode 100644
index 0000000..65ec33c
--- /dev/null
+++ b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Vox.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Vox.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Vox.imageset/Vox.png b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Vox.imageset/Vox.png
new file mode 100644
index 0000000..a001234
Binary files /dev/null and b/SpriteKitWatchFace/Assets.xcassets/Watch Faces/Vox.imageset/Vox.png differ
diff --git a/SpriteKitWatchFace/Base.lproj/LaunchScreen.storyboard b/SpriteKitWatchFace/Base.lproj/LaunchScreen.storyboard
old mode 100644
new mode 100755
diff --git a/SpriteKitWatchFace/Base.lproj/Main.storyboard b/SpriteKitWatchFace/Base.lproj/Main.storyboard
old mode 100644
new mode 100755
index 123b811..51a2155
--- a/SpriteKitWatchFace/Base.lproj/Main.storyboard
+++ b/SpriteKitWatchFace/Base.lproj/Main.storyboard
@@ -1,24 +1,1290 @@
-
+
+
+
+
-
-
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SpriteKitWatchFace/Info.plist b/SpriteKitWatchFace/Info.plist
old mode 100644
new mode 100755
index 76f45ac..e4c6bbc
--- a/SpriteKitWatchFace/Info.plist
+++ b/SpriteKitWatchFace/Info.plist
@@ -4,6 +4,8 @@
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Watchie
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
@@ -17,7 +19,7 @@
CFBundleShortVersionString
1.0
CFBundleVersion
- 97
+ 213
LSRequiresIPhoneOS
UILaunchStoryboardName
diff --git a/SpriteKitWatchFace/RoundedView.swift b/SpriteKitWatchFace/RoundedView.swift
new file mode 100644
index 0000000..f965daa
--- /dev/null
+++ b/SpriteKitWatchFace/RoundedView.swift
@@ -0,0 +1,88 @@
+//
+// RoundedView.swift
+// traversal
+//
+// Created by Joseph Shenton on 5/8/18.
+// Copyright © 2018 JJS Digital PTY LTD. All rights reserved.
+//
+
+import Foundation
+import UIKit
+
+@IBDesignable class RoundedImage: UIImageView
+{
+ override func layoutSubviews() {
+ super.layoutSubviews()
+
+ updateCornerRadius()
+ }
+
+ @IBInspectable var rounded: Bool = false {
+ didSet {
+ updateCornerRadius()
+ }
+ }
+
+ @IBInspectable var cornerRadius: CGFloat = 0.1 {
+ didSet {
+ updateCornerRadius()
+ }
+ }
+
+ func updateCornerRadius() {
+ layer.cornerRadius = rounded ? cornerRadius : 0
+ layer.masksToBounds = rounded ? true : false
+ }
+}
+
+@IBDesignable class RoundedView: UIView
+{
+ override func layoutSubviews() {
+ super.layoutSubviews()
+
+ updateCornerRadius()
+ }
+
+ @IBInspectable var rounded: Bool = false {
+ didSet {
+ updateCornerRadius()
+ }
+ }
+
+ @IBInspectable var cornerRadius: CGFloat = 0.1 {
+ didSet {
+ updateCornerRadius()
+ }
+ }
+
+ func updateCornerRadius() {
+ layer.cornerRadius = rounded ? cornerRadius : 0
+ layer.masksToBounds = rounded ? true : false
+ }
+}
+
+@IBDesignable class RoundedButton: UIButton
+{
+ override func layoutSubviews() {
+ super.layoutSubviews()
+
+ updateCornerRadius()
+ }
+
+ @IBInspectable var rounded: Bool = false {
+ didSet {
+ updateCornerRadius()
+ }
+ }
+
+ @IBInspectable var cornerRadius: CGFloat = 0.1 {
+ didSet {
+ updateCornerRadius()
+ }
+ }
+
+ func updateCornerRadius() {
+ layer.cornerRadius = rounded ? cornerRadius : 0
+ layer.masksToBounds = rounded ? true : false
+ }
+}
diff --git a/SpriteKitWatchFace/SpriteKitWatchFace-Bridging-Header.h b/SpriteKitWatchFace/SpriteKitWatchFace-Bridging-Header.h
new file mode 100644
index 0000000..1b2cb5d
--- /dev/null
+++ b/SpriteKitWatchFace/SpriteKitWatchFace-Bridging-Header.h
@@ -0,0 +1,4 @@
+//
+// Use this file to import your target's public headers that you would like to expose to Swift.
+//
+
diff --git a/SpriteKitWatchFace/ThemesTableViewController.h b/SpriteKitWatchFace/ThemesTableViewController.h
new file mode 100644
index 0000000..dd5e0d0
--- /dev/null
+++ b/SpriteKitWatchFace/ThemesTableViewController.h
@@ -0,0 +1,14 @@
+//
+// ThemesTableViewController.h
+// SpriteKitWatchFace
+//
+// Created by Joseph Shenton on 15/10/18.
+// Copyright © 2018 Steven Troughton-Smith. All rights reserved.
+//
+
+#import
+#import
+
+@interface ThemesTableViewController : UITableViewController
+
+@end
diff --git a/SpriteKitWatchFace/ThemesTableViewController.m b/SpriteKitWatchFace/ThemesTableViewController.m
new file mode 100644
index 0000000..6967f19
--- /dev/null
+++ b/SpriteKitWatchFace/ThemesTableViewController.m
@@ -0,0 +1,110 @@
+//
+// ThemesTableViewController.m
+// SpriteKitWatchFace
+//
+// Created by Joseph Shenton on 15/10/18.
+// Copyright © 2018 Steven Troughton-Smith. All rights reserved.
+//
+
+#import "ThemesTableViewController.h"
+
+@interface ThemesTableViewController ()
+
+@end
+
+@implementation ThemesTableViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ if ([WCSession isSupported]) {
+ WCSession *session = [WCSession defaultSession];
+ session.delegate = self;
+ [session activateSession];
+ }
+
+}
+
+#pragma mark - Table view data source
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+ return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ return 24;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+ [tableView deselectRowAtIndexPath:indexPath animated:YES];
+
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+
+ NSString *counterString = [NSString stringWithFormat:@"%@", [cell.textLabel.text stringByReplacingOccurrencesOfString:@" " withString:@""]];
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"themeChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+}
+
+/*
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
+
+ // Configure the cell...
+
+ return cell;
+}
+*/
+
+/*
+// Override to support conditional editing of the table view.
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+ // Return NO if you do not want the specified item to be editable.
+ return YES;
+}
+*/
+
+/*
+// Override to support editing the table view.
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+ if (editingStyle == UITableViewCellEditingStyleDelete) {
+ // Delete the row from the data source
+ [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
+ } else if (editingStyle == UITableViewCellEditingStyleInsert) {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+ }
+}
+*/
+
+/*
+// Override to support rearranging the table view.
+- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
+}
+*/
+
+/*
+// Override to support conditional rearranging of the table view.
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
+ // Return NO if you do not want the item to be re-orderable.
+ return YES;
+}
+*/
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+ // Get the new view controller using [segue destinationViewController].
+ // Pass the selected object to the new view controller.
+}
+*/
+
+@end
diff --git a/SpriteKitWatchFace/ViewController.h b/SpriteKitWatchFace/ViewController.h
old mode 100644
new mode 100755
index 3b0de7f..a625468
--- a/SpriteKitWatchFace/ViewController.h
+++ b/SpriteKitWatchFace/ViewController.h
@@ -7,6 +7,7 @@
//
#import
+#import
@interface ViewController : UIViewController
diff --git a/SpriteKitWatchFace/ViewController.m b/SpriteKitWatchFace/ViewController.m
old mode 100644
new mode 100755
index 79ede31..bbbebb2
--- a/SpriteKitWatchFace/ViewController.m
+++ b/SpriteKitWatchFace/ViewController.m
@@ -8,7 +8,8 @@
#import "ViewController.h"
-@interface ViewController ()
+@interface ViewController ()
+@property (weak, nonatomic) IBOutlet UILabel *themeLabel;
@end
@@ -17,6 +18,32 @@ @implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
+ if ([WCSession isSupported]) {
+ WCSession *session = [WCSession defaultSession];
+ session.delegate = self;
+ [session activateSession];
+ }
+
+
+
+}
+
+- (void)sendNewTheme {
+ NSString *counterString = [NSString stringWithFormat:@"%d", 19];
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"counterValue"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+}
+
+- (IBAction)test:(id)sender {
+ [self sendNewTheme];
}
diff --git a/SpriteKitWatchFace/WatchFaceTableViewCell.h b/SpriteKitWatchFace/WatchFaceTableViewCell.h
new file mode 100644
index 0000000..9775c30
--- /dev/null
+++ b/SpriteKitWatchFace/WatchFaceTableViewCell.h
@@ -0,0 +1,17 @@
+//
+// WatchFaceTableViewCell.h
+// SpriteKitWatchFace
+//
+// Created by Joseph Shenton on 15/10/18.
+// Copyright © 2018 Steven Troughton-Smith. All rights reserved.
+//
+
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface WatchFaceTableViewCell : UITableViewCell
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SpriteKitWatchFace/WatchFaceTableViewCell.m b/SpriteKitWatchFace/WatchFaceTableViewCell.m
new file mode 100644
index 0000000..bb21f77
--- /dev/null
+++ b/SpriteKitWatchFace/WatchFaceTableViewCell.m
@@ -0,0 +1,29 @@
+//
+// WatchFaceTableViewCell.m
+// SpriteKitWatchFace
+//
+// Created by Joseph Shenton on 15/10/18.
+// Copyright © 2018 Steven Troughton-Smith. All rights reserved.
+//
+
+#import "WatchFaceTableViewCell.h"
+
+@implementation WatchFaceTableViewCell
+
+- (void)awakeFromNib {
+ [super awakeFromNib];
+ // Initialization code
+}
+
+- (void)layoutSubviews {
+ [super layoutSubviews];
+ self.imageView.frame = CGRectMake(20,10,66,78);
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+ [super setSelected:selected animated:animated];
+
+ // Configure the view for the selected state
+}
+
+@end
diff --git a/SpriteKitWatchFace/WatchOptionsTableViewController.h b/SpriteKitWatchFace/WatchOptionsTableViewController.h
new file mode 100644
index 0000000..2b11093
--- /dev/null
+++ b/SpriteKitWatchFace/WatchOptionsTableViewController.h
@@ -0,0 +1,34 @@
+//
+// WatchOptionsTableViewController.h
+// SpriteKitWatchFace
+//
+// Created by Joseph Shenton on 15/10/18.
+// Copyright © 2018 Steven Troughton-Smith. All rights reserved.
+//
+
+#import
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface WatchOptionsTableViewController : UITableViewController {
+ NSIndexPath* watchFacePath;
+ NSIndexPath* tickMarksPath;
+ NSIndexPath* colorRegionPath;
+ NSIndexPath* numberStylePath;
+ NSIndexPath* numberTextPath;
+ NSIndexPath* complicationsPath;
+}
+
+@property (nonatomic, retain) NSIndexPath* watchFacePath;
+@property (nonatomic, retain) NSIndexPath* tickMarksPath;
+@property (nonatomic, retain) NSIndexPath* colorRegionPath;
+@property (nonatomic, retain) NSIndexPath* numberStylePath;
+@property (nonatomic, retain) NSIndexPath* numberTextPath;
+@property (nonatomic, retain) NSIndexPath* complicationsPath;
+
+@end
+
+static WCSession *session;
+
+NS_ASSUME_NONNULL_END
diff --git a/SpriteKitWatchFace/WatchOptionsTableViewController.m b/SpriteKitWatchFace/WatchOptionsTableViewController.m
new file mode 100644
index 0000000..61096c3
--- /dev/null
+++ b/SpriteKitWatchFace/WatchOptionsTableViewController.m
@@ -0,0 +1,326 @@
+//
+// WatchOptionsTableViewController.m
+// SpriteKitWatchFace
+//
+// Created by Joseph Shenton on 15/10/18.
+// Copyright © 2018 Steven Troughton-Smith. All rights reserved.
+//
+
+#import "WatchOptionsTableViewController.h"
+
+@interface WatchOptionsTableViewController ()
+
+@end
+
+@implementation WatchOptionsTableViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ if ([WCSession isSupported]) {
+ session = [WCSession defaultSession];
+ session.delegate = self;
+ [session activateSession];
+ }
+
+}
+
+//- (void)viewWillDisappear:(BOOL)animated {
+// [super viewWillDisappear:animated];
+// if ([WCSession isSupported]) {
+// session.delegate = self;
+// [session deactivate];
+// }
+//}
+
+#pragma mark - Table view data source
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+ [tableView deselectRowAtIndexPath:indexPath animated:YES];
+ if ([indexPath section] == 0) {
+ if(self.watchFacePath && ![self.watchFacePath isEqual:indexPath]) {
+ UITableViewCell* uncheckCell = [tableView cellForRowAtIndexPath:self.watchFacePath];
+ uncheckCell.accessoryType = UITableViewCellAccessoryNone;
+ }
+ if([self.watchFacePath isEqual:indexPath]) {
+ self.watchFacePath = indexPath;
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"faceChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ else {
+ UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+ cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ self.watchFacePath = indexPath;
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"faceChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ } else if ([indexPath section] == 1) {
+ if(self.complicationsPath && ![self.complicationsPath isEqual:indexPath]) {
+ UITableViewCell* uncheckCell = [tableView cellForRowAtIndexPath:self.complicationsPath];
+ uncheckCell.accessoryType = UITableViewCellAccessoryNone;
+ }
+ if([self.complicationsPath isEqual:indexPath]) {
+ self.complicationsPath = indexPath;
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"complicationChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ else {
+ UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+ cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ self.complicationsPath = indexPath;
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"complicationChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ } else if ([indexPath section] == 2) {
+ if(self.tickMarksPath && ![self.tickMarksPath isEqual:indexPath]) {
+ UITableViewCell* uncheckCell = [tableView cellForRowAtIndexPath:self.tickMarksPath];
+ uncheckCell.accessoryType = UITableViewCellAccessoryNone;
+ }
+ if([self.tickMarksPath isEqual:indexPath]) {
+ self.tickMarksPath = indexPath;
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"tickmarkChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ else {
+ UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+ cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ self.tickMarksPath = indexPath;
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"tickmarkChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ } else if ([indexPath section] == 3) {
+ if(self.colorRegionPath && ![self.colorRegionPath isEqual:indexPath]) {
+ UITableViewCell* uncheckCell = [tableView cellForRowAtIndexPath:self.colorRegionPath];
+ uncheckCell.accessoryType = UITableViewCellAccessoryNone;
+ }
+ if([self.colorRegionPath isEqual:indexPath]) {
+ self.colorRegionPath = indexPath;
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"colorRegionChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ else {
+ UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+ cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ self.colorRegionPath = indexPath;
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"colorRegionChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ } else if ([indexPath section] == 4) {
+ if(self.numberStylePath && ![self.numberStylePath isEqual:indexPath]) {
+ UITableViewCell* uncheckCell = [tableView cellForRowAtIndexPath:self.numberStylePath];
+ uncheckCell.accessoryType = UITableViewCellAccessoryNone;
+ }
+ if([self.numberStylePath isEqual:indexPath]) {
+ self.numberStylePath = indexPath;
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"numberStyleChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ else {
+ UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+ cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ self.numberStylePath = indexPath;
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"numberStyleChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ } else if ([indexPath section] == 5) {
+ if(self.numberTextPath && ![self.numberTextPath isEqual:indexPath]) {
+ UITableViewCell* uncheckCell = [tableView cellForRowAtIndexPath:self.numberTextPath];
+ uncheckCell.accessoryType = UITableViewCellAccessoryNone;
+ }
+ if([self.numberTextPath isEqual:indexPath]) {
+ self.numberTextPath = indexPath;
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"numberTextChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ else {
+ UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+ cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ self.numberTextPath = indexPath;
+ NSString *counterString = [NSString stringWithFormat:@"%@", cell.textLabel.text];
+ NSLog(@"%@", counterString);
+ NSDictionary *applicationData = [[NSDictionary alloc] initWithObjects:@[counterString] forKeys:@[@"numberTextChange"]];
+
+ [[WCSession defaultSession] sendMessage:applicationData
+ replyHandler:^(NSDictionary *reply) {
+ //handle reply from iPhone app here
+ }
+ errorHandler:^(NSError *error) {
+ //catch any errors here
+ }
+ ];
+ }
+ } else {
+
+ }
+}
+
+/*
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
+
+ // Configure the cell...
+
+ return cell;
+}
+*/
+
+/*
+// Override to support conditional editing of the table view.
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+ // Return NO if you do not want the specified item to be editable.
+ return YES;
+}
+*/
+
+/*
+// Override to support editing the table view.
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+ if (editingStyle == UITableViewCellEditingStyleDelete) {
+ // Delete the row from the data source
+ [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
+ } else if (editingStyle == UITableViewCellEditingStyleInsert) {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+ }
+}
+*/
+
+/*
+// Override to support rearranging the table view.
+- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
+}
+*/
+
+/*
+// Override to support conditional rearranging of the table view.
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
+ // Return NO if you do not want the item to be re-orderable.
+ return YES;
+}
+*/
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+ // Get the new view controller using [segue destinationViewController].
+ // Pass the selected object to the new view controller.
+}
+*/
+
+@end
diff --git a/SpriteKitWatchFace/main.m b/SpriteKitWatchFace/main.m
old mode 100644
new mode 100755