添加脚本真机调试Error launching remote program: failed to get the task for process xxx.
2013-05-13 23:05
906 查看
本文纯属个人见解,是对前面学习的总结,如有描述不正确的地方还请高手指正~
(对于Xcode 4.1/4.2)
export
CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados" ]; then
/Developer/iphoneentitlements401/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
(对于Xcode 4.3/4.3.2)
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados" ]; then
/Applications/Xcode.app/Contents/Developer/iphoneentitlements/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
如图所示:
每日一道理
“上下五千年,龙的看火不灭;古有愚公志,而今从头越…… ”站在新世纪的门槛上,我们的追求就是让祖国灿烂的喜悦飞扬在美好的明天……
添加Script:
添加脚本代码:
最后重新运行项目便可,如果不可Clean以后再Run。
文章结束给大家分享下程序员的一些笑话语录:
古鸽是一种搜索隐禽,在中国快绝迹了…初步的研究表明,古鸽的离去,很可能导致另一种长着熊爪,酷似古鸽,却又习性不同的猛禽类——犤毒鸟
1 错误
真机调试运行已有项目的时候:Error launching remote program: failed to get the task for process xxx.2 错误分析
这是因为证书和签名的问题。3 解决方案
3.1 添加自定义的生成后脚本
在Build Phases中添加一个Phase,右下角的Add Build Phase,然后单击Add Run Script,输入以下脚本(对于Xcode 4.1/4.2)
export
CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados" ]; then
/Developer/iphoneentitlements401/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
(对于Xcode 4.3/4.3.2)
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados" ]; then
/Applications/Xcode.app/Contents/Developer/iphoneentitlements/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
如图所示:
每日一道理
“上下五千年,龙的看火不灭;古有愚公志,而今从头越…… ”站在新世纪的门槛上,我们的追求就是让祖国灿烂的喜悦飞扬在美好的明天……
添加Script:
添加脚本代码:
3.2 禁用Xcode自动的签名操作
将工程配置中所有的Code Signing选项全部设为Don't Code Sign,如图。可能须要先点击“All”让这个选项显示出来:最后重新运行项目便可,如果不可Clean以后再Run。
4 结语
以上就是对于该问题的解决方案,希望对大家有所帮助文章结束给大家分享下程序员的一些笑话语录:
古鸽是一种搜索隐禽,在中国快绝迹了…初步的研究表明,古鸽的离去,很可能导致另一种长着熊爪,酷似古鸽,却又习性不同的猛禽类——犤毒鸟
相关文章推荐
- 真机调试Error launching remote program: failed to get the task for process xxx.
- 在真机上调试时出现“Error launching remote program: failed to get the task for process xxx"的解决方案
- ios在真机上调试时出现“Error launching remote program: failed to get the task for process xxx"解决办法(转)
- ios在真机上调试时出现“Error launching remote program: failed to get the task for process xxx"解决办法
- ios在真机上调试时出现“Error launching remote program: failed to get the task for process xxx"解决办法(转)
- 在真机上调试时出现“Error launching remote program: failed to get the task for process xxx"的解决方法
- Iphone真机调试出错:launching remote program: failed to get the task for process XXX
- Iphone真机调试出错:launching remote program: failed to get the task for process XXX
- [xcode]Error launching remote program: failed to get the task for process xxx 本人解决办法
- 解决error launching remote program failed to get the task for process
- IOS真机调试error launching remote program failed to get the task 解决方案
- Error launching remote program: failed to get the task for process
- Error launching remote program: failed to get the task for process
- error launching remote program failed to get the task for process
- Error launching remote program: failed to get the task for process 10722.The解决方法
- XCode4.5免证书真机调试解决 failed to get the task for process xxx
- xcode 真机调试 failed to get the task for process xxx
- iOS 真机调试 出现process launch failed: timed out waiting for app to launch 和 failed to get the task for 的
- 真机调试出现Could not launch "FeedMeWorms" failed to get the task for process 3118
- 关于iOS 真机不能调试process launch failed: timed out waiting for app to launch 和 failed to get the task for