views:

127

answers:

2

I'm trying to make a ad-hoc beta distribution of my app, but get this error whenever I try and import it into iTunes:

'A provisioning profile named "embedded.mobileprovision" already exists on this computer. Do you want to replace it?'

If I click Replace, the profile named embedded.mobileprovision appears in the iTunes profiles folder, but the app doesn't appear in iTunes.

The app builds with no errors, and I have already imported my ad-hoc distribution provisioning profile into iTunes.

Has anyone else had this problem, or know how to solve it? I'm using iTunes 9.2, Xcode 3.2.3 and iPhone SDK 4.0

Thanks.

+2  A: 

I had this problem as well, and got around it by selecting "Application Requires iPhone Environment" in the info.plist. (also known as "LSRequiresIPhoneOS" for raw key value)

beno
Yes, I have seen other people suggest this. I don't get that option in my info.plist though. If I add it manually, it still doesn't solve the problem.Were you using Xcode 3.2.3?
Tom W
strange, yeah i'm using 3.2.3 with the 4.0 SDK, that's when i first had the problem, and i have that option available when i go to add a new key.Probably stupid question, but have you un-selected "Show Raw Keys/Values" for the plist option? Otherwise, it will show up as "LSRequiresIPhoneOS" for the key.
beno
Yes, I have done that.The options I have are 'Application Requires Carbon Environment', 'Application Requires Classic Environment' and 'Applications Requires native Environment'.
Tom W
+1  A: 

I have solved this problem.

Even though, as I explained in one of my comments, I was not able to select "Application Requires iPhone Environment" when editing Info.plist, if I make a new project in Xcode this option does appear.

After finding this I copied the Info.plist file from the new project into the project I'm currently working on. I then deleted the original one, and renamed the new one as appropriate.

After updating some of the other settings to match my project (e.g. the Bundle identifier), and building the project, I could then import the app into iTunes.

Tom W