Xcode managed provisioning profile

Hello! I'm an Xcode newbie here. I compiled an app with an Xcode managed certificate and provisioning profile. I can see that the provisioning profile is renewed and I can manually download it. However, it does not embed the new provisioning profile in the app. I would like to know what I am missing or doing wrong.