Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: jonathanpenn/ui-screen-shooter
base: 9934bf3536
...
head fork: jonathanpenn/ui-screen-shooter
compare: cca8de60e3
  • 7 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Showing with 16 additions and 14 deletions.
  1. +3 −3 README.md
  2. +4 −4 automation/capture.js
  3. +9 −7 ui-screen-shooter.sh
View
6 README.md
@@ -19,13 +19,13 @@ 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 (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
-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
View
8 automation/capture.js
@@ -40,10 +40,10 @@ 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 = "iOS-4-in";
+ else model = "iOS-3.5-in";
} else {
- model = "ipad";
+ model = "iOS-iPad";
}
var orientation = "portrait";
@@ -53,5 +53,5 @@ function captureLocalizedScreenshot(name) {
preferencesValueForKey("AppleLanguages")[0];
var parts = [language, model, orientation, name];
- target.captureScreenWithName(parts.join("-"));
+ target.captureScreenWithName(parts.join("+"));
}
View
16 ui-screen-shooter.sh
@@ -27,13 +27,15 @@ set -e
destination="$1"
# The locale identifiers for the languages you want to shoot
-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"
-# 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
@@ -47,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

No commit comments for this range

Something went wrong with that request. Please try again.