Search This Blog

Monday, July 5, 2010

How to compile and upload iPhone app for jailbroken iPhone device 3GS iOS 4.0 in Xcode 3.2.3

XCode is getting tricky to prevent from compiling and debuging without paying $99. Definitely, it's not expensive, but it is not cheap for whom program just for fun or students.

Thanks to Alexwhittemore.com, it is still okay to compile and run on your iphone with XCode without paying $99. In addition, to debug I would like to strongly suggest that you make keychain with a name 'iPhone Developer' which is default name XCode provides.

If you want to debug without paying $99, there is one thing to make you sick. You have to make extra build phase whenever you make project. Go to the menu Project > New Build Phase > New Run Script Build Phase. In the window, copy/paste this for 'iPhone Developer':

export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Developer/iphoneentitlements312/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi

f you made a key for 'iPhone developer', you can use following:

export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Developer/iphoneentitlements312/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi

For more information:

No comments:

Post a Comment

Blog Archive