diff --git a/MobileWeather.xcodeproj/project.pbxproj b/MobileWeather.xcodeproj/project.pbxproj index d678c67..23bddc8 100644 --- a/MobileWeather.xcodeproj/project.pbxproj +++ b/MobileWeather.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 6E04EAC41CF4E55900115C2F /* Forecast.m in Sources */ = {isa = PBXBuildFile; fileRef = E48C4D9219FE7CAF00A90448 /* Forecast.m */; }; 6EF1FC581CF5EF3F009BE8E9 /* SmartDeviceLinkService.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EF1FC571CF5EF3F009BE8E9 /* SmartDeviceLinkService.m */; }; AA62726DBC705DF2AB93C537 /* Pods_MobileWeather.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5FAE7A71ACD04B5A73D580C /* Pods_MobileWeather.framework */; }; + C9BE3596268A5B6D001D9EED /* ImageSize.m in Sources */ = {isa = PBXBuildFile; fileRef = C9BE3595268A5B6D001D9EED /* ImageSize.m */; }; E4059D6219FF7D4800C9996D /* WeatherDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E4059D6119FF7D4800C9996D /* WeatherDataManager.m */; }; E4059D6519FF7DA900C9996D /* WeatherService.m in Sources */ = {isa = PBXBuildFile; fileRef = E4059D6419FF7DA900C9996D /* WeatherService.m */; }; E4059D6819FF8AF500C9996D /* DarkSkyService.m in Sources */ = {isa = PBXBuildFile; fileRef = E4059D6719FF8AF500C9996D /* DarkSkyService.m */; }; @@ -76,6 +77,8 @@ 6EF1FC561CF5EF3F009BE8E9 /* SmartDeviceLinkService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartDeviceLinkService.h; sourceTree = ""; }; 6EF1FC571CF5EF3F009BE8E9 /* SmartDeviceLinkService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SmartDeviceLinkService.m; sourceTree = ""; }; C407ED364EBBDDB306D541A8 /* Pods-MobileWeather.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MobileWeather.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MobileWeather/Pods-MobileWeather.debug.xcconfig"; sourceTree = ""; }; + C9BE3594268A5B6D001D9EED /* ImageSize.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageSize.h; sourceTree = ""; }; + C9BE3595268A5B6D001D9EED /* ImageSize.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ImageSize.m; sourceTree = ""; }; E4059D6019FF7D4800C9996D /* WeatherDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeatherDataManager.h; sourceTree = ""; }; E4059D6119FF7D4800C9996D /* WeatherDataManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeatherDataManager.m; sourceTree = ""; }; E4059D6319FF7DA900C9996D /* WeatherService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeatherService.h; sourceTree = ""; }; @@ -260,6 +263,8 @@ E4059D6119FF7D4800C9996D /* WeatherDataManager.m */, E4C5B2DF1AEE24AC0056E934 /* WeatherLanguage.h */, E4C5B2E01AEE24AC0056E934 /* WeatherLanguage.m */, + C9BE3594268A5B6D001D9EED /* ImageSize.h */, + C9BE3595268A5B6D001D9EED /* ImageSize.m */, ); name = Data; sourceTree = ""; @@ -499,6 +504,7 @@ 6E04EAC31CF4E52A00115C2F /* Localization.m in Sources */, E4059D7A19FFC21500C9996D /* DarkSkyProcessor.m in Sources */, E4059D6219FF7D4800C9996D /* WeatherDataManager.m in Sources */, + C9BE3596268A5B6D001D9EED /* ImageSize.m in Sources */, E477F2611A8B79020028B59C /* PercentageNumber.m in Sources */, E44F82451A7F86D20055AD77 /* RoadConditions.m in Sources */, E48C4DA719FE840800A90448 /* ImageProcessor.m in Sources */, @@ -609,7 +615,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -652,7 +658,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -672,7 +678,7 @@ DEVELOPMENT_TEAM = NCVC2MHU7M; GCC_PRECOMPILE_PREFIX_HEADER = YES; INFOPLIST_FILE = MobileWeather/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 5.6.0; PRODUCT_BUNDLE_IDENTIFIER = com.sdl.sdlweather; @@ -695,7 +701,7 @@ DEVELOPMENT_TEAM = NCVC2MHU7M; GCC_PRECOMPILE_PREFIX_HEADER = YES; INFOPLIST_FILE = MobileWeather/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 5.6.0; PRODUCT_BUNDLE_IDENTIFIER = com.sdl.sdlweather; diff --git a/MobileWeather/ImageProcessor.h b/MobileWeather/ImageProcessor.h index e7a5bad..1990a64 100644 --- a/MobileWeather/ImageProcessor.h +++ b/MobileWeather/ImageProcessor.h @@ -6,13 +6,15 @@ // @import UIKit; +@import SmartDeviceLink; +#include "ImageSize.h" @interface ImageProcessor : NSObject + (ImageProcessor *)sharedProcessor; -- (UIImage *)imageFromConditionImage:(NSString *)conditionImage; +- (UIImage *)imageFromConditionImage:(NSString *)conditionImage imageSize:(ImageSize)imageSize; -- (NSData *)dataFromConditionImage:(NSString *)conditionImage; +- (SDLArtwork *)artworkFromConditionImage:(NSString *)conditionImage imageSize:(ImageSize)imageSize isPersistent:(BOOL)isPersistent; @end diff --git a/MobileWeather/ImageProcessor.m b/MobileWeather/ImageProcessor.m index 9882c74..ff9866f 100644 --- a/MobileWeather/ImageProcessor.m +++ b/MobileWeather/ImageProcessor.m @@ -31,21 +31,64 @@ - (instancetype)init { return self; } -- (UIImage *)imageFromConditionImage:(NSString *)conditionImage { - UIImage *image = [UIImage imageNamed:conditionImage]; - +- (UIImage *)imageFromConditionImage:(NSString *)conditionImage imageSize:(ImageSize)imageSize { + UIImage *image = [UIImage systemImageNamed:[self mw_systemImageFromAssetsImage:conditionImage] withConfiguration:[UIImageSymbolConfiguration configurationWithPointSize:[ImageSizeHelper floatForImageSize:imageSize] weight:UIImageSymbolWeightMedium]]; + if (image == nil) { image = [UIImage imageNamed:@"unknown"]; } - + return image; } -- (NSData *)dataFromConditionImage:(NSString *)conditionImage { - UIImage *image = [self imageFromConditionImage:conditionImage]; - NSData *data = UIImagePNGRepresentation(image); - - return data; +- (SDLArtwork *)artworkFromConditionImage:(NSString *)conditionImage imageSize:(ImageSize)imageSize isPersistent:(BOOL)isPersistent { + return [[SDLArtwork alloc] initWithImage:[[self imageFromConditionImage:conditionImage imageSize:imageSize] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] persistent:isPersistent asImageFormat:SDLArtworkImageFormatPNG]; +} + +- (NSString *)mw_systemImageFromAssetsImage:(NSString *)imageName { + NSString *newImageName = imageName; + if ([imageName isEqualToString:@"chancerain"]) { + newImageName = @"cloud.drizzle"; + } else if ([imageName isEqualToString:@"chancesnow"]) { + newImageName = @"cloud.snow"; + } else if ([imageName isEqualToString:@"clear-day"]) { + newImageName = @"sun.max"; + } else if ([imageName isEqualToString:@"clear-night"]) { + newImageName = @"moon"; + } else if ([imageName isEqualToString:@"cloudy"]) { + newImageName = @"smoke"; + } else if ([imageName isEqualToString:@"flurries"]) { + newImageName = @"snow"; + } else if ([imageName isEqualToString:@"fog"]) { + newImageName = @"cloud.fog"; + } else if ([imageName isEqualToString:@"hazy"]) { + newImageName = @"sun.haze"; + } else if ([imageName isEqualToString:@"partly-cloudy-day"]) { + newImageName = @"cloud.sun"; + } else if ([imageName isEqualToString:@"partly-cloudy-night"]) { + newImageName = @"cloud.moon"; + } else if ([imageName isEqualToString:@"partlycloudy"]) { + newImageName = @"cloud"; + } else if ([imageName isEqualToString:@"partlysunny"]) { + newImageName = @"cloud.sun"; + } else if ([imageName isEqualToString:@"rain"]) { + newImageName = @"cloud.rain"; + } else if ([imageName isEqualToString:@"sleet"]) { + newImageName = @"cloud.sleet"; + } else if ([imageName isEqualToString:@"snow"]) { + newImageName = @"cloud.snow"; + } else if ([imageName isEqualToString:@"sunny"]) { + newImageName = @"sun.max"; + } else if ([imageName isEqualToString:@"tstorms"]) { + newImageName = @"cloud.bolt"; + } else if ([imageName isEqualToString:@"menu-alert"]) { + newImageName = @"exclamationmark.triangle"; + } else if ([imageName isEqualToString:@"menu-day"]) { + newImageName = @"calendar"; + } else if ([imageName isEqualToString:@"menu-time"]) { + newImageName = @"clock"; + } + return newImageName; } @end diff --git a/MobileWeather/ImageSize.h b/MobileWeather/ImageSize.h new file mode 100644 index 0000000..00a5eab --- /dev/null +++ b/MobileWeather/ImageSize.h @@ -0,0 +1,20 @@ +// +// ImageSize.h +// MobileWeather +// +// Created by Frank Elias on 6/28/21. +// Copyright © 2021 Ford. All rights reserved. +// + +@import UIKit; + +typedef NS_ENUM(NSUInteger, ImageSize) { + ImageSizeLarge, + ImageSizeSmall +}; + +@interface ImageSizeHelper : NSObject + ++ (CGFloat)floatForImageSize:(ImageSize)imageSize; + +@end diff --git a/MobileWeather/ImageSize.m b/MobileWeather/ImageSize.m new file mode 100644 index 0000000..92923d5 --- /dev/null +++ b/MobileWeather/ImageSize.m @@ -0,0 +1,21 @@ +// +// ImageSize.m +// MobileWeather +// +// Created by Frank Elias on 6/28/21. +// Copyright © 2021 Ford. All rights reserved. +// + +#import "ImageSize.h" + +@implementation ImageSizeHelper + ++ (CGFloat)floatForImageSize:(ImageSize)imageSize { + if (imageSize == ImageSizeLarge) { + return 256; + } else { + return 64; + } +} + +@end diff --git a/MobileWeather/Images.xcassets/Images/Contents.json b/MobileWeather/Images.xcassets/Images/Contents.json index da4a164..73c0059 100644 --- a/MobileWeather/Images.xcassets/Images/Contents.json +++ b/MobileWeather/Images.xcassets/Images/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/MobileWeather/Images.xcassets/Images/chancerain.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/chancerain.imageset/Contents.json deleted file mode 100644 index f871dea..0000000 --- a/MobileWeather/Images.xcassets/Images/chancerain.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "chancerain.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/chancerain.imageset/chancerain.png b/MobileWeather/Images.xcassets/Images/chancerain.imageset/chancerain.png deleted file mode 100644 index edd8e4c..0000000 Binary files a/MobileWeather/Images.xcassets/Images/chancerain.imageset/chancerain.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/chancesnow.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/chancesnow.imageset/Contents.json deleted file mode 100644 index 92502af..0000000 --- a/MobileWeather/Images.xcassets/Images/chancesnow.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "chancesnow.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/chancesnow.imageset/chancesnow.png b/MobileWeather/Images.xcassets/Images/chancesnow.imageset/chancesnow.png deleted file mode 100644 index a69056b..0000000 Binary files a/MobileWeather/Images.xcassets/Images/chancesnow.imageset/chancesnow.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/clear-day.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/clear-day.imageset/Contents.json deleted file mode 100644 index 0c9b459..0000000 --- a/MobileWeather/Images.xcassets/Images/clear-day.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "clear-day.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/clear-day.imageset/clear-day.png b/MobileWeather/Images.xcassets/Images/clear-day.imageset/clear-day.png deleted file mode 100644 index 41a6f84..0000000 Binary files a/MobileWeather/Images.xcassets/Images/clear-day.imageset/clear-day.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/clear-night.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/clear-night.imageset/Contents.json deleted file mode 100644 index fd04a86..0000000 --- a/MobileWeather/Images.xcassets/Images/clear-night.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "clear-night.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/clear-night.imageset/clear-night.png b/MobileWeather/Images.xcassets/Images/clear-night.imageset/clear-night.png deleted file mode 100644 index d1252ab..0000000 Binary files a/MobileWeather/Images.xcassets/Images/clear-night.imageset/clear-night.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/cloudy.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/cloudy.imageset/Contents.json deleted file mode 100644 index 2e3c10c..0000000 --- a/MobileWeather/Images.xcassets/Images/cloudy.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "cloudy.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/cloudy.imageset/cloudy.png b/MobileWeather/Images.xcassets/Images/cloudy.imageset/cloudy.png deleted file mode 100644 index 67017f3..0000000 Binary files a/MobileWeather/Images.xcassets/Images/cloudy.imageset/cloudy.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/flurries.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/flurries.imageset/Contents.json deleted file mode 100644 index 8f226c6..0000000 --- a/MobileWeather/Images.xcassets/Images/flurries.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "flurries.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/flurries.imageset/flurries.png b/MobileWeather/Images.xcassets/Images/flurries.imageset/flurries.png deleted file mode 100644 index 854f6c4..0000000 Binary files a/MobileWeather/Images.xcassets/Images/flurries.imageset/flurries.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/fog.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/fog.imageset/Contents.json deleted file mode 100644 index 5623282..0000000 --- a/MobileWeather/Images.xcassets/Images/fog.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "fog.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/fog.imageset/fog.png b/MobileWeather/Images.xcassets/Images/fog.imageset/fog.png deleted file mode 100644 index 58edfab..0000000 Binary files a/MobileWeather/Images.xcassets/Images/fog.imageset/fog.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/hazy.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/hazy.imageset/Contents.json deleted file mode 100644 index 07611ab..0000000 --- a/MobileWeather/Images.xcassets/Images/hazy.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "hazy.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/hazy.imageset/hazy.png b/MobileWeather/Images.xcassets/Images/hazy.imageset/hazy.png deleted file mode 100644 index 0a6b2dd..0000000 Binary files a/MobileWeather/Images.xcassets/Images/hazy.imageset/hazy.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/partly-cloudy-day.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/partly-cloudy-day.imageset/Contents.json deleted file mode 100644 index 49910ae..0000000 --- a/MobileWeather/Images.xcassets/Images/partly-cloudy-day.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "partly-cloudy-day.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/partly-cloudy-day.imageset/partly-cloudy-day.png b/MobileWeather/Images.xcassets/Images/partly-cloudy-day.imageset/partly-cloudy-day.png deleted file mode 100644 index 4dc9bde..0000000 Binary files a/MobileWeather/Images.xcassets/Images/partly-cloudy-day.imageset/partly-cloudy-day.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/partly-cloudy-night.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/partly-cloudy-night.imageset/Contents.json deleted file mode 100644 index 56a2da3..0000000 --- a/MobileWeather/Images.xcassets/Images/partly-cloudy-night.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "partly-cloudy-night.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/partly-cloudy-night.imageset/partly-cloudy-night.png b/MobileWeather/Images.xcassets/Images/partly-cloudy-night.imageset/partly-cloudy-night.png deleted file mode 100644 index 459f253..0000000 Binary files a/MobileWeather/Images.xcassets/Images/partly-cloudy-night.imageset/partly-cloudy-night.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/partlycloudy.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/partlycloudy.imageset/Contents.json deleted file mode 100644 index bff0b31..0000000 --- a/MobileWeather/Images.xcassets/Images/partlycloudy.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "partlycloudy.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/partlycloudy.imageset/partlycloudy.png b/MobileWeather/Images.xcassets/Images/partlycloudy.imageset/partlycloudy.png deleted file mode 100644 index 6b06f00..0000000 Binary files a/MobileWeather/Images.xcassets/Images/partlycloudy.imageset/partlycloudy.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/partlysunny.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/partlysunny.imageset/Contents.json deleted file mode 100644 index b2a6884..0000000 --- a/MobileWeather/Images.xcassets/Images/partlysunny.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "partlysunny.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/partlysunny.imageset/partlysunny.png b/MobileWeather/Images.xcassets/Images/partlysunny.imageset/partlysunny.png deleted file mode 100644 index 4dc9bde..0000000 Binary files a/MobileWeather/Images.xcassets/Images/partlysunny.imageset/partlysunny.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/rain.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/rain.imageset/Contents.json deleted file mode 100644 index 2e460d7..0000000 --- a/MobileWeather/Images.xcassets/Images/rain.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "rain.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/rain.imageset/rain.png b/MobileWeather/Images.xcassets/Images/rain.imageset/rain.png deleted file mode 100644 index 465833b..0000000 Binary files a/MobileWeather/Images.xcassets/Images/rain.imageset/rain.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/sleet.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/sleet.imageset/Contents.json deleted file mode 100644 index bb65e18..0000000 --- a/MobileWeather/Images.xcassets/Images/sleet.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "sleet.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/sleet.imageset/sleet.png b/MobileWeather/Images.xcassets/Images/sleet.imageset/sleet.png deleted file mode 100644 index 51f8dd7..0000000 Binary files a/MobileWeather/Images.xcassets/Images/sleet.imageset/sleet.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/snow.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/snow.imageset/Contents.json deleted file mode 100644 index a7dd119..0000000 --- a/MobileWeather/Images.xcassets/Images/snow.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "snow.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/snow.imageset/snow.png b/MobileWeather/Images.xcassets/Images/snow.imageset/snow.png deleted file mode 100644 index 18cf4cc..0000000 Binary files a/MobileWeather/Images.xcassets/Images/snow.imageset/snow.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/sunny.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/sunny.imageset/Contents.json deleted file mode 100644 index 0959dcb..0000000 --- a/MobileWeather/Images.xcassets/Images/sunny.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "sunny.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/sunny.imageset/sunny.png b/MobileWeather/Images.xcassets/Images/sunny.imageset/sunny.png deleted file mode 100644 index 41a6f84..0000000 Binary files a/MobileWeather/Images.xcassets/Images/sunny.imageset/sunny.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/tstorms.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/tstorms.imageset/Contents.json deleted file mode 100644 index 8a5014c..0000000 --- a/MobileWeather/Images.xcassets/Images/tstorms.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "tstorms.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/tstorms.imageset/tstorms.png b/MobileWeather/Images.xcassets/Images/tstorms.imageset/tstorms.png deleted file mode 100644 index 1696d0a..0000000 Binary files a/MobileWeather/Images.xcassets/Images/tstorms.imageset/tstorms.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/Images/wind.imageset/Contents.json b/MobileWeather/Images.xcassets/Images/wind.imageset/Contents.json deleted file mode 100644 index a5cac8e..0000000 --- a/MobileWeather/Images.xcassets/Images/wind.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "wind.png" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MobileWeather/Images.xcassets/Images/wind.imageset/wind.png b/MobileWeather/Images.xcassets/Images/wind.imageset/wind.png deleted file mode 100644 index a1e5d0a..0000000 Binary files a/MobileWeather/Images.xcassets/Images/wind.imageset/wind.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/SDL/menu-alert.imageset/Contents.json b/MobileWeather/Images.xcassets/SDL/menu-alert.imageset/Contents.json deleted file mode 100644 index bf1ec52..0000000 --- a/MobileWeather/Images.xcassets/SDL/menu-alert.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "menu-alert.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/MobileWeather/Images.xcassets/SDL/menu-alert.imageset/menu-alert.png b/MobileWeather/Images.xcassets/SDL/menu-alert.imageset/menu-alert.png deleted file mode 100644 index 5a03887..0000000 Binary files a/MobileWeather/Images.xcassets/SDL/menu-alert.imageset/menu-alert.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/SDL/menu-day.imageset/Contents.json b/MobileWeather/Images.xcassets/SDL/menu-day.imageset/Contents.json deleted file mode 100644 index 9e23267..0000000 --- a/MobileWeather/Images.xcassets/SDL/menu-day.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "menu-day.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/MobileWeather/Images.xcassets/SDL/menu-day.imageset/menu-day.png b/MobileWeather/Images.xcassets/SDL/menu-day.imageset/menu-day.png deleted file mode 100644 index 3bb6ab4..0000000 Binary files a/MobileWeather/Images.xcassets/SDL/menu-day.imageset/menu-day.png and /dev/null differ diff --git a/MobileWeather/Images.xcassets/SDL/menu-time.imageset/Contents.json b/MobileWeather/Images.xcassets/SDL/menu-time.imageset/Contents.json deleted file mode 100644 index aa2a38d..0000000 --- a/MobileWeather/Images.xcassets/SDL/menu-time.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "menu-time.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/MobileWeather/Images.xcassets/SDL/menu-time.imageset/menu-time.png b/MobileWeather/Images.xcassets/SDL/menu-time.imageset/menu-time.png deleted file mode 100644 index 4af99fe..0000000 Binary files a/MobileWeather/Images.xcassets/SDL/menu-time.imageset/menu-time.png and /dev/null differ diff --git a/MobileWeather/Main.storyboard b/MobileWeather/Main.storyboard index 7e8666f..9afd8f0 100755 --- a/MobileWeather/Main.storyboard +++ b/MobileWeather/Main.storyboard @@ -1,13 +1,9 @@ - - - - + + - - - - + + @@ -21,7 +17,7 @@ @@ -36,24 +32,24 @@ - - + + - + - + @@ -70,15 +66,15 @@ - + - + @@ -87,6 +83,7 @@ + @@ -112,7 +109,6 @@ - diff --git a/MobileWeather/MainViewController.m b/MobileWeather/MainViewController.m index 00377c3..6cf5c8d 100755 --- a/MobileWeather/MainViewController.m +++ b/MobileWeather/MainViewController.m @@ -105,7 +105,7 @@ - (void)setWeatherConditions:(WeatherConditions *)conditions withLanguage:(Weath self.statusLabel.text = status; self.currentConditionsLabel.text = conditions.conditionTitle; - self.conditionIcon.image = [[ImageProcessor sharedProcessor] imageFromConditionImage:conditions.conditionIcon]; + self.conditionIcon.image = [[ImageProcessor sharedProcessor] imageFromConditionImage:conditions.conditionIcon imageSize:ImageSizeLarge]; self.precipitationChanceLabel.text = [conditions.precipitation stringValueForUnit:UnitPercentageDefault shortened:YES]; if ([WeatherDataManager sharedManager].unit == UnitTypeImperial) { diff --git a/SmartDeviceLinkService.m b/SmartDeviceLinkService.m index 8ae7af8..7c77560 100644 --- a/SmartDeviceLinkService.m +++ b/SmartDeviceLinkService.m @@ -282,7 +282,7 @@ - (void)presentForecastInteractionWithList:(NSArray *)forecasts ofType:(MWInfoTy } NSString *precipitationChanceString = [NSString stringWithFormat:@"Precipitation chance: %@", [forecast.precipitationChance stringValueForUnit:UnitPercentageDefault shortened:YES localization:self.localization]]; - SDLChoiceCell *cell = [[SDLChoiceCell alloc] initWithText:[dateFormatShow stringFromDate:forecast.date] secondaryText:precipitationChanceString tertiaryText:nil voiceCommands:[vrCommands copy] artwork:[SDLArtwork artworkWithImage:[[[ImageProcessor sharedProcessor] imageFromConditionImage:forecast.conditionIcon] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] asImageFormat:SDLArtworkImageFormatPNG] secondaryArtwork:nil]; + SDLChoiceCell *cell = [[SDLChoiceCell alloc] initWithText:[dateFormatShow stringFromDate:forecast.date] secondaryText:precipitationChanceString tertiaryText:nil voiceCommands:[vrCommands copy] artwork:[[ImageProcessor sharedProcessor] artworkFromConditionImage:forecast.conditionIcon imageSize:ImageSizeSmall isPersistent:NO] secondaryArtwork:nil]; [choices addObject:cell]; } @@ -331,7 +331,7 @@ - (void)sendWeatherConditions:(WeatherConditions *)conditions withSpeak:(BOOL)wi self.manager.screenManager.textField3 = [conditions.precipitation stringValueForUnit:percentageType shortened:YES localization:self.localization]; self.manager.screenManager.textField4 = [conditions.windSpeed stringValueForUnit:speedType shortened:YES localization:self.localization]; - self.manager.screenManager.primaryGraphic = [SDLArtwork artworkWithImage:[[[ImageProcessor sharedProcessor] imageFromConditionImage:conditions.conditionIcon] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] name:conditions.conditionIcon asImageFormat:SDLArtworkImageFormatPNG]; + self.manager.screenManager.primaryGraphic = [[ImageProcessor sharedProcessor] artworkFromConditionImage:conditions.conditionIcon imageSize:ImageSizeLarge isPersistent:NO]; [self.manager.screenManager endUpdatesWithCompletionHandler:nil]; @@ -430,7 +430,7 @@ - (void)showForecastAtIndex:(NSUInteger)index fromList:(NSArray *)fo [self.manager.screenManager beginUpdates]; self.manager.screenManager.softButtonObjects = [self buildListSoftButtons:infoType withIndex:index maxCount:forecasts.count]; - self.manager.screenManager.primaryGraphic = [SDLArtwork artworkWithImage:[[[ImageProcessor sharedProcessor] imageFromConditionImage:forecast.conditionIcon] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] asImageFormat:SDLArtworkImageFormatPNG]; + self.manager.screenManager.primaryGraphic = [[ImageProcessor sharedProcessor] artworkFromConditionImage:forecast.conditionIcon imageSize:ImageSizeLarge isPersistent:NO]; if (isHourlyForecast) { self.manager.screenManager.textField1 = [self.localization stringForKey:@"forecast.hourly.show.field1", dateTimeStringShow, conditionTitleShow]; @@ -605,7 +605,7 @@ - (void)repeatWeatherInformation { - (NSArray *)buildDefaultSoftButtons { __weak typeof(self) weakSelf = self; - SDLSoftButtonState *currentWeatherState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.current"] image:[[UIImage imageNamed:@"clear-day"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; + SDLSoftButtonState *currentWeatherState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.current"] artwork:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"clear-day" imageSize:ImageSizeSmall isPersistent:YES]]; SDLSoftButtonObject *currentWeatherObject = [[SDLSoftButtonObject alloc] initWithName:@"CurrentWeather" state:currentWeatherState handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) { if (!buttonPress) { return; @@ -614,7 +614,7 @@ - (void)repeatWeatherInformation { [weakSelf sendWeatherConditions:[WeatherDataManager sharedManager].weatherConditions withSpeak:YES firstWindow:NO]; }]; - SDLSoftButtonState *dailyForecastState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.daily"] image:[[UIImage imageNamed:@"menu-day"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; + SDLSoftButtonState *dailyForecastState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.daily"] artwork:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"menu-day" imageSize:ImageSizeSmall isPersistent:YES]]; SDLSoftButtonObject *dailyForecastObject = [[SDLSoftButtonObject alloc] initWithName:@"DailyForecast" state:dailyForecastState handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) { if (!buttonPress) { return; @@ -623,7 +623,7 @@ - (void)repeatWeatherInformation { [weakSelf sendForecastList:[WeatherDataManager sharedManager].dailyForecast infoType:MWInfoTypeDailyForecast withSpeak:YES]; }]; - SDLSoftButtonState *hourlyForecastState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.hourly"] image:[[UIImage imageNamed:@"menu-time"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; + SDLSoftButtonState *hourlyForecastState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.hourly"] artwork:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"menu-time" imageSize:ImageSizeSmall isPersistent:YES]]; SDLSoftButtonObject *hourlyForecastObject = [[SDLSoftButtonObject alloc] initWithName:@"HourlyForecast" state:hourlyForecastState handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) { if (!buttonPress) { return; @@ -632,7 +632,7 @@ - (void)repeatWeatherInformation { [weakSelf sendForecastList:[WeatherDataManager sharedManager].hourlyForecast infoType:MWInfoTypeHourlyForecast withSpeak:YES]; }]; - SDLSoftButtonState *alertsState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.alerts"] image:[[UIImage imageNamed:@"menu-alert"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; + SDLSoftButtonState *alertsState = [[SDLSoftButtonState alloc] initWithStateName:@"state" text:self.localization[@"sb.alerts"] artwork:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"menu-alert" imageSize:ImageSizeSmall isPersistent:YES]]; SDLSoftButtonObject *alertsObject = [[SDLSoftButtonObject alloc] initWithName:@"Alerts" state:alertsState handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) { if (!buttonPress) { return; @@ -712,19 +712,19 @@ - (void)repeatWeatherInformation { - (NSArray *)weatherMenuCells { __weak typeof(self) weakSelf = self; - SDLMenuCell *showWeatherConditions = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.current-conditions"] secondaryText:nil tertiaryText:nil icon:[[SDLArtwork alloc] initWithImage:[[UIImage imageNamed:@"clear-day"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] persistent:YES asImageFormat:SDLArtworkImageFormatPNG] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.current"],self.localization[@"vr.conditions"], self.localization[@"vr.current-conditions"], self.localization[@"vr.show-conditions"], self.localization[@"vr.show-current-conditions"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { + SDLMenuCell *showWeatherConditions = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.current-conditions"] secondaryText:nil tertiaryText:nil icon:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"clear-day" imageSize:ImageSizeSmall isPersistent:YES] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.current"],self.localization[@"vr.conditions"], self.localization[@"vr.current-conditions"], self.localization[@"vr.show-conditions"], self.localization[@"vr.show-current-conditions"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { [weakSelf sendWeatherConditions:[WeatherDataManager sharedManager].weatherConditions withSpeak:YES firstWindow:NO]; }]; - SDLMenuCell *showDailyForecast = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.daily-forecast"] secondaryText:nil tertiaryText:nil icon:[[SDLArtwork alloc] initWithImage:[[UIImage imageNamed:@"menu-day"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] persistent:YES asImageFormat:SDLArtworkImageFormatPNG] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.daily"], self.localization[@"vr.daily-forecast"], self.localization[@"vr.show-daily-forecast"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { + SDLMenuCell *showDailyForecast = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.daily-forecast"] secondaryText:nil tertiaryText:nil icon:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"menu-day" imageSize:ImageSizeSmall isPersistent:YES] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.daily"], self.localization[@"vr.daily-forecast"], self.localization[@"vr.show-daily-forecast"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { [weakSelf sendForecastList:[WeatherDataManager sharedManager].dailyForecast infoType:MWInfoTypeDailyForecast withSpeak:YES]; }]; - SDLMenuCell *showHourlyForecast = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.hourly-forecast"] secondaryText:nil tertiaryText:nil icon:[[SDLArtwork alloc] initWithImage:[[UIImage imageNamed:@"menu-time"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] persistent:YES asImageFormat:SDLArtworkImageFormatPNG] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.hourly"], self.localization[@"vr.hourly-forecast"], self.localization[@"vr.show-hourly-forecast"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { + SDLMenuCell *showHourlyForecast = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.hourly-forecast"] secondaryText:nil tertiaryText:nil icon:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"menu-time" imageSize:ImageSizeSmall isPersistent:YES] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.hourly"], self.localization[@"vr.hourly-forecast"], self.localization[@"vr.show-hourly-forecast"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { [weakSelf sendForecastList:[WeatherDataManager sharedManager].hourlyForecast infoType:MWInfoTypeHourlyForecast withSpeak:YES]; }]; - SDLMenuCell *showAlerts = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.alerts"] secondaryText:nil tertiaryText:nil icon:[[SDLArtwork alloc] initWithImage:[[UIImage imageNamed:@"menu-alert"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] persistent:YES asImageFormat:SDLArtworkImageFormatPNG] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.alerts"], self.localization[@"vr.show-alerts"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { + SDLMenuCell *showAlerts = [[SDLMenuCell alloc] initWithTitle:self.localization[@"cmd.alerts"] secondaryText:nil tertiaryText:nil icon:[[ImageProcessor sharedProcessor] artworkFromConditionImage:@"menu-alert" imageSize:ImageSizeSmall isPersistent:YES] secondaryArtwork:nil voiceCommands:@[self.localization[@"vr.alerts"], self.localization[@"vr.show-alerts"]] handler:^(SDLTriggerSource _Nonnull triggerSource) { [weakSelf sendAlertList:[WeatherDataManager sharedManager].alerts withSpeak:YES]; }];