/page/2
 – 

Richard Stelling & Richard Morton reboot the Objectively Speaking podcast.

Download

Another awesome resource. Print it out and pin it up next to your iOS Support Matrix.

Another awesome resource. Print it out and pin it up next to your iOS Support Matrix.

This is just wrong… plain wrong. Thanks to @ClareSutcliffe

This is just wrong… plain wrong. Thanks to @ClareSutcliffe

iPhone Hardware Roadmap (late 2011- early 2012)

  • iPhone 4 (N90A) — October 2011; iOS 5, A4 processor, 5MP camera, CDMA & GSM, 8 GB
  • iPhone 4S (N94) — October 2011; iOS 5, A5 processor, 8MP camera, CDMA & GSM, Assistant
  • iPhone 5 (N97) — October 2011-January 2012; iOS 5.2, 4” screen, CDMA & GSM, HSPA+, 128 GB, 8MP+ camera, Assistant, NFC, redesigned case

(see previous roadmap)

UPDATE: Some confusion over the model numbers. It should be as accurate as I can make it now.

UPDATED: Apple Hardware Roadmap (2011-2012)

  • iPhone 4S — September/October 2011; A5 processor, 8MP camera
  • iPhone 5 — September/October 2011; 4” screen, 128 GB, 8MP camera, NFC, redesigned case
  • iPod 5G — September - December 2011; A5 processor, 8MP camera, 128 GB, 3G
  • iPad 3 — October 20011 - January 2012; A5 processor, 256 GB, 2048x1536 display

(see previous roadmap)

Adding an Xcode Build Rule to compress PNGs

Reposted from an answer on StackOverflow

Images in an iOS App can make up the majority of it size. This is especially true if it is a Universal App requiring it to have all image in triplicate (iPhone Standard, iPhone Retina iPad).

The best type of image to use in an iOS App is a PNG. When your designer created these images in Photoshop they are saved with a lot of meta data that can be discarded.

However you don’t want to loose all that data completely as it’s useful to designers if they need to alter the image.

PNGOUT Optimisation

There are several tools for optimising PNG files, but pngout seems to be the best option.

  1. Download the Mac Version of pngout.
  2. Copy the binary command-line application pngout to a directory with in your project. Adding the binary to the project directory makes sure is is available to anyone building the project on any system.

Creating a Build Rule (Xcode 4)

Build rules are Target specific, so if you have more than one target you must copy the rule into each.

  1. Add DEBUG and DISTRIBUTION macros to your build configurations. Optimising the PNGs is quite processor intense and as such you only want to do it on distribution builds. Pre-processor macros As you can see amongst others I have added DEBUG_BUILD=1 and DISTRIBUTION_BUILD=1.

  2. Add a build rule for PNG files. A build rule simply processes a specific file (and/or) file type during the build process. The power of this is rules can be chained together. Build Rule - Xcode 4

  3. Click the “Add Rule” button;

    • Set Process to “Source files with names matching” and its value *.png.
    • Set Using to “Custom Script”

Paste this code into the script box

echo "----------------------------------------------------------------" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
echo "${INPUT_FILE_PATH}" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
echo "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
echo ${GCC_PREPROCESSOR_DEFINITIONS} >> "${DERIVED_FILES_DIR}/pngout-log.txt"

BUILD=`echo ${GCC_PREPROCESSOR_DEFINITIONS} | grep -o DISTRIBUTION_BUILD`

echo $BUILD >> "${DERIVED_FILES_DIR}/pngout-log.txt"

if [ "${BUILD}" == "DISTRIBUTION_BUILD" ]; then
echo "COMPRESS" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
"${PROJECT_DIR}/build-process/pngout" -y -q -force "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}"
else
echo "COPY" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
cp -f "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}"
fi

echo "...done." >> "${DERIVED_FILES_DIR}/pngout-log.txt"

There are several environment variables that are of note:

  • ${INPUT_FILE_PATH} — full path to the image file
  • ${INPUT_FILE_NAME} — image file name (with extension)
  • ${DERIVED_FILES_DIR} — where Xcode stores build files etc
  • ${GCC_PREPROCESSOR_DEFINITIONS} — the macros you set above

