Tagged: Xcode RSS Toggle Comment Threads | Keyboard Shortcuts

  • Ullrich 18:01 on 23. November 2009 Permalink | Reply
    Tags: , Xcode   

    Optimize your Autorelease pools with the following environment variables

    NSAutoreleaseHighWaterMark
    Default: 0
    If set to X, autorelease pools will print a message if more than X objects accumulate in the pool

    NSAutoreleaseHighWaterResolution
    Default: 0
    If set to Y, a message is logged for every Y objects that accumulate in the pool beyond the high-water mark (X)

     
  • Ullrich 16:56 on 23. November 2009 Permalink | Reply
    Tags: Xcode   

    Comes in handy… A build Script that wraps up the app and builds an ipa archive from it.
    You should put it in a separate target (I use “Aggregate”) that depends on your main target. Name the Target “myProduct.ipa”:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    
    if ( [ ${CONFIGURATION} != "Beta" ] || [ ${EFFECTIVE_PLATFORM_NAME} != "-iphoneos" ] ) ; then
      echo "error: Not building ipa. Select Beta configuration and Device as platform"
      exit 0
    fi
     
    export TMP_PATH=/tmp/ipa.$RANDOM
     
    mkdir -p "$TMP_PATH/Payload"
     
    # copy app
    cp -R "${BUILD_DIR}/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${CONTENTS_FOLDER_PATH}" "$TMP_PATH/Payload/${CONTENTS_FOLDER_PATH}"
     
    # copy artwork
    if [ -e "${PROJECT_DIR}/iTunesArtwork" ] ; then
      cp "${PROJECT_DIR}/iTunesArtwork" "$TMP_PATH"
    elif [ -e "${PROJECT_DIR}/Resources/iTunesArtwork" ] ; then
      cp "${PROJECT_DIR}/Resources/iTunesArtwork" "$TMP_PATH"
    fi
     
    pushd $TMP_PATH
    if test -e iTunesArtwork; then
    	zip -r "${PRODUCT_NAME}.zip" Payload/ iTunesArtwork
    else
    	zip -r "${PRODUCT_NAME}.zip" Payload/
    fi
    popd
     
    rm -f "${BUILD_DIR}/${PRODUCT_NAME}"
    mv "$TMP_PATH/${PRODUCT_NAME}.zip" "${BUILD_DIR}/${PRODUCT_NAME}"
     
    rm -rf "$TMP_PATH"
     
  • Ullrich 13:14 on 20. November 2009 Permalink | Reply
    Tags: Xcode   

    Use conditional build settings. 

    For a couple of build settings the use of conditions come quite handy.

    To create a condition select the specific build setting and choose “Add Build Setting Condition” from the menu on the bottom left of your build settings dialog.

    create build settings condition

    A good example is the setting for the Thumb instruction set on ARM processors. This brings performance increase on ARM7 but not on ARM6. Thats why you want to have it switched on only on ARM7 architectures.

    Thumb build setting with conditions

     
  • Ullrich 12:10 on 20. November 2009 Permalink | Reply
    Tags: Xcode   

    If you got iPhone OS SDK 3.1.2 installed but want to compile for 3.0 don’t select 3.0 as base SDK.
    Rather always select the most current version as base SDK and select the minimal version you want to be compatible with as your “Deployment Target”.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel