Error launching remote program: failed to get the task for process

Error launching remote program: failed to get the task for process


该错误出现于真机调试时

机器为已越狱的iPad

问题出现原因

1 开发者证书没有选择正确,一般来说越狱机器直接选择don‘t code sign那个选项

2 没有加入那段越狱的脚本语言 
解决办法
build phases--add build phases --add run script
在shell下面那个框框中,加入脚本即可
 
我的xcode是4.3 所以脚本如以下所示:

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/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

你可能感兴趣的:(Error launching remote program: failed to get the task for process)