The work is done on this line:

    "${PROJECT_DIR}/build-process/pngout" -y -q -force "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}"

${PROJECT_DIR} is the full path to your project, the -y overwrites existing files, -q limits pngouts output and -force prevents pngout from exiting with status of 2 when a file can’t be optimised and causing Xcode report build errors.

This script simply tests the ${GCC_PREPROCESSOR_DEFINITIONS} to see if it a DISTRIBUTION_BUILD if so it uses pngout to optimise the file, otherwise it copies it to the ${DERIVED_FILES_DIR} so Xcode can continue to process it.

Finally, don’t forget to add ${DERIVED_FILES_DIR}/${INPUT_FILE_NAME} to the “Output files” list this is how Xcode knows how to find the files you have processed.

The Retina iMac

Apple TV has long been a “hobby” project for Apple. That’s weird because Apple don’t do hobby or beta products. They’d prefer to work on something in secret for a year than release something incomplete.

Now, Apple TVs don’t sell all that well on there own. Apple displays are, well aesthetically pleasing nothing to write home about.

But, a Retina display would give Apple a distinct advantage. Lion is already equipped for resolution independents.

I discussed the possibility of some type of Retina Mac with Mr Dalrymple last week. His considered opinion,

Too expensive

And I have to agree.

But, persistent rumours of an Apple tv set, got me thinking.

  • Retina iMacs for bedrooms and dorms — AirPlay equipped, controlled by your iPhone and iPad. Also doubles as a word processor.
  • Apple Retina TV (set) for living rooms. A 27”-32” Thunderbolt display with Apple TV built in. Add the ability to run Apps (iPad Apps) and you’ve got yourself a console challenger. Oh, did I mention the built in FaceTime camera?

I’m not expecting it this Christmas, but maybe 2012.

Over The Air (Taken with instagram)

Over The Air (Taken with instagram)

Another awesome resource. Print it out and pin it up next to your iOS Support Matrix.

Another awesome resource. Print it out and pin it up next to your iOS Support Matrix.

This is just wrong… plain wrong. Thanks to @ClareSutcliffe

This is just wrong… plain wrong. Thanks to @ClareSutcliffe

iPhone Hardware Roadmap (late 2011- early 2012)

  • iPhone 4 (N90A) — October 2011; iOS 5, A4 processor, 5MP camera, CDMA & GSM, 8 GB
  • iPhone 4S (N94) — October 2011; iOS 5, A5 processor, 8MP camera, CDMA & GSM, Assistant
  • iPhone 5 (N97) — October 2011-January 2012; iOS 5.2, 4” screen, CDMA & GSM, HSPA+, 128 GB, 8MP+ camera, Assistant, NFC, redesigned case

(see previous roadmap)

UPDATE: Some confusion over the model numbers. It should be as accurate as I can make it now.

UPDATED: Apple Hardware Roadmap (2011-2012)

  • iPhone 4S — September/October 2011; A5 processor, 8MP camera
  • iPhone 5 — September/October 2011; 4” screen, 128 GB, 8MP camera, NFC, redesigned case
  • iPod 5G — September - December 2011; A5 processor, 8MP camera, 128 GB, 3G
  • iPad 3 — October 20011 - January 2012; A5 processor, 256 GB, 2048x1536 display

(see previous roadmap)

Adding an Xcode Build Rule to compress PNGs

Reposted from an answer on StackOverflow

Images in an iOS App can make up the majority of it size. This is especially true if it is a Universal App requiring it to have all image in triplicate (iPhone Standard, iPhone Retina iPad).

The best type of image to use in an iOS App is a PNG. When your designer created these images in Photoshop they are saved with a lot of meta data that can be discarded.

However you don’t want to loose all that data completely as it’s useful to designers if they need to alter the image.

PNGOUT Optimisation

There are several tools for optimising PNG files, but pngout seems to be the best option.

  1. Download the Mac Version of pngout.
  2. Copy the binary command-line application pngout to a directory with in your project. Adding the binary to the project directory makes sure is is available to anyone building the project on any system.

Creating a Build Rule (Xcode 4)

Build rules are Target specific, so if you have more than one target you must copy the rule into each.

  1. Add DEBUG and DISTRIBUTION macros to your build configurations. Optimising the PNGs is quite processor intense and as such you only want to do it on distribution builds. Pre-processor macros As you can see amongst others I have added DEBUG_BUILD=1 and DISTRIBUTION_BUILD=1.

  2. Add a build rule for PNG files. A build rule simply processes a specific file (and/or) file type during the build process. The power of this is rules can be chained together. Build Rule - Xcode 4

  3. Click the “Add Rule” button;

    • Set Process to “Source files with names matching” and its value *.png.
    • Set Using to “Custom Script”

Paste this code into the script box

echo "----------------------------------------------------------------" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
echo "${INPUT_FILE_PATH}" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
echo "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
echo ${GCC_PREPROCESSOR_DEFINITIONS} >> "${DERIVED_FILES_DIR}/pngout-log.txt"

BUILD=`echo ${GCC_PREPROCESSOR_DEFINITIONS} | grep -o DISTRIBUTION_BUILD`

echo $BUILD >> "${DERIVED_FILES_DIR}/pngout-log.txt"

if [ "${BUILD}" == "DISTRIBUTION_BUILD" ]; then
echo "COMPRESS" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
"${PROJECT_DIR}/build-process/pngout" -y -q -force "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}"
else
echo "COPY" >> "${DERIVED_FILES_DIR}/pngout-log.txt"
cp -f "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}"
fi

echo "...done." >> "${DERIVED_FILES_DIR}/pngout-log.txt"

There are several environment variables that are of note:

  • ${INPUT_FILE_PATH} — full path to the image file
  • ${INPUT_FILE_NAME} — image file name (with extension)
  • ${DERIVED_FILES_DIR} — where Xcode stores build files etc
  • ${GCC_PREPROCESSOR_DEFINITIONS} — the macros you set above

The work is done on this line:

    "${PROJECT_DIR}/build-process/pngout" -y -q -force "${INPUT_FILE_PATH}" "${DERIVED_FILES_DIR}/${INPUT_FILE_NAME}"

${PROJECT_DIR} is the full path to your project, the -y overwrites existing files, -q limits pngouts output and -force prevents pngout from exiting with status of 2 when a file can’t be optimised and causing Xcode report build errors.

This script simply tests the ${GCC_PREPROCESSOR_DEFINITIONS} to see if it a DISTRIBUTION_BUILD if so it uses pngout to optimise the file, otherwise it copies it to the ${DERIVED_FILES_DIR} so Xcode can continue to process it.

Finally, don’t forget to add ${DERIVED_FILES_DIR}/${INPUT_FILE_NAME} to the “Output files” list this is how Xcode knows how to find the files you have processed.

The Retina iMac

Apple TV has long been a “hobby” project for Apple. That’s weird because Apple don’t do hobby or beta products. They’d prefer to work on something in secret for a year than release something incomplete.

Now, Apple TVs don’t sell all that well on there own. Apple displays are, well aesthetically pleasing nothing to write home about.

But, a Retina display would give Apple a distinct advantage. Lion is already equipped for resolution independents.

I discussed the possibility of some type of Retina Mac with Mr Dalrymple last week. His considered opinion,

Too expensive

And I have to agree.

But, persistent rumours of an Apple tv set, got me thinking.

  • Retina iMacs for bedrooms and dorms — AirPlay equipped, controlled by your iPhone and iPad. Also doubles as a word processor.
  • Apple Retina TV (set) for living rooms. A 27”-32” Thunderbolt display with Apple TV built in. Add the ability to run Apps (iPad Apps) and you’ve got yourself a console challenger. Oh, did I mention the built in FaceTime camera?

I’m not expecting it this Christmas, but maybe 2012.

Over The Air (Taken with instagram)

Over The Air (Taken with instagram)

Richard Stelling & Richard Morton reboot the Objectively Speaking podcast.

iPhone Hardware Roadmap (late 2011- early 2012)
UPDATED: Apple Hardware Roadmap (2011-2012)
Adding an Xcode Build Rule to compress PNGs
The Retina iMac

About:

If it's more than 140 bytes you'll find it here.

Following: