In my case, even I created a myapp.profile and set it in xcode manually, and when I chose "show in finder" and located the embedded.mobileprovision and checked to make sure aps-environment is there in the file, the error was still there.
I then went to developer center and found that the status of XC: myapp.profile is invalid. I updated it and installed the XC: myapp.profile and it worked fine.
I think xcode is trying to manage the profile and you need to check the provisioning profile when you submit your binary to store, and ensure it is the correct one. And according to other answers it can be caused for various reasons so it can be really annoying.
UPDATE:
Once you've signed with the downloaded profile and confirmed that aps-environment
was there when you try to submit to App Store
, you should be able to change the profile and code signing entity to automatic and iOS Developer
. Hope it can be improved in Xcode 7.