These two commands starting with '#' have to be placed in Main just bellow project properties. I cannot understand what might be the problem if you have done everything by the book... I am not sure but this message "...do not match..." might be meaning that you have more than one cer files and more than one mobile provisions and when you pair them in the '#' commands you pair them in an 'X' manner... I mean first .cer with second mobile provision file and second .cer with first provision profile (athough if I remember correctly you may only have one cer file both for ad hoc and AppStore). Just also try to comment out the '#' commands or remove them completely.