From bac855358fd5b5bfc15a582398d90c7ee71e8179 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 7 Jan 2014 23:12:28 -0500 Subject: [PATCH 1/6] Inline locale documentation --- ui-screen-shooter.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-screen-shooter.sh b/ui-screen-shooter.sh index 87d4956..7478e3b 100755 --- a/ui-screen-shooter.sh +++ b/ui-screen-shooter.sh @@ -27,6 +27,7 @@ set -e destination="$1" # The locale identifiers for the languages you want to shoot +# see https://gist.github.com/jacobbubu/1836273 languages="en_US fr ja" # The iOS version we want to run the script against From 260b86454928692abcc75781966de2058e70a566 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 7 Jan 2014 23:15:10 -0500 Subject: [PATCH 2/6] Fixes #19 --- README.md | 4 ++-- automation/capture.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5583514..66b6324 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ To run the demonstration, type `./run_screenshooter.sh ~/Desktop/screenshots` to By default each screenshot is named like so: - en-iphone5-portrait-screen1.png + en-ipad-portrait-screen1.png -The first part is the locale identifier, the second is the device (iphone, iphone5, ipad), the third is the device orientation, and the fourth is an identifier that you choose for each screen shot when you call `captureLocalizedScreenshot()`. +The first part is the locale identifier, the second is the device (ios35, ios4, ipad), the third is the device orientation, and the fourth is an identifier that you choose for each screen shot when you call `captureLocalizedScreenshot()`. ## Usage diff --git a/automation/capture.js b/automation/capture.js index dbf472a..a804b3b 100644 --- a/automation/capture.js +++ b/automation/capture.js @@ -40,8 +40,8 @@ function captureLocalizedScreenshot(name) { var rect = target.rect(); if (model.match(/iPhone/)) { - if (rect.size.height > 480) model = "iphone5"; - else model = "iphone"; + if (rect.size.height > 480) model = "ios4in"; + else model = "ios35in"; } else { model = "ipad"; } From 6e01a6d4e0d0ef16749a203d5592438411d8ea76 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 7 Jan 2014 23:16:38 -0500 Subject: [PATCH 3/6] Add iTC upload to documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 66b6324..0a1616a 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The first part is the locale identifier, the second is the device (ios35, ios4, ## Usage -To use UI Screen Shooter, copy the files (except the Hello World sample app) next to your project files. You may need to change the "Release" build configuration to add i386 to the VALID_ARCHITECTURES for this to work. Then play with the script `automation/shoot_the_screens.js` to simulate the user interaction you want. ((CONTRIBUTORS, PLEASE HELP EXPAND THIS SECTION WITH YOUR INTEGRATION ADVICE.)) +To use UI Screen Shooter, copy the files (except the Hello World sample app) next to your project files. You may need to change the "Release" build configuration to add i386 to the VALID_ARCHITECTURES for this to work. Then play with the script `automation/shoot_the_screens.js` to simulate the user interaction you want. ((CONTRIBUTORS, PLEASE HELP EXPAND THIS SECTION WITH YOUR INTEGRATION ADVICE.)) After your screen shots are saved, see https://github.com/rhaining/itc-localized-screenshot-uploader about uploading them in batch to iTunes connect. ## How It Works From afb5b8310e2cca7b6728e3650f89fefb1249477a Mon Sep 17 00:00:00 2001 From: William Entriken Date: Wed, 8 Jan 2014 16:47:46 -0500 Subject: [PATCH 4/6] Use device names and locales compatible with iTunes connect metadata format --- README.md | 2 +- automation/capture.js | 2 +- ui-screen-shooter.sh | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0a1616a..adc41a2 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ By default each screenshot is named like so: en-ipad-portrait-screen1.png -The first part is the locale identifier, the second is the device (ios35, ios4, ipad), the third is the device orientation, and the fourth is an identifier that you choose for each screen shot when you call `captureLocalizedScreenshot()`. +The first part is the locale identifier, the second is the device (ios35in, ios4in, ipad), the third is the device orientation, and the fourth is an identifier that you choose for each screen shot when you call `captureLocalizedScreenshot()`. ## Usage diff --git a/automation/capture.js b/automation/capture.js index a804b3b..b2f4490 100644 --- a/automation/capture.js +++ b/automation/capture.js @@ -53,5 +53,5 @@ function captureLocalizedScreenshot(name) { preferencesValueForKey("AppleLanguages")[0]; var parts = [language, model, orientation, name]; - target.captureScreenWithName(parts.join("-")); + target.captureScreenWithName(parts.join("+")); } diff --git a/ui-screen-shooter.sh b/ui-screen-shooter.sh index 7478e3b..0f97810 100755 --- a/ui-screen-shooter.sh +++ b/ui-screen-shooter.sh @@ -27,8 +27,9 @@ set -e destination="$1" # The locale identifiers for the languages you want to shoot -# see https://gist.github.com/jacobbubu/1836273 -languages="en_US fr ja" +# Use the format like en-US cmn-Hans for filenames compatible with iTunes +# connect upload tool +languages="en-US cmn-Hans" # The iOS version we want to run the script against ios_version="7.0" From 61c63eb8fd5d3babf85f1c64b727014f311d0110 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Wed, 8 Jan 2014 18:14:39 -0500 Subject: [PATCH 5/6] correct device names --- README.md | 2 +- automation/capture.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index adc41a2..b5f0d3a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ By default each screenshot is named like so: en-ipad-portrait-screen1.png -The first part is the locale identifier, the second is the device (ios35in, ios4in, ipad), the third is the device orientation, and the fourth is an identifier that you choose for each screen shot when you call `captureLocalizedScreenshot()`. +The first part is the locale identifier, the second is the device (iOS-3.5-in, iOS-4-in, iOS-iPad), the third is the device orientation, and the fourth is an identifier that you choose for each screen shot when you call `captureLocalizedScreenshot()`. ## Usage diff --git a/automation/capture.js b/automation/capture.js index b2f4490..f4d4688 100644 --- a/automation/capture.js +++ b/automation/capture.js @@ -40,10 +40,10 @@ function captureLocalizedScreenshot(name) { var rect = target.rect(); if (model.match(/iPhone/)) { - if (rect.size.height > 480) model = "ios4in"; - else model = "ios35in"; + if (rect.size.height > 480) model = "iOS-4-in"; + else model = "iOS-3.5-in"; } else { - model = "ipad"; + model = "iOS-iPad"; } var orientation = "portrait"; From eb07af4dd429ab2971b83c1c4b54226d52a2be12 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Wed, 8 Jan 2014 18:31:03 -0500 Subject: [PATCH 6/6] update device names --- ui-screen-shooter.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui-screen-shooter.sh b/ui-screen-shooter.sh index 0f97810..559f5f4 100755 --- a/ui-screen-shooter.sh +++ b/ui-screen-shooter.sh @@ -34,8 +34,8 @@ languages="en-US cmn-Hans" # The iOS version we want to run the script against ios_version="7.0" -# The iOS devices we want to run, can include: iphone4 iphone5 ipad -ios_devices="iphone4 iphone5 ipad" +# The iOS devices we want to run, can include: iOS-3.5-in, iOS-4-in and/or iOS-iPad +ios_devices="iOS-3.5-in iOS-4-in iOS-iPad" function main { _check_destination @@ -49,21 +49,21 @@ function main { # We have to build and explicitly set the device family because otherwise # Instruments will always launch a universal app on the iPad simulator. - if [[ "$ios_devices" == *iphone* ]] + if [[ "$ios_devices" == *in* ]] then _xcode clean build TARGETED_DEVICE_FAMILY=1 - if [[ "$ios_devices" == *iphone4* ]] + if [[ "$ios_devices" == *3.5-in* ]] then bin/choose_sim_device "iPhone Retina (3.5-inch)" $ios_version _shoot_screens_for_all_languages fi - if [[ "$ios_devices" == *iphone5* ]] + if [[ "$ios_devices" == *4-in* ]] then bin/choose_sim_device "iPhone Retina (4-inch)" $ios_version _shoot_screens_for_all_languages fi fi - if [[ "$ios_devices" == *ipad* ]] + if [[ "$ios_devices" == *iPad* ]] then _xcode build TARGETED_DEVICE_FAMILY=2 bin/choose_sim_device "iPad Retina" $ios_version