From ce2c1b8bb1b7cc3543cc087d4433bb4acdc94fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Wed, 10 Dec 2014 19:17:43 +0100 Subject: [PATCH] [WatchKit] Also compile assets for `watch` device. --- .../template/ios-watch-extension-config.rb | 6 ++ .../AppIcon.appiconset/Contents.json | 62 +++++++++++++++++++ .../LaunchImage.launchimage/Contents.json | 24 +++++++ 3 files changed, 92 insertions(+) create mode 100644 lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/LaunchImage.launchimage/Contents.json diff --git a/lib/motion/project/template/ios-watch-extension-config.rb b/lib/motion/project/template/ios-watch-extension-config.rb index b7061a56..c1d079ae 100644 --- a/lib/motion/project/template/ios-watch-extension-config.rb +++ b/lib/motion/project/template/ios-watch-extension-config.rb @@ -148,6 +148,12 @@ EOS @extension_config.deployment_target end + # Ensure that we also compile assets with `actool` for the watch. + # + def device_family + [:iphone, :watch] + end + # @return [String] The bundle identifier of the watch application based on # the bundle identifier of the host application. # diff --git a/lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/AppIcon.appiconset/Contents.json b/lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..ee109687 --- /dev/null +++ b/lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images" : [ + { + "size" : "14.5x14.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "18x18", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29.3x29.3", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "44x44", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "42mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/LaunchImage.launchimage/Contents.json b/lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 00000000..1030b8f5 --- /dev/null +++ b/lib/motion/project/template/ios-watch-extension/files/watch_app/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "watch", + "extent" : "full-screen", + "minimum-system-version" : "8.0", + "subtype" : "38mm", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "watch", + "extent" : "full-screen", + "minimum-system-version" : "8.0", + "subtype" : "42mm", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file