setting for  running  app on  real machine

what is the certificate:
[ developer Certificate ]:
had this certificate, you can running app in real machine,
[ issuing Certificate ]
had this, you can put your app on AppleStore for sell.
=====================
those certificates, need pay $99/year for apple.  just only running
on real machine, do this:
=====================
1:伪造签名证书： 钥匙串访问－》证书助理－》创建证书 名字为  iPhone developer
2:设置gen_entitlements.py脚本。
mkdir /Applications/Xcode.app/Contents/Developer/iphoneentitlements
cd /Applications/Xcode.app/Contents/Developer/iphoneentitlements
curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt
mv gen_entitlements.txt gen_entitlements.py
sudo chmod 777 gen_entitlements.py
3:修改xcode配置
1》

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/D
eveloper/SDKs/iPhoneOS5.1.sdk目录下的
SDKSettings.plist文件，把CODE_SIGNING_REQUIRED和ENTITLEMENTS_REQUIRED的值改成NO
2》
Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
用XCode打开该目录下的Info.plist文件，右击--Add Row，增加两项：
PROVISIONING_PROFILE_ALLOWED 值为 NO
PROVISIONING_PROFILE_REQUIRED 值为 NO
3将上面Info.plist文件中的 "XCiPhoneOSCodeSignContext" 替换成"XCCodeSignContext"
4:修改项目属性 （每次新建项目都要执行）
1）点击项目图标，找到"BuildSettings"选项下的"Code Sign Identity"，将其值全部改为"Don't Code
Sign"
2）切换到Build Phases选项，点击右下角的Add Build Phase，然后单击Add Run Script，然后在Run
Script中输入以下脚本：
export
CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/i
PhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" =="iphoneos" ] || [ "${PLATFORM_NAME}" ==
"ipados"]; then
/Applications/Xcode.app/Contents/Developer/iphoneentitlements/gen_entitl
ements.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
＝＝＝＝＝＝＝＝＝＝＝
running ok on iPod touch4!
search key： xcode5 真机调试