From bb32e56ca28bb43d5d5afef737f25e4725887725 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 4 Jan 2023 04:04:03 +0300 Subject: move watchos app sources here (which should be rewritten anyway, and usable only in very specific conditions) --- .gitignore | 3 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 81 ++ .../Assets.xcassets/Contents.json | 6 + .../InfiniSolar WatchKit App/Info.plist | 31 + .../Circular.imageset/Contents.json | 28 + .../Complication.complicationset/Contents.json | 53 + .../Extra Large.imageset/Contents.json | 28 + .../Graphic Bezel.imageset/Contents.json | 18 + .../Graphic Circular.imageset/Contents.json | 18 + .../Graphic Corner.imageset/Contents.json | 18 + .../Graphic Extra Large.imageset/Contents.json | 28 + .../Contents.json | 18 + .../Modular.imageset/Contents.json | 28 + .../Utilitarian.imageset/Contents.json | 28 + .../Assets.xcassets/Contents.json | 6 + .../ComplicationController.swift | 59 ++ .../ContentView.swift | 22 + .../GenerationView.swift | 67 ++ .../InfiniSolarApp.swift | 43 + .../InfiniSolar WatchKit Extension/Info.plist | 38 + .../InverterGenerationState.swift | 114 +++ .../InverterState.swift | 78 ++ .../InverterStatus.swift | 29 + .../InverterView.swift | 75 ++ .../NotificationController.swift | 33 + .../NotificationView.swift | 20 + .../Preview Assets.xcassets/Contents.json | 6 + .../InfiniSolar WatchKit Extension/PumpState.swift | 86 ++ .../InfiniSolar WatchKit Extension/PumpView.swift | 60 ++ .../PushNotificationPayload.apns | 20 + .../InfiniSolar WatchKit Extension/RoomState.swift | 84 ++ .../InfiniSolar WatchKit Extension/RoomView.swift | 42 + .../InfiniSolar.xcodeproj/project.pbxproj | 1046 ++++++++++++++++++++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../InfiniSolarTests/InfiniSolarTests.swift | 33 + watchos/InfiniSolar/InfiniSolarTests/Info.plist | 22 + .../InfiniSolarUITests/InfiniSolarUITests.swift | 42 + watchos/InfiniSolar/InfiniSolarUITests/Info.plist | 22 + watchos/InfiniSolar/Podfile | 37 + watchos/InfiniSolar/Podfile.lock | 20 + 45 files changed, 2542 insertions(+) create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit App/Info.plist create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/ComplicationController.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/ContentView.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/GenerationView.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/InfiniSolarApp.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Info.plist create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterGenerationState.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterState.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterStatus.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterView.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationView.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpState.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpView.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/PushNotificationPayload.apns create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomState.swift create mode 100644 watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomView.swift create mode 100644 watchos/InfiniSolar/InfiniSolar.xcodeproj/project.pbxproj create mode 100644 watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 watchos/InfiniSolar/InfiniSolar.xcworkspace/contents.xcworkspacedata create mode 100644 watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 watchos/InfiniSolar/InfiniSolarTests/InfiniSolarTests.swift create mode 100644 watchos/InfiniSolar/InfiniSolarTests/Info.plist create mode 100644 watchos/InfiniSolar/InfiniSolarUITests/InfiniSolarUITests.swift create mode 100644 watchos/InfiniSolar/InfiniSolarUITests/Info.plist create mode 100644 watchos/InfiniSolar/Podfile create mode 100644 watchos/InfiniSolar/Podfile.lock diff --git a/.gitignore b/.gitignore index e665566..8e0c8b8 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ CMakeListsPrivate.txt /localwebsite/config.local.php /localwebsite/cache /localwebsite/test.php + +/watchos/InfiniSolar/Pods +xcuserdata \ No newline at end of file diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AccentColor.colorset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d06b66a --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,81 @@ +{ + "images" : [ + { + "idiom" : "watch", + "role" : "notificationCenter", + "scale" : "2x", + "size" : "24x24", + "subtype" : "38mm" + }, + { + "idiom" : "watch", + "role" : "notificationCenter", + "scale" : "2x", + "size" : "27.5x27.5", + "subtype" : "42mm" + }, + { + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "40x40", + "subtype" : "38mm" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "44x44", + "subtype" : "40mm" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "50x50", + "subtype" : "44mm" + }, + { + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "86x86", + "subtype" : "38mm" + }, + { + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "98x98", + "subtype" : "42mm" + }, + { + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "108x108", + "subtype" : "44mm" + }, + { + "idiom" : "watch-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit App/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit App/Info.plist b/watchos/InfiniSolar/InfiniSolar WatchKit App/Info.plist new file mode 100644 index 0000000..99e27a0 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit App/Info.plist @@ -0,0 +1,31 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + InfiniSolar WatchKit App + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKWatchKitApp + + + diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json new file mode 100644 index 0000000..ed7de25 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json new file mode 100644 index 0000000..e8b3252 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json @@ -0,0 +1,53 @@ +{ + "assets" : [ + { + "filename" : "Circular.imageset", + "idiom" : "watch", + "role" : "circular" + }, + { + "filename" : "Extra Large.imageset", + "idiom" : "watch", + "role" : "extra-large" + }, + { + "filename" : "Graphic Bezel.imageset", + "idiom" : "watch", + "role" : "graphic-bezel" + }, + { + "filename" : "Graphic Circular.imageset", + "idiom" : "watch", + "role" : "graphic-circular" + }, + { + "filename" : "Graphic Corner.imageset", + "idiom" : "watch", + "role" : "graphic-corner" + }, + { + "filename" : "Graphic Extra Large.imageset", + "idiom" : "watch", + "role" : "graphic-extra-large" + }, + { + "filename" : "Graphic Large Rectangular.imageset", + "idiom" : "watch", + "role" : "graphic-large-rectangular" + }, + { + "filename" : "Modular.imageset", + "idiom" : "watch", + "role" : "modular" + }, + { + "filename" : "Utilitarian.imageset", + "idiom" : "watch", + "role" : "utilitarian" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json new file mode 100644 index 0000000..ed7de25 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json new file mode 100644 index 0000000..9685a7f --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json new file mode 100644 index 0000000..9685a7f --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json new file mode 100644 index 0000000..9685a7f --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json new file mode 100644 index 0000000..ed7de25 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json new file mode 100644 index 0000000..9685a7f --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json new file mode 100644 index 0000000..ed7de25 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json new file mode 100644 index 0000000..ed7de25 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/ComplicationController.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/ComplicationController.swift new file mode 100644 index 0000000..7538d60 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/ComplicationController.swift @@ -0,0 +1,59 @@ +// +// ComplicationController.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import ClockKit + + +class ComplicationController: NSObject, CLKComplicationDataSource { + + // MARK: - Complication Configuration + + func getComplicationDescriptors(handler: @escaping ([CLKComplicationDescriptor]) -> Void) { + let descriptors = [ + CLKComplicationDescriptor(identifier: "complication", displayName: "InfiniSolar", supportedFamilies: CLKComplicationFamily.allCases) + // Multiple complication support can be added here with more descriptors + ] + + // Call the handler with the currently supported complication descriptors + handler(descriptors) + } + + func handleSharedComplicationDescriptors(_ complicationDescriptors: [CLKComplicationDescriptor]) { + // Do any necessary work to support these newly shared complication descriptors + } + + // MARK: - Timeline Configuration + + func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) { + // Call the handler with the last entry date you can currently provide or nil if you can't support future timelines + handler(nil) + } + + func getPrivacyBehavior(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) { + // Call the handler with your desired behavior when the device is locked + handler(.showOnLockScreen) + } + + // MARK: - Timeline Population + + func getCurrentTimelineEntry(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void) { + // Call the handler with the current timeline entry + handler(nil) + } + + func getTimelineEntries(for complication: CLKComplication, after date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) { + // Call the handler with the timeline entries after the given date + handler(nil) + } + + // MARK: - Sample Templates + + func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) { + // This method will be called once per supported complication, and the results will be cached + handler(nil) + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/ContentView.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/ContentView.swift new file mode 100644 index 0000000..49be4e2 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/ContentView.swift @@ -0,0 +1,22 @@ +// +// ContentView.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 03.08.2021. +// +// +//import SwiftUI +// +//struct ContentView: View { +// var body: some View { +// MainInverterView() +// +// +// } +//} +// +//struct ContentView_Previews: PreviewProvider { +// static var previews: some View { +// ContentView() +// } +//} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/GenerationView.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/GenerationView.swift new file mode 100644 index 0000000..f9d9c5e --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/GenerationView.swift @@ -0,0 +1,67 @@ +// +// GenerationView.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 08.08.2021. +// + +import SwiftUI + +struct GenerationView: View { + @ObservedObject var state = InverterGenerationState() + + var body: some View { + VStack(alignment: .leading) { + Text("Generation") + .font(.title2) + .fontWeight(.thin) + Spacer().frame(height: 10) + + if self.state.failed == true { + Text("Error while fetching info.") + .multilineTextAlignment(.leading) + + Spacer().frame(height: 10) + + Button(action:{ + self.state.fetch() + }) { + Text("Retry") + } + } else if !self.state.done { + ProgressView().progressViewStyle(CircularProgressViewStyle()) + } else { + Text("Today: ") + + Text(String(self.state.today) + " Wh").fontWeight(.thin) + + if self.state.yesterday > 0 { + Spacer().frame(height: 5) + Text("Yesterday: ") + + Text(String(self.state.yesterday) + " Wh").fontWeight(.thin) + } + + if self.state.dayBeforeYesterday > 0 { + Spacer().frame(height: 5) + Text("The day before yesterday: ") + + Text(String(self.state.dayBeforeYesterday) + " Wh").fontWeight(.thin) + } + } + }.frame( + minWidth: 0, + maxWidth: .infinity, + minHeight: 0, + maxHeight: .infinity, + alignment: .topLeading + ).onAppear() { + self.state.fetch() + }.onDisappear() { + self.state.stop() + } + } +} + +struct GenerationView_Previews: PreviewProvider { + static var previews: some View { + GenerationView() + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InfiniSolarApp.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InfiniSolarApp.swift new file mode 100644 index 0000000..c6371b4 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InfiniSolarApp.swift @@ -0,0 +1,43 @@ +// +// InfiniSolarApp.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import SwiftUI + +@main +struct InfiniSolarApp: App { + @SceneBuilder var body: some Scene { + WindowGroup { + NavigationView { + ScrollView(.vertical) { + VStack(alignment: .leading) { + InverterView() + self.divider() + + RoomView() + self.divider() + + PumpView() + } + .frame( + minWidth: 0, + maxWidth: .infinity, + minHeight: 0, + maxHeight: .infinity, + alignment: .topLeading + ) + } + } + } + + WKNotificationScene(controller: NotificationController.self, category: "myCategory") + } + + func divider() -> some View { + return Divider() + .padding(EdgeInsets(top: 12, leading: 4, bottom: 12, trailing: 4)) + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Info.plist b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Info.plist new file mode 100644 index 0000000..916e798 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + InfiniSolar WatchKit Extension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + CLKComplicationPrincipalClass + $(PRODUCT_MODULE_NAME).ComplicationController + NSExtension + + NSExtensionAttributes + + WKAppBundleIdentifier + io.ch1p.InfiniSolar.watchkitapp + + NSExtensionPointIdentifier + com.apple.watchkit + + WKWatchOnly + + + diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterGenerationState.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterGenerationState.swift new file mode 100644 index 0000000..bbd9d4c --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterGenerationState.swift @@ -0,0 +1,114 @@ +// +// InverterGenerationState.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 08.08.2021. +// + +import Alamofire +import SwiftyJSON + +extension Date { + static var yesterday: Date { return Date().dayBefore } + static var beforeYesterday: Date { return Date().dayBefore2 } + var dayBefore: Date { + return Calendar.current.date(byAdding: .day, value: -1, to: noon)! + } + var dayBefore2: Date { + return Calendar.current.date(byAdding: .day, value: -2, to: noon)! + } + var noon: Date { + return Calendar.current.date(bySettingHour: 12, minute: 0, second: 0, of: self)! + } + var month: Int { + return Calendar.current.component(.month, from: self) + } +} + +public class InverterGenerationState: ObservableObject { + @Published var today: Int + @Published var yesterday: Int + @Published var dayBeforeYesterday: Int + @Published var failed: Bool + + var request: DataRequest? + var done: Bool + + init() { + self.request = nil + self.today = 0 + self.yesterday = 0 + self.dayBeforeYesterday = 0 + self.failed = false + self.done = false + } + + func fetch() { + let today = Date() + let yesterday = Date.yesterday + let dayBeforeYesterday = Date.beforeYesterday + + let cToday = Calendar.current.dateComponents([.day, .month, .year], from: today) + let cYday1 = Calendar.current.dateComponents([.day, .month, .year], from: yesterday) + let cYday2 = Calendar.current.dateComponents([.day, .month, .year], from: dayBeforeYesterday) + + // shit, this looks like javascript in 2005 :( + // but it's my second day using swift, please treat me easy lol + + // load today + self.getDayGenerated(arguments: [cToday.year!, cToday.month!, cToday.day!]) { wh in + self.today = wh + if cToday.month == cYday1.month { + // load yesterday + self.getDayGenerated(arguments: [cYday1.year!, cYday1.month!, cYday1.day!]) { wh in + self.yesterday = wh + if cToday.month == cYday2.month { + // load the day before yesterday + self.getDayGenerated(arguments: [cYday2.year!, cYday2.month!, cYday2.day!]) { wh in + self.dayBeforeYesterday = wh + self.done = true + } + } else { + self.done = true + } + } + } else { + self.done = true + } + } + } + + func getDayGenerated(arguments: [Int], onComplete: @escaping (Int) -> ()) { + let args = arguments.map(String.init) + .joined(separator: ",") + + self.request = AF.request("http://192.168.5.223:8380/get-day-generated/?args="+args).responseJSON { response in + self.request = nil + + switch response.result { + case .success(let value): + let json = JSON(value) + onComplete(json["data"]["wh"].int ?? 0) + + case .failure(let error): + switch (error) { + case .explicitlyCancelled: + print("InverterGenerationState: request has been canceled") + break + + default: + print("InverterGenerationState: oops, something failed") + print(error) + self.failed = true + } + } + } + } + + func stop() { + if self.request != nil { + self.request?.cancel() + self.request = nil + } + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterState.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterState.swift new file mode 100644 index 0000000..cd6d5fa --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterState.swift @@ -0,0 +1,78 @@ +// +// InverterStatusFetcher.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import Alamofire +import SwiftyJSON + +public class InverterState: ObservableObject { + @Published var status: InverterStatus + @Published var fetchError: Bool = false + + var timer: Timer? + var request: DataRequest? + + func startFetching() { + if self.timer != nil { + self.stopFetching() + } + + self.timer = Timer.scheduledTimer(timeInterval: 1, + target: self, + selector: #selector(fetchStatus), + userInfo: nil, + repeats: true) +// self.timer?.fire() + } + + func stopFetching() { + if self.request != nil { + self.request?.cancel() + self.request = nil + } + + self.fetchError = false + self.timer?.invalidate() + self.timer = nil + } + + @objc func fetchStatus() { + self.fetchError = false + + self.request = AF.request("http://192.168.5.223:8380/get-status/").responseJSON { + response in + switch response.result { + case .success(let value): + let json = JSON(value) + self.status.activePower = json["data"]["ac_output_active_power"]["value"].int ?? 0 + self.status.batteryVoltage = json["data"]["battery_voltage"]["value"].float ?? 0 + self.status.batteryCapacity = json["data"]["battery_capacity"]["value"].int ?? 0 + self.status.pvInputPower = json["data"]["pv1_input_power"]["value"].int ?? 0 + + case .failure(let error): + switch (error) { + case .explicitlyCancelled: + print("InverterStatusFetcher: request has been canceled") + break + + default: + self.fetchError = true + self.timer?.invalidate() + self.timer = nil + } + } + + self.request = nil + } + } + + init() { + self.fetchError = false + self.status = InverterStatus(batteryVoltage: 0, batteryCapacity: 0, activePower: 0, pvInputPower: 0) + self.timer = nil + self.request = nil + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterStatus.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterStatus.swift new file mode 100644 index 0000000..cd31eea --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterStatus.swift @@ -0,0 +1,29 @@ +// +// InverterStatus.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import Foundation + +struct InverterStatus: Hashable { + public var batteryVoltage: Float + public var batteryCapacity: Int + public var activePower: Int + public var pvInputPower: Int + + init(batteryVoltage: Float, batteryCapacity: Int, activePower: Int, pvInputPower: Int) { + self.batteryVoltage = batteryVoltage + self.batteryCapacity = batteryCapacity + self.activePower = activePower + self.pvInputPower = pvInputPower + } + + func hasData() -> Bool { + return self.batteryVoltage != 0 + || self.batteryCapacity != 0 + || self.activePower != 0 + || self.pvInputPower != 0 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterView.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterView.swift new file mode 100644 index 0000000..779c144 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InverterView.swift @@ -0,0 +1,75 @@ +// +// MainInverterView.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 08.08.2021. +// + +import SwiftUI + +struct InverterView: View { + @ObservedObject var state = InverterState() + @State var isPresented = false + + var body: some View { + VStack(alignment: .leading) { + Text("Inverter") + .font(.title2) + .fontWeight(.thin) + Spacer().frame(height: 10) + + // inverter data + if self.state.fetchError == true { + Text("Error while fetching status.") + .multilineTextAlignment(.leading) + + Spacer().frame(height: 10) + + Button(action:{ + self.state.startFetching() + }) { + Text("Retry") + } + // } else if !self.state.status.hasData() { + // ProgressView() + // .progressViewStyle(CircularProgressViewStyle()) + } else { + Group { + Text(String(self.state.status.batteryVoltage) + " V") + + Text(" ≈ " + String(self.state.status.batteryCapacity) + " %").fontWeight(.thin) + + Spacer().frame(height: 1) + + Text("Active load is ").fontWeight(.thin) + + Text(String(self.state.status.activePower) + " Wh") + + if self.state.status.pvInputPower > 0 { + Divider() + + Text("Consuming ").fontWeight(.thin) + + Text(String(self.state.status.pvInputPower) + " Wh") + + Text(" from panels").fontWeight(.thin) + } + + Spacer().frame(height: 15) + NavigationLink(destination: GenerationView(), isActive: $isPresented) { + Text("Generation stats") + .onTapGesture{ + self.isPresented = true + self.state.stopFetching() + } + } + } + } + } + .onAppear() { + self.state.startFetching() + } + } +} + +struct InverterView_Previews: PreviewProvider { + static var previews: some View { + InverterView() + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift new file mode 100644 index 0000000..57c4d8d --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift @@ -0,0 +1,33 @@ +// +// NotificationController.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import WatchKit +import SwiftUI +import UserNotifications + +class NotificationController: WKUserNotificationHostingController { + + override var body: NotificationView { + return NotificationView() + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + + override func didReceive(_ notification: UNNotification) { + // This method is called when a notification needs to be presented. + // Implement it if you use a dynamic notification interface. + // Populate your dynamic notification interface as quickly as possible. + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationView.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationView.swift new file mode 100644 index 0000000..0eb3a2d --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationView.swift @@ -0,0 +1,20 @@ +// +// NotificationView.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import SwiftUI + +struct NotificationView: View { + var body: some View { + Text("Hello, World!") + } +} + +struct NotificationView_Previews: PreviewProvider { + static var previews: some View { + NotificationView() + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Preview Content/Preview Assets.xcassets/Contents.json b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpState.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpState.swift new file mode 100644 index 0000000..4d4e5cc --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpState.swift @@ -0,0 +1,86 @@ +// +// PumpState.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 09.08.2021. +// + +import Alamofire +import SwiftyJSON + +public class PumpState: ObservableObject { + @Published var isEnabled: Bool + @Published var error: Bool + @Published var loading: Bool + @Published var setting: Bool + + var request: DataRequest? + + init() { + self.loading = true + self.error = false + self.isEnabled = false + self.request = nil + self.setting = false + } + + func fetch() { + self.request = AF.request("http://192.168.5.223:8382/get/").responseJSON { response in + self.loading = false + + switch response.result { + case .success(let value): + let json = JSON(value) + self.isEnabled = json["data"].string == "on" + + case .failure(let error): + switch (error) { + case .explicitlyCancelled: + break + + default: + print(error) + self.error = true + } + } + +// self.loading = false + self.request = nil + } + } + + func setState(on: Bool) { + self.setting = true + self.request = AF.request("http://192.168.5.223:8382/" + (on ? "on" : "off") + "/").responseJSON { response in + self.setting = false + + switch response.result { + case .success(_): + self.isEnabled = on + + case .failure(let error): + switch (error) { + case .explicitlyCancelled: + break + + default: + print(error) + self.error = true + } + } + + self.request = nil + } + } + + func abort() { + if self.request != nil { + self.request?.cancel() + self.request = nil + } + + self.error = false + self.loading = true + self.isEnabled = false + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpView.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpView.swift new file mode 100644 index 0000000..270996d --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PumpView.swift @@ -0,0 +1,60 @@ +// +// MainPumpView.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 09.08.2021. +// + +import SwiftUI + +struct PumpView: View { + @ObservedObject var state = PumpState() + + var body: some View { + VStack(alignment: .leading) { + Text("Water pump") + .font(.title2) + .fontWeight(.thin) + Spacer().frame(height: 10) + + if self.state.loading == true { + Text("Loading...") + .fontWeight(.thin) + } + + else if self.state.error == true { + Text("Connection error.") + } + + else { + if self.state.isEnabled == true { + Text("The pump is ").fontWeight(.thin) + + Text("turned on") + Spacer().frame(height: 10) + Button(self.state.setting ? "..." : "Turn off") { + self.state.setState(on: false) + } + } else { + Text("The pump is ").fontWeight(.thin) + + Text("turned off") + Spacer().frame(height: 10) + Button(self.state.setting ? "..." : "Turn on") { + self.state.setState(on: true) + } + } + } + } + .onAppear() { + self.state.fetch() + } + .onDisappear() { + self.state.abort() + } + } +} + +struct PumpView_Previews: PreviewProvider { + static var previews: some View { + PumpView() + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PushNotificationPayload.apns b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PushNotificationPayload.apns new file mode 100644 index 0000000..c18b00a --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/PushNotificationPayload.apns @@ -0,0 +1,20 @@ +{ + "aps": { + "alert": { + "body": "Test message", + "title": "Optional title", + "subtitle": "Optional subtitle" + }, + "category": "myCategory", + "thread-id": "5280" + }, + + "WatchKit Simulator Actions": [ + { + "title": "First Button", + "identifier": "firstButtonAction" + } + ], + + "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App." +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomState.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomState.swift new file mode 100644 index 0000000..f387b8b --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomState.swift @@ -0,0 +1,84 @@ +// +// RoomState.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 09.08.2021. +// + +import Alamofire +import SwiftyJSON + +extension Double { + /// Rounds the double to decimal places value + func rounded(toPlaces places:Int) -> Double { + let divisor = pow(10.0, Double(places)) + return (self * divisor).rounded() / divisor + } +} + + +public class RoomState: ObservableObject { + @Published var temp: Double + @Published var rh: Double + @Published var error: Bool + + var timer: Timer? + var request: DataRequest? + + init() { + self.error = false + self.timer = nil + self.request = nil + + self.temp = 0 + self.rh = 0 + } + + func start() { + if self.timer != nil { + self.stop() + } + + self.timer = Timer.scheduledTimer(timeInterval: 5, + target: self, + selector: #selector(fetch), + userInfo: nil, + repeats: true) + self.timer?.fire() + } + + func stop() { + if self.request != nil { + self.request?.cancel() + self.request = nil + } + + self.error = false + self.timer?.invalidate() + self.timer = nil + } + + @objc func fetch() { + self.request = AF.request("http://192.168.5.223:8381/read/").responseJSON { response in + self.request = nil + + switch response.result { + case .success(let value): + let j = JSON(value) + self.temp = (j["temp"].double ?? 0).rounded(toPlaces: 2) + self.rh = (j["humidity"].double ?? 0).rounded(toPlaces: 2) + + case .failure(let error): + switch (error) { + case .explicitlyCancelled: + break + + default: + self.error = true + self.timer?.invalidate() + self.timer = nil + } + } + } + } +} diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomView.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomView.swift new file mode 100644 index 0000000..8bcf6d7 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/RoomView.swift @@ -0,0 +1,42 @@ +// +// MainRoomView.swift +// InfiniSolar WatchKit Extension +// +// Created by Evgeny Zinoviev on 08.08.2021. +// + +import SwiftUI + +struct RoomView: View { + @ObservedObject var state = RoomState() + + var body: some View { + VStack(alignment: .leading) { + Text("Room") + .font(.title2) + .fontWeight(.thin) + Spacer().frame(height: 10) + + if self.state.error { + Text("Failed to fetch data from si7021d.") + } + + else { + Text("Temperature is ").fontWeight(.thin) + Text(String(self.state.temp) + " °C") + Text("Rel. humidity is ").fontWeight(.thin) + Text(String(self.state.rh) + " %") + } + } + .onAppear() { + self.state.start() + } + .onDisappear() { + self.state.stop() + } + } +} + +struct RoomView_Previews: PreviewProvider { + static var previews: some View { + RoomView() + } +} diff --git a/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.pbxproj b/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.pbxproj new file mode 100644 index 0000000..2944263 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.pbxproj @@ -0,0 +1,1046 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 0902D91926C05D6100B4535C /* GenerationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0902D91826C05D6100B4535C /* GenerationView.swift */; }; + 0902D91B26C0600800B4535C /* InverterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0902D91A26C0600800B4535C /* InverterView.swift */; }; + 0926FBC026B9CCF400258270 /* InverterState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0926FBBF26B9CCF400258270 /* InverterState.swift */; }; + 097A823726B9C33B00E8CBD0 /* InverterStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 097A823626B9C33B00E8CBD0 /* InverterStatus.swift */; }; + 09A397D526B9932A008FA5F4 /* InfiniSolar WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 09A397D426B9932A008FA5F4 /* InfiniSolar WatchKit App.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 09A397DA26B9932B008FA5F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 09A397D926B9932B008FA5F4 /* Assets.xcassets */; }; + 09A397E126B9932B008FA5F4 /* InfiniSolar WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 09A397E026B9932B008FA5F4 /* InfiniSolar WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 09A397E626B9932B008FA5F4 /* InfiniSolarApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A397E526B9932B008FA5F4 /* InfiniSolarApp.swift */; }; + 09A397EA26B9932B008FA5F4 /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A397E926B9932B008FA5F4 /* NotificationController.swift */; }; + 09A397EC26B9932B008FA5F4 /* NotificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A397EB26B9932B008FA5F4 /* NotificationView.swift */; }; + 09A397EE26B9932B008FA5F4 /* ComplicationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A397ED26B9932B008FA5F4 /* ComplicationController.swift */; }; + 09A397F026B9932B008FA5F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 09A397EF26B9932B008FA5F4 /* Assets.xcassets */; }; + 09A397F326B9932B008FA5F4 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 09A397F226B9932B008FA5F4 /* Preview Assets.xcassets */; }; + 09A397FF26B9932B008FA5F4 /* InfiniSolarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A397FE26B9932B008FA5F4 /* InfiniSolarTests.swift */; }; + 09A3980A26B9932B008FA5F4 /* InfiniSolarUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A3980926B9932B008FA5F4 /* InfiniSolarUITests.swift */; }; + 09B7EE9226C06B9A00151053 /* InverterGenerationState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09B7EE9126C06B9A00151053 /* InverterGenerationState.swift */; }; + 09B7EE9426C07AA600151053 /* RoomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09B7EE9326C07AA600151053 /* RoomView.swift */; }; + 09B7EE9626C07DC800151053 /* RoomState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09B7EE9526C07DC800151053 /* RoomState.swift */; }; + 09B7EE9826C080A700151053 /* PumpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09B7EE9726C080A700151053 /* PumpView.swift */; }; + 09B7EE9A26C0816100151053 /* PumpState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09B7EE9926C0816100151053 /* PumpState.swift */; }; + 37920A46126F658DCCC9E041 /* libPods-InfiniSolar WatchKit App.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69108F92E2798AFDC89B3E84 /* libPods-InfiniSolar WatchKit App.a */; }; + 74B2D9D231F5833587DA7703 /* libPods-InfiniSolarTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51BAECA5029DFF903F615AD6 /* libPods-InfiniSolarTests.a */; }; + 7A501193D2163834D4F7971A /* libPods-InfiniSolar-InfiniSolarUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEB068C7E7EFA0C20934FDA8 /* libPods-InfiniSolar-InfiniSolarUITests.a */; }; + 7DB8E026149DECFA0CD8CC29 /* libPods-InfiniSolar WatchKit Extension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 17ECD5CD92390150E38923D5 /* libPods-InfiniSolar WatchKit Extension.a */; }; + B4B39BE69AA203CF4E2DBB0C /* libPods-InfiniSolar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8F620F180B7151DDDE2C34F /* libPods-InfiniSolar.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 09A397D626B9932A008FA5F4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 09A397CA26B99329008FA5F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09A397D326B9932A008FA5F4; + remoteInfo = "InfiniSolar WatchKit App"; + }; + 09A397E226B9932B008FA5F4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 09A397CA26B99329008FA5F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09A397DF26B9932B008FA5F4; + remoteInfo = "InfiniSolar WatchKit Extension"; + }; + 09A397FB26B9932B008FA5F4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 09A397CA26B99329008FA5F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09A397DF26B9932B008FA5F4; + remoteInfo = "InfiniSolar WatchKit Extension"; + }; + 09A3980626B9932B008FA5F4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 09A397CA26B99329008FA5F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09A397D326B9932A008FA5F4; + remoteInfo = "InfiniSolar WatchKit App"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 09A3981126B9932B008FA5F4 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 09A397E126B9932B008FA5F4 /* InfiniSolar WatchKit Extension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 09A3981526B9932B008FA5F4 /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + 09A397D526B9932A008FA5F4 /* InfiniSolar WatchKit App.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0902D91826C05D6100B4535C /* GenerationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerationView.swift; sourceTree = ""; }; + 0902D91A26C0600800B4535C /* InverterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InverterView.swift; sourceTree = ""; }; + 0926FBBF26B9CCF400258270 /* InverterState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InverterState.swift; sourceTree = ""; }; + 097A823626B9C33B00E8CBD0 /* InverterStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InverterStatus.swift; sourceTree = ""; }; + 09A397D026B9932A008FA5F4 /* InfiniSolar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InfiniSolar.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09A397D426B9932A008FA5F4 /* InfiniSolar WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "InfiniSolar WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 09A397D926B9932B008FA5F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 09A397DB26B9932B008FA5F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 09A397E026B9932B008FA5F4 /* InfiniSolar WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "InfiniSolar WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 09A397E526B9932B008FA5F4 /* InfiniSolarApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfiniSolarApp.swift; sourceTree = ""; }; + 09A397E926B9932B008FA5F4 /* NotificationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationController.swift; sourceTree = ""; }; + 09A397EB26B9932B008FA5F4 /* NotificationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationView.swift; sourceTree = ""; }; + 09A397ED26B9932B008FA5F4 /* ComplicationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComplicationController.swift; sourceTree = ""; }; + 09A397EF26B9932B008FA5F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 09A397F226B9932B008FA5F4 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 09A397F426B9932B008FA5F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 09A397F526B9932B008FA5F4 /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; + 09A397FA26B9932B008FA5F4 /* InfiniSolarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InfiniSolarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 09A397FE26B9932B008FA5F4 /* InfiniSolarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfiniSolarTests.swift; sourceTree = ""; }; + 09A3980026B9932B008FA5F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 09A3980526B9932B008FA5F4 /* InfiniSolarUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InfiniSolarUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 09A3980926B9932B008FA5F4 /* InfiniSolarUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfiniSolarUITests.swift; sourceTree = ""; }; + 09A3980B26B9932B008FA5F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 09B7EE9126C06B9A00151053 /* InverterGenerationState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InverterGenerationState.swift; sourceTree = ""; }; + 09B7EE9326C07AA600151053 /* RoomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomView.swift; sourceTree = ""; }; + 09B7EE9526C07DC800151053 /* RoomState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomState.swift; sourceTree = ""; }; + 09B7EE9726C080A700151053 /* PumpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PumpView.swift; sourceTree = ""; }; + 09B7EE9926C0816100151053 /* PumpState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PumpState.swift; sourceTree = ""; }; + 17ECD5CD92390150E38923D5 /* libPods-InfiniSolar WatchKit Extension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InfiniSolar WatchKit Extension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1F8FDC87E75553B5F63E8CDD /* Pods-InfiniSolar WatchKit App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar WatchKit App.debug.xcconfig"; path = "Target Support Files/Pods-InfiniSolar WatchKit App/Pods-InfiniSolar WatchKit App.debug.xcconfig"; sourceTree = ""; }; + 51BAECA5029DFF903F615AD6 /* libPods-InfiniSolarTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InfiniSolarTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5AF182901E117EC848223549 /* Pods-InfiniSolarTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolarTests.release.xcconfig"; path = "Target Support Files/Pods-InfiniSolarTests/Pods-InfiniSolarTests.release.xcconfig"; sourceTree = ""; }; + 66D1B49C439D66B7CC83B844 /* Pods-InfiniSolarTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolarTests.debug.xcconfig"; path = "Target Support Files/Pods-InfiniSolarTests/Pods-InfiniSolarTests.debug.xcconfig"; sourceTree = ""; }; + 69108F92E2798AFDC89B3E84 /* libPods-InfiniSolar WatchKit App.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InfiniSolar WatchKit App.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 77EA508CE2EC543A1BD66C12 /* Pods-InfiniSolar-InfiniSolarUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar-InfiniSolarUITests.release.xcconfig"; path = "Target Support Files/Pods-InfiniSolar-InfiniSolarUITests/Pods-InfiniSolar-InfiniSolarUITests.release.xcconfig"; sourceTree = ""; }; + 7999FF5D198D8AC8F58E2512 /* Pods-InfiniSolar.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar.release.xcconfig"; path = "Target Support Files/Pods-InfiniSolar/Pods-InfiniSolar.release.xcconfig"; sourceTree = ""; }; + 7DFB5B6EDB85E029D8A394D2 /* Pods-InfiniSolar-InfiniSolarUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar-InfiniSolarUITests.debug.xcconfig"; path = "Target Support Files/Pods-InfiniSolar-InfiniSolarUITests/Pods-InfiniSolar-InfiniSolarUITests.debug.xcconfig"; sourceTree = ""; }; + 87898170617B69EDFD754E8D /* Pods-InfiniSolar WatchKit App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar WatchKit App.release.xcconfig"; path = "Target Support Files/Pods-InfiniSolar WatchKit App/Pods-InfiniSolar WatchKit App.release.xcconfig"; sourceTree = ""; }; + A8F620F180B7151DDDE2C34F /* libPods-InfiniSolar.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InfiniSolar.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + BEB068C7E7EFA0C20934FDA8 /* libPods-InfiniSolar-InfiniSolarUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InfiniSolar-InfiniSolarUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + C59C7EDA2DB8E0FEF9BAA170 /* Pods-InfiniSolar.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar.debug.xcconfig"; path = "Target Support Files/Pods-InfiniSolar/Pods-InfiniSolar.debug.xcconfig"; sourceTree = ""; }; + D07D9D2A549779C2ED76D4FC /* Pods-InfiniSolar WatchKit Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar WatchKit Extension.release.xcconfig"; path = "Target Support Files/Pods-InfiniSolar WatchKit Extension/Pods-InfiniSolar WatchKit Extension.release.xcconfig"; sourceTree = ""; }; + DAFCB6D0B50AE04B5F1823E7 /* Pods-InfiniSolar WatchKit Extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InfiniSolar WatchKit Extension.debug.xcconfig"; path = "Target Support Files/Pods-InfiniSolar WatchKit Extension/Pods-InfiniSolar WatchKit Extension.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 09A397DD26B9932B008FA5F4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7DB8E026149DECFA0CD8CC29 /* libPods-InfiniSolar WatchKit Extension.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A397F726B9932B008FA5F4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 74B2D9D231F5833587DA7703 /* libPods-InfiniSolarTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A3980226B9932B008FA5F4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7A501193D2163834D4F7971A /* libPods-InfiniSolar-InfiniSolarUITests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7E06B301F11B5B101365AE18 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 37920A46126F658DCCC9E041 /* libPods-InfiniSolar WatchKit App.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B022AE3047F3D13437E327CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B4B39BE69AA203CF4E2DBB0C /* libPods-InfiniSolar.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 09A397C926B99329008FA5F4 = { + isa = PBXGroup; + children = ( + 09A397D826B9932A008FA5F4 /* InfiniSolar WatchKit App */, + 09A397E426B9932B008FA5F4 /* InfiniSolar WatchKit Extension */, + 09A397FD26B9932B008FA5F4 /* InfiniSolarTests */, + 09A3980826B9932B008FA5F4 /* InfiniSolarUITests */, + 09A397D126B9932A008FA5F4 /* Products */, + E674DA0359E4DB81F0FC70B5 /* Pods */, + BD5BEEEE73379487F7C79FB2 /* Frameworks */, + ); + sourceTree = ""; + }; + 09A397D126B9932A008FA5F4 /* Products */ = { + isa = PBXGroup; + children = ( + 09A397D026B9932A008FA5F4 /* InfiniSolar.app */, + 09A397D426B9932A008FA5F4 /* InfiniSolar WatchKit App.app */, + 09A397E026B9932B008FA5F4 /* InfiniSolar WatchKit Extension.appex */, + 09A397FA26B9932B008FA5F4 /* InfiniSolarTests.xctest */, + 09A3980526B9932B008FA5F4 /* InfiniSolarUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 09A397D826B9932A008FA5F4 /* InfiniSolar WatchKit App */ = { + isa = PBXGroup; + children = ( + 09A397D926B9932B008FA5F4 /* Assets.xcassets */, + 09A397DB26B9932B008FA5F4 /* Info.plist */, + ); + path = "InfiniSolar WatchKit App"; + sourceTree = ""; + }; + 09A397E426B9932B008FA5F4 /* InfiniSolar WatchKit Extension */ = { + isa = PBXGroup; + children = ( + 09A397E526B9932B008FA5F4 /* InfiniSolarApp.swift */, + 09B7EE9726C080A700151053 /* PumpView.swift */, + 09B7EE9926C0816100151053 /* PumpState.swift */, + 0902D91A26C0600800B4535C /* InverterView.swift */, + 09B7EE9326C07AA600151053 /* RoomView.swift */, + 09B7EE9526C07DC800151053 /* RoomState.swift */, + 0902D91826C05D6100B4535C /* GenerationView.swift */, + 0926FBBF26B9CCF400258270 /* InverterState.swift */, + 09B7EE9126C06B9A00151053 /* InverterGenerationState.swift */, + 097A823626B9C33B00E8CBD0 /* InverterStatus.swift */, + 09A397E926B9932B008FA5F4 /* NotificationController.swift */, + 09A397EB26B9932B008FA5F4 /* NotificationView.swift */, + 09A397ED26B9932B008FA5F4 /* ComplicationController.swift */, + 09A397EF26B9932B008FA5F4 /* Assets.xcassets */, + 09A397F426B9932B008FA5F4 /* Info.plist */, + 09A397F526B9932B008FA5F4 /* PushNotificationPayload.apns */, + 09A397F126B9932B008FA5F4 /* Preview Content */, + ); + path = "InfiniSolar WatchKit Extension"; + sourceTree = ""; + }; + 09A397F126B9932B008FA5F4 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 09A397F226B9932B008FA5F4 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 09A397FD26B9932B008FA5F4 /* InfiniSolarTests */ = { + isa = PBXGroup; + children = ( + 09A397FE26B9932B008FA5F4 /* InfiniSolarTests.swift */, + 09A3980026B9932B008FA5F4 /* Info.plist */, + ); + path = InfiniSolarTests; + sourceTree = ""; + }; + 09A3980826B9932B008FA5F4 /* InfiniSolarUITests */ = { + isa = PBXGroup; + children = ( + 09A3980926B9932B008FA5F4 /* InfiniSolarUITests.swift */, + 09A3980B26B9932B008FA5F4 /* Info.plist */, + ); + path = InfiniSolarUITests; + sourceTree = ""; + }; + BD5BEEEE73379487F7C79FB2 /* Frameworks */ = { + isa = PBXGroup; + children = ( + A8F620F180B7151DDDE2C34F /* libPods-InfiniSolar.a */, + 69108F92E2798AFDC89B3E84 /* libPods-InfiniSolar WatchKit App.a */, + 17ECD5CD92390150E38923D5 /* libPods-InfiniSolar WatchKit Extension.a */, + BEB068C7E7EFA0C20934FDA8 /* libPods-InfiniSolar-InfiniSolarUITests.a */, + 51BAECA5029DFF903F615AD6 /* libPods-InfiniSolarTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + E674DA0359E4DB81F0FC70B5 /* Pods */ = { + isa = PBXGroup; + children = ( + C59C7EDA2DB8E0FEF9BAA170 /* Pods-InfiniSolar.debug.xcconfig */, + 7999FF5D198D8AC8F58E2512 /* Pods-InfiniSolar.release.xcconfig */, + 1F8FDC87E75553B5F63E8CDD /* Pods-InfiniSolar WatchKit App.debug.xcconfig */, + 87898170617B69EDFD754E8D /* Pods-InfiniSolar WatchKit App.release.xcconfig */, + DAFCB6D0B50AE04B5F1823E7 /* Pods-InfiniSolar WatchKit Extension.debug.xcconfig */, + D07D9D2A549779C2ED76D4FC /* Pods-InfiniSolar WatchKit Extension.release.xcconfig */, + 7DFB5B6EDB85E029D8A394D2 /* Pods-InfiniSolar-InfiniSolarUITests.debug.xcconfig */, + 77EA508CE2EC543A1BD66C12 /* Pods-InfiniSolar-InfiniSolarUITests.release.xcconfig */, + 66D1B49C439D66B7CC83B844 /* Pods-InfiniSolarTests.debug.xcconfig */, + 5AF182901E117EC848223549 /* Pods-InfiniSolarTests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 09A397CF26B9932A008FA5F4 /* InfiniSolar */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09A3981626B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolar" */; + buildPhases = ( + 4D97047B0DB02367D89B492D /* [CP] Check Pods Manifest.lock */, + 09A397CE26B9932A008FA5F4 /* Resources */, + 09A3981526B9932B008FA5F4 /* Embed Watch Content */, + B022AE3047F3D13437E327CD /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 09A397D726B9932A008FA5F4 /* PBXTargetDependency */, + ); + name = InfiniSolar; + productName = InfiniSolar; + productReference = 09A397D026B9932A008FA5F4 /* InfiniSolar.app */; + productType = "com.apple.product-type.application.watchapp2-container"; + }; + 09A397D326B9932A008FA5F4 /* InfiniSolar WatchKit App */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09A3981226B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolar WatchKit App" */; + buildPhases = ( + CEC8F11D4BD0F817463AF15E /* [CP] Check Pods Manifest.lock */, + 09A397D226B9932A008FA5F4 /* Resources */, + 09A3981126B9932B008FA5F4 /* Embed App Extensions */, + 7E06B301F11B5B101365AE18 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 09A397E326B9932B008FA5F4 /* PBXTargetDependency */, + ); + name = "InfiniSolar WatchKit App"; + productName = "InfiniSolar WatchKit App"; + productReference = 09A397D426B9932A008FA5F4 /* InfiniSolar WatchKit App.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + 09A397DF26B9932B008FA5F4 /* InfiniSolar WatchKit Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09A3980E26B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolar WatchKit Extension" */; + buildPhases = ( + 406CCF96EB9F62A0D64F42B9 /* [CP] Check Pods Manifest.lock */, + 09A397DC26B9932B008FA5F4 /* Sources */, + 09A397DD26B9932B008FA5F4 /* Frameworks */, + 09A397DE26B9932B008FA5F4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "InfiniSolar WatchKit Extension"; + productName = "InfiniSolar WatchKit Extension"; + productReference = 09A397E026B9932B008FA5F4 /* InfiniSolar WatchKit Extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; + 09A397F926B9932B008FA5F4 /* InfiniSolarTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09A3981926B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolarTests" */; + buildPhases = ( + 9C8D971EA933EBD78A96298C /* [CP] Check Pods Manifest.lock */, + 09A397F626B9932B008FA5F4 /* Sources */, + 09A397F726B9932B008FA5F4 /* Frameworks */, + 09A397F826B9932B008FA5F4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 09A397FC26B9932B008FA5F4 /* PBXTargetDependency */, + ); + name = InfiniSolarTests; + productName = InfiniSolarTests; + productReference = 09A397FA26B9932B008FA5F4 /* InfiniSolarTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 09A3980426B9932B008FA5F4 /* InfiniSolarUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09A3981C26B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolarUITests" */; + buildPhases = ( + A64FF527A6875F63696F6ACD /* [CP] Check Pods Manifest.lock */, + 09A3980126B9932B008FA5F4 /* Sources */, + 09A3980226B9932B008FA5F4 /* Frameworks */, + 09A3980326B9932B008FA5F4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 09A3980726B9932B008FA5F4 /* PBXTargetDependency */, + ); + name = InfiniSolarUITests; + productName = InfiniSolarUITests; + productReference = 09A3980526B9932B008FA5F4 /* InfiniSolarUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 09A397CA26B99329008FA5F4 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 09A397CF26B9932A008FA5F4 = { + CreatedOnToolsVersion = 12.5.1; + }; + 09A397D326B9932A008FA5F4 = { + CreatedOnToolsVersion = 12.5.1; + }; + 09A397DF26B9932B008FA5F4 = { + CreatedOnToolsVersion = 12.5.1; + }; + 09A397F926B9932B008FA5F4 = { + CreatedOnToolsVersion = 12.5.1; + TestTargetID = 09A397DF26B9932B008FA5F4; + }; + 09A3980426B9932B008FA5F4 = { + CreatedOnToolsVersion = 12.5.1; + TestTargetID = 09A397D326B9932A008FA5F4; + }; + }; + }; + buildConfigurationList = 09A397CD26B9932A008FA5F4 /* Build configuration list for PBXProject "InfiniSolar" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 09A397C926B99329008FA5F4; + productRefGroup = 09A397D126B9932A008FA5F4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 09A397CF26B9932A008FA5F4 /* InfiniSolar */, + 09A397D326B9932A008FA5F4 /* InfiniSolar WatchKit App */, + 09A397DF26B9932B008FA5F4 /* InfiniSolar WatchKit Extension */, + 09A397F926B9932B008FA5F4 /* InfiniSolarTests */, + 09A3980426B9932B008FA5F4 /* InfiniSolarUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 09A397CE26B9932A008FA5F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A397D226B9932A008FA5F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09A397DA26B9932B008FA5F4 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A397DE26B9932B008FA5F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09A397F326B9932B008FA5F4 /* Preview Assets.xcassets in Resources */, + 09A397F026B9932B008FA5F4 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A397F826B9932B008FA5F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A3980326B9932B008FA5F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 406CCF96EB9F62A0D64F42B9 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InfiniSolar WatchKit Extension-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 4D97047B0DB02367D89B492D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InfiniSolar-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9C8D971EA933EBD78A96298C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InfiniSolarTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + A64FF527A6875F63696F6ACD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InfiniSolar-InfiniSolarUITests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + CEC8F11D4BD0F817463AF15E /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InfiniSolar WatchKit App-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 09A397DC26B9932B008FA5F4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0902D91B26C0600800B4535C /* InverterView.swift in Sources */, + 09A397EA26B9932B008FA5F4 /* NotificationController.swift in Sources */, + 09B7EE9826C080A700151053 /* PumpView.swift in Sources */, + 0926FBC026B9CCF400258270 /* InverterState.swift in Sources */, + 09B7EE9226C06B9A00151053 /* InverterGenerationState.swift in Sources */, + 09A397EE26B9932B008FA5F4 /* ComplicationController.swift in Sources */, + 09B7EE9626C07DC800151053 /* RoomState.swift in Sources */, + 09A397E626B9932B008FA5F4 /* InfiniSolarApp.swift in Sources */, + 09B7EE9A26C0816100151053 /* PumpState.swift in Sources */, + 09B7EE9426C07AA600151053 /* RoomView.swift in Sources */, + 097A823726B9C33B00E8CBD0 /* InverterStatus.swift in Sources */, + 0902D91926C05D6100B4535C /* GenerationView.swift in Sources */, + 09A397EC26B9932B008FA5F4 /* NotificationView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A397F626B9932B008FA5F4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09A397FF26B9932B008FA5F4 /* InfiniSolarTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09A3980126B9932B008FA5F4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09A3980A26B9932B008FA5F4 /* InfiniSolarUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 09A397D726B9932A008FA5F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09A397D326B9932A008FA5F4 /* InfiniSolar WatchKit App */; + targetProxy = 09A397D626B9932A008FA5F4 /* PBXContainerItemProxy */; + }; + 09A397E326B9932B008FA5F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09A397DF26B9932B008FA5F4 /* InfiniSolar WatchKit Extension */; + targetProxy = 09A397E226B9932B008FA5F4 /* PBXContainerItemProxy */; + }; + 09A397FC26B9932B008FA5F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09A397DF26B9932B008FA5F4 /* InfiniSolar WatchKit Extension */; + targetProxy = 09A397FB26B9932B008FA5F4 /* PBXContainerItemProxy */; + }; + 09A3980726B9932B008FA5F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09A397D326B9932A008FA5F4 /* InfiniSolar WatchKit App */; + targetProxy = 09A3980626B9932B008FA5F4 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 09A3980C26B9932B008FA5F4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 09A3980D26B9932B008FA5F4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 09A3980F26B9932B008FA5F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DAFCB6D0B50AE04B5F1823E7 /* Pods-InfiniSolar WatchKit Extension.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"InfiniSolar WatchKit Extension/Preview Content\""; + DEVELOPMENT_TEAM = 7VWP63QJWL; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = "InfiniSolar WatchKit Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolar.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Debug; + }; + 09A3981026B9932B008FA5F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D07D9D2A549779C2ED76D4FC /* Pods-InfiniSolar WatchKit Extension.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"InfiniSolar WatchKit Extension/Preview Content\""; + DEVELOPMENT_TEAM = 7VWP63QJWL; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = "InfiniSolar WatchKit Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolar.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Release; + }; + 09A3981326B9932B008FA5F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1F8FDC87E75553B5F63E8CDD /* Pods-InfiniSolar WatchKit App.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7VWP63QJWL; + IBSC_MODULE = InfiniSolar_WatchKit_Extension; + INFOPLIST_FILE = "InfiniSolar WatchKit App/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolar.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Debug; + }; + 09A3981426B9932B008FA5F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 87898170617B69EDFD754E8D /* Pods-InfiniSolar WatchKit App.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7VWP63QJWL; + IBSC_MODULE = InfiniSolar_WatchKit_Extension; + INFOPLIST_FILE = "InfiniSolar WatchKit App/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolar.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Release; + }; + 09A3981726B9932B008FA5F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C59C7EDA2DB8E0FEF9BAA170 /* Pods-InfiniSolar.debug.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 7VWP63QJWL; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolar; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 09A3981826B9932B008FA5F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7999FF5D198D8AC8F58E2512 /* Pods-InfiniSolar.release.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 7VWP63QJWL; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolar; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 09A3981A26B9932B008FA5F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 66D1B49C439D66B7CC83B844 /* Pods-InfiniSolarTests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7VWP63QJWL; + INFOPLIST_FILE = InfiniSolarTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolarTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InfiniSolar WatchKit Extension.appex/InfiniSolar WatchKit Extension"; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Debug; + }; + 09A3981B26B9932B008FA5F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5AF182901E117EC848223549 /* Pods-InfiniSolarTests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7VWP63QJWL; + INFOPLIST_FILE = InfiniSolarTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolarTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InfiniSolar WatchKit Extension.appex/InfiniSolar WatchKit Extension"; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Release; + }; + 09A3981D26B9932B008FA5F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7DFB5B6EDB85E029D8A394D2 /* Pods-InfiniSolar-InfiniSolarUITests.debug.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7VWP63QJWL; + INFOPLIST_FILE = InfiniSolarUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolarUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + TEST_TARGET_NAME = "InfiniSolar WatchKit App"; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Debug; + }; + 09A3981E26B9932B008FA5F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 77EA508CE2EC543A1BD66C12 /* Pods-InfiniSolar-InfiniSolarUITests.release.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7VWP63QJWL; + INFOPLIST_FILE = InfiniSolarUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ch1p.InfiniSolarUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + TEST_TARGET_NAME = "InfiniSolar WatchKit App"; + WATCHOS_DEPLOYMENT_TARGET = 7.4; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 09A397CD26B9932A008FA5F4 /* Build configuration list for PBXProject "InfiniSolar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09A3980C26B9932B008FA5F4 /* Debug */, + 09A3980D26B9932B008FA5F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09A3980E26B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolar WatchKit Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09A3980F26B9932B008FA5F4 /* Debug */, + 09A3981026B9932B008FA5F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09A3981226B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolar WatchKit App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09A3981326B9932B008FA5F4 /* Debug */, + 09A3981426B9932B008FA5F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09A3981626B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09A3981726B9932B008FA5F4 /* Debug */, + 09A3981826B9932B008FA5F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09A3981926B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolarTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09A3981A26B9932B008FA5F4 /* Debug */, + 09A3981B26B9932B008FA5F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09A3981C26B9932B008FA5F4 /* Build configuration list for PBXNativeTarget "InfiniSolarUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09A3981D26B9932B008FA5F4 /* Debug */, + 09A3981E26B9932B008FA5F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 09A397CA26B99329008FA5F4 /* Project object */; +} diff --git a/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/watchos/InfiniSolar/InfiniSolar.xcworkspace/contents.xcworkspacedata b/watchos/InfiniSolar/InfiniSolar.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..065ecbe --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolar.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/watchos/InfiniSolar/InfiniSolarTests/InfiniSolarTests.swift b/watchos/InfiniSolar/InfiniSolarTests/InfiniSolarTests.swift new file mode 100644 index 0000000..b8e5dc0 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolarTests/InfiniSolarTests.swift @@ -0,0 +1,33 @@ +// +// InfiniSolarTests.swift +// InfiniSolarTests +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import XCTest +@testable import InfiniSolar_WatchKit_Extension + +class InfiniSolarTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/watchos/InfiniSolar/InfiniSolarTests/Info.plist b/watchos/InfiniSolar/InfiniSolarTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolarTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/watchos/InfiniSolar/InfiniSolarUITests/InfiniSolarUITests.swift b/watchos/InfiniSolar/InfiniSolarUITests/InfiniSolarUITests.swift new file mode 100644 index 0000000..958cf09 --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolarUITests/InfiniSolarUITests.swift @@ -0,0 +1,42 @@ +// +// InfiniSolarUITests.swift +// InfiniSolarUITests +// +// Created by Evgeny Zinoviev on 03.08.2021. +// + +import XCTest + +class InfiniSolarUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/watchos/InfiniSolar/InfiniSolarUITests/Info.plist b/watchos/InfiniSolar/InfiniSolarUITests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/watchos/InfiniSolar/InfiniSolarUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/watchos/InfiniSolar/Podfile b/watchos/InfiniSolar/Podfile new file mode 100644 index 0000000..582a027 --- /dev/null +++ b/watchos/InfiniSolar/Podfile @@ -0,0 +1,37 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'InfiniSolar' do + # Comment the next line if you don't want to use dynamic frameworks + #use_frameworks! + + # Pods for InfiniSolar + + target 'InfiniSolarTests' do + inherit! :search_paths + # Pods for testing + end + + target 'InfiniSolarUITests' do + # Pods for testing + end + +end + +target 'InfiniSolar WatchKit App' do + # Comment the next line if you don't want to use dynamic frameworks + #use_frameworks! + + # Pods for InfiniSolar WatchKit App + +end + +target 'InfiniSolar WatchKit Extension' do + # Comment the next line if you don't want to use dynamic frameworks + #use_frameworks! + + # Pods for InfiniSolar WatchKit Extension + pod 'Alamofire', '~> 5.1' + pod 'SwiftyJSON', '~> 4.0' + pod 'SwiftSocket' +end diff --git a/watchos/InfiniSolar/Podfile.lock b/watchos/InfiniSolar/Podfile.lock new file mode 100644 index 0000000..576453a --- /dev/null +++ b/watchos/InfiniSolar/Podfile.lock @@ -0,0 +1,20 @@ +PODS: + - Alamofire (5.4.3) + - SwiftyJSON (4.3.0) + +DEPENDENCIES: + - Alamofire (~> 5.1) + - SwiftyJSON (~> 4.0) + +SPEC REPOS: + trunk: + - Alamofire + - SwiftyJSON + +SPEC CHECKSUMS: + Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9 + SwiftyJSON: 6faa0040f8b59dead0ee07436cbf76b73c08fd08 + +PODFILE CHECKSUM: 4af73cac3a538d18238200492e84f50cb3fe8db3 + +COCOAPODS: 1.10.2 -- cgit v1.2.3