[SOLVED] error: provisioning profile matching app not found

I just obtained an iPhone developer license, and I have set up a provisioning profile as explained on the iPhone developer program website.

I also created a small test project in Unity iPhone Basic, and I have entered the App Identifier in the IPhone Bundle Identifier field of the Player Settings in Unity.

When I build the game, a directory ‘Unity Player’ is created in the test project’s directory.
If I open the Xcode project in this folder, and I hit the ‘build’ button, I get the following error:

If I have a look at the Provisioning Profiles section in the Organiser in Xcode, I can see that the App Identifier is the same as in the error message, and also the same as in Unity.

The provisioning profile’s name is also visible in the list on the device page in the Organiser.

Does anyone have a clue what’s wrong here?

I found it myself.
I had to enter XXXXXXXXXX.xx.xxxxxxx.xxxxxxxxxxxxx instead of xx.xxxxxxx.xxxxxxxxxxxxx as the IPhone Bundle Identifier.

That was quite confusing as the first string was visible as the ‘App Identifier’ in the Organizer window in Xcode, while the build error in Xcode was referring to the App Identifier.