diff --git a/README.md b/README.md index 579b621..6d8e78a 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,9 @@ You can configure up to four icons and they are 'cached' until you pass in a new So you don't need to do this every time your app loads, but it can't really hurt. There are two types of icons supported currently" `iconType` and `iconTemplate`. The former is a fixed list -of 'compose'/'play'/'pause'/'add'/'location'/'search'/'share' and have been provided by Apple and look great. +of +Compose/Play/Pause/Add/Location/Search/Share/Prohibit/Contact/Home/MarkLocation/Favorite/Love/Cloud/Invitation/Confirmation/Mail/Message/Date/Time/CapturePhoto/CaptureVideo/Task/TaskCompleted/Alarm/Bookmark/Shuffle/Audio/Update +and have been provided by Apple and look great. The `iconTemplate` can be used to provide your own icon. It must be a valid name of an icon template in your Assets catalog. @@ -75,18 +77,18 @@ the icon was used to launch your app. So make sure it's unique amongst your icon type: 'checkin', // optional, but can be used in the onHomeIconPressed callback title: 'Check in', // mandatory subtitle: 'Quickly check in', // optional - iconType: 'compose' // optional + iconType: 'Compose' // optional }, { type: 'share', title: 'Share', subtitle: 'Share like you care', - iconType: 'share' + iconType: 'Share' }, { type: 'search', title: 'Search', - iconType: 'search' + iconType: 'Search' }, { title: 'Show favorites', diff --git a/src/ios/app/ThreeDeeTouch.m b/src/ios/app/ThreeDeeTouch.m index 58ff172..89ee95c 100644 --- a/src/ios/app/ThreeDeeTouch.m +++ b/src/ios/app/ThreeDeeTouch.m @@ -58,13 +58,35 @@ - (void) configureQuickActions:(CDVInvokedUrlCommand *)command { } - (UIApplicationShortcutIconType) UIApplicationShortcutIconTypeFromString:(NSString*)str { - if ([str isEqualToString:@"compose"]) return UIApplicationShortcutIconTypeCompose; - else if ([str isEqualToString:@"play"]) return UIApplicationShortcutIconTypePlay; - else if ([str isEqualToString:@"pause"]) return UIApplicationShortcutIconTypePause; - else if ([str isEqualToString:@"add"]) return UIApplicationShortcutIconTypeAdd; - else if ([str isEqualToString:@"location"]) return UIApplicationShortcutIconTypeLocation; - else if ([str isEqualToString:@"search"]) return UIApplicationShortcutIconTypeSearch; - else if ([str isEqualToString:@"share"]) return UIApplicationShortcutIconTypeShare; + if ([str isEqualToString:@"Compose"]) return UIApplicationShortcutIconTypeCompose; + else if ([str isEqualToString:@"Play"]) return UIApplicationShortcutIconTypePlay; + else if ([str isEqualToString:@"Pause"]) return UIApplicationShortcutIconTypePause; + else if ([str isEqualToString:@"Add"]) return UIApplicationShortcutIconTypeAdd; + else if ([str isEqualToString:@"Location"]) return UIApplicationShortcutIconTypeLocation; + else if ([str isEqualToString:@"Search"]) return UIApplicationShortcutIconTypeSearch; + else if ([str isEqualToString:@"Share"]) return UIApplicationShortcutIconTypeShare; + else if ([str isEqualToString:@"Prohibit"]) return UIApplicationShortcutIconTypeProhibit; + else if ([str isEqualToString:@"Contact"]) return UIApplicationShortcutIconTypeContact; + else if ([str isEqualToString:@"Home"]) return UIApplicationShortcutIconTypeHome; + else if ([str isEqualToString:@"MarkLocation"]) return UIApplicationShortcutIconTypeMarkLocation; + else if ([str isEqualToString:@"Favorite"]) return UIApplicationShortcutIconTypeFavorite; + else if ([str isEqualToString:@"Love"]) return UIApplicationShortcutIconTypeLove; + else if ([str isEqualToString:@"Cloud"]) return UIApplicationShortcutIconTypeCloud; + else if ([str isEqualToString:@"Invitation"]) return UIApplicationShortcutIconTypeInvitation; + else if ([str isEqualToString:@"Confirmation"]) return UIApplicationShortcutIconTypeConfirmation; + else if ([str isEqualToString:@"Mail"]) return UIApplicationShortcutIconTypeMail; + else if ([str isEqualToString:@"Message"]) return UIApplicationShortcutIconTypeMessage; + else if ([str isEqualToString:@"Date"]) return UIApplicationShortcutIconTypeDate; + else if ([str isEqualToString:@"Time"]) return UIApplicationShortcutIconTypeTime; + else if ([str isEqualToString:@"CapturePhoto"]) return UIApplicationShortcutIconTypeCapturePhoto; + else if ([str isEqualToString:@"CaptureVideo"]) return UIApplicationShortcutIconTypeCaptureVideo; + else if ([str isEqualToString:@"Task"]) return UIApplicationShortcutIconTypeTask; + else if ([str isEqualToString:@"TaskCompleted"]) return UIApplicationShortcutIconTypeTaskCompleted; + else if ([str isEqualToString:@"Alarm"]) return UIApplicationShortcutIconTypeAlarm; + else if ([str isEqualToString:@"Bookmark"]) return UIApplicationShortcutIconTypeBookmark; + else if ([str isEqualToString:@"Shuffle"]) return UIApplicationShortcutIconTypeShuffle; + else if ([str isEqualToString:@"Audio"]) return UIApplicationShortcutIconTypeAudio; + else if ([str isEqualToString:@"Update"]) return UIApplicationShortcutIconTypeUpdate; else { NSLog(@"Invalid iconType passed to the 3D Touch plugin."); return 0;