Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 11, 2008, 06:02 PM   #1
Littleodie914
macrumors 68000
 
Littleodie914's Avatar
 
Join Date: Jun 2004
Location: Rochester, NY
Having Big Problems with Provisioning Profiles

Hey guys, after much frustration, last week I finally built my iPhone App for distribution, and uploaded it to the store.

I've made some changes to the code, and I went back today and switched back to development (instead of distribution) to try and deploy the app to my device. My code signing identity was invalid, and it looked like (for whatever reason) creating my Distribution profile invalidated the Development one.

Long story short, I started over from scratch. Requested new certificates, registered a new device, completely restored my iPod, and created new provisioning profiles for both distribution and development.

Both my certificates in the Keychain have my private key listed under them, both my provisioning profiles are listed under "Provisioning" in the organizer for my device. Both are "enabled," if you know what I mean, and both are checked.

Currently, I'm just trying to build for distribution, since this kills two birds with one stone. (Deploying the app locally for upload and to the device for testing.) In the Code Signing section of my Target/Project info windows, my Code Signing Identity is "iPhone Distribution," which pulls up my specific distribution profile, not the generic one. (Eg., it found it.)

Here's where things get weird. I can clean and build the app, and everything goes fine. Every once in a while, (or maybe every time, I can't tell) it updates the app in the finder. So chances are, I can still distribute my app to the App Store. (Which is priority #1.)

Priority #2, testing on my device, got a little more problematic. When it gets to the "Installing on device..." part in Xcode, I get the error:

"Your mobile device has encountered an unexpected error (0xE8000001) during the install phase: Verifying application"

This happens every time, no matter what I do. Has anyone else run into this problem before? Does anyone else think this is a bit of a hassle?

Thanks!!!
Littleodie914 is online now   0 Reply With Quote
Old Jul 12, 2008, 08:37 AM   #2
avalys
macrumors regular
 
Join Date: Jun 2004
You cannot run applications on your device (through XCode, anyway) with the distribution profile. You have to sign the executable with your provisioning profile.

It is best to keep two separate build configurations in Xcode - "Provisionining" and "Distribution".
avalys is offline   0 Reply With Quote
Old Jul 12, 2008, 08:48 AM   #3
Littleodie914
Thread Starter
macrumors 68000
 
Littleodie914's Avatar
 
Join Date: Jun 2004
Location: Rochester, NY
Quote:
Originally Posted by avalys View Post
You cannot run applications on your device (through XCode, anyway) with the distribution profile. You have to sign the executable with your provisioning profile.

It is best to keep two separate build configurations in Xcode - "Provisionining" and "Distribution".
You mean with the Development Profile? (Since both the Distribution and Development profiles are "Provisioning Profiles")

Thanks a lot, I didn't know that the Distribution version wouldn't let you deploy as well. I'll give that a shot!
Littleodie914 is online now   0 Reply With Quote
Old Jul 12, 2008, 04:49 PM   #4
gralem
macrumors member
 
Join Date: Mar 2002
how to do it

a couple of notes:

1) You set up your DEVICES once per device. There are only development devices (no deployment devices).

2) This is important: You basically setup ONE APPLICATION ID. The same Application ID will be used for both development and distribution.

That can have any App ID Name you want, but should have an App ID (Bundle Seed ID + Bundle Identifier) of com.[yourself].* and Apple will automatically prefix it with some sort of unique identifier. This gives you a "wildcard" Application ID, that lets you develop and distribute as many applications as you want. Technically, if you have only one app, you can create a "static" app ID for that app, but it makes no sense. Give yourself a wildcard and build as many for development (or distribution) that you want.

There is some sort of problem with having individual Application IDs for one developer. It stopped working for development around SDK beta 6, and as of July 11 you can no longer have individual Application IDs for deployment purposes.

3) Provisioning now becomes simple. You need one Provisioning Profile for development and another one for distribution. One and only one of each type of provisioning profile. Each profile uses your one App ID. Put your development provisioning profile in ~/Library/MobileDevices/Provisions. Start XCODE and drag your distribution provisioning profiles to the xcode icon once it is running. XCode does something to distribution profiles (renames them at least) and puts them for you in ~/Library/MobileDevices/Provisioning Profiles/. But you cannot drag your distribution profiles into this folder directly.

4) You have to manually setup a distribution target. Follow the steps in the distribution section of the iphone developer portal.

5) To run apps on your phone in developer mode, you must set your Active SDK to Device (Project -> Set Active SDK -> Device - iPhone 2.0 (Project Settings)) *AND* set your Active Build Configuration to Debug (Project -> Set Active Build Configuration -> Debug).

To build your apps for the App Store, you must set your Active SDK to Device and set your Active Build Configuration to Distribution.

VERY IMPORTANT: When building your app for the App Store, it can be very easy to forget to Set Active SDK->Device. If Active SDK is left on Simulator, you cannot upload the resulting application to the store. When you want to upload to the App Store, set SDK to DEVICE!



I hope this helps.

---gralem
gralem is offline   0 Reply With Quote
Old Jul 12, 2008, 05:20 PM   #5
firewood
macrumors 603
 
Join Date: Jul 2003
Location: Silicon Valley
The rules for the wildcard app ID may have changed. Read the recently added note in the Dev Center regarding building and distributing multiple apps.
firewood is offline   0 Reply With Quote
Old Jul 13, 2008, 08:20 AM   #6
louden
macrumors 65816
 
louden's Avatar
 
Join Date: Dec 2003
Location: Seattle
Quote:
Originally Posted by Littleodie914 View Post
You mean with the Development Profile? (Since both the Distribution and Development profiles are "Provisioning Profiles")

Thanks a lot, I didn't know that the Distribution version wouldn't let you deploy as well. I'll give that a shot!

Check out the instructions on the portal for Distrbution. They clearly show the need to create a new Profile in XCode called "Distribution"
__________________

Dell Pentium 2 with 500 MB HD Windows 95
Compaq iPaq w/ 64MB of Ram
louden is offline   0 Reply With Quote
Old Jul 13, 2008, 08:55 PM   #7
gralem
macrumors member
 
Join Date: Mar 2002
I forgot about your DEVICE

There is something else... you need to remove all non-wildcard provisioning profiles from your iphone manually (not via xcode) and from your home directory. If you have all sorts of provisioning profiles on your system, I would go empty out ~/Library/MobileDevices/Provisions/ and ~/Library/MobileDevices/Provisioning Profiles/. Then I would re-download my 2 wildcard profiles and install them.

To remove the profiles off your device, go to Settings -> General -> Profile (2nd-to-last item). Hopefully, you will only have your 1 development profile on your phone. If you have a list of profiles, remove your non-wildcard profiles from your phone.
gralem is offline   0 Reply With Quote
Old Jul 13, 2008, 11:05 PM   #8
louden
macrumors 65816
 
louden's Avatar
 
Join Date: Dec 2003
Location: Seattle
A couple of other gotchas that caused frustration:

1)Icon naming: I needed to edit the plist file with my icon name. XCode doesn't store the ".png" extension by default and iTunes would keep bouncing my upload saying I didn't have a valid icon file.

Just to be safe, I'm only naming my icons "icon.png" and editing that in the PNG file.

2) The name to use for your "Code Signing Identity": It used to be that we'd to use "iPhone Developer: FirstName LastName" for the identity, but per their updated instructions, It looks like you now need to use: "iPhone Developer" for debug/release builds and "iPhone Distribution" for distribution builds. My problem is, I sometimes didn't see the profile information you'd expect in the XCode drop downs when do this, but it seems like logging out and logging back into a session seems to help. This is a very flaky process.

3) (someone correct me if I'm wrong) You can only use a Distribution Provision for ONE upload. If you make a small change an re-up it, you need to create a different Distribution Provision.
__________________

Dell Pentium 2 with 500 MB HD Windows 95
Compaq iPaq w/ 64MB of Ram
louden is offline   0 Reply With Quote
Old Jul 15, 2008, 11:57 AM   #9
Vicegrip
macrumors newbie
 
Join Date: Jul 2008
Same constant Error:
Your mobile device has encountered an unexpected error (0xE8000001) during the install phase

What I have done:

1) created an app ID of the form com.myname.*
2) created a certificate per the Portal's instructions
3) registered my iphone's ID, as obtained from the organizer, on the Portal page.
4) created two profiles called "Development" and "Distribution"

I have placed the development provisionning file in ~/Library/Mobile Device/Provisions and the distribution one was placed by XCode (after I dragged it over the IDE icon) into ~/Library/Mobile/Provisioning Profiles. The distribution file is renamed per expectation.

5) in my info.plist file changed Bundle Identifier to be: com.myname.${PRODUCT_NAME:identifier}
6) in the build setup, I've set Code Signing Identity to: iPhone Developer as per instructions on the Portal.

I've tried everything I can think of so far and still get that unhelpful error message.

Observation:
Neither of the two provisioning profiles listed in the Organized can be checked. The checkbox appears to be disabled.
Vicegrip is offline   0 Reply With Quote
Old Jul 15, 2008, 12:47 PM   #10
drivefast
macrumors regular
 
Join Date: Mar 2008
oh boy. i guess i should consider myself lucky that i only spent one day trying to figure out all the things the OP complains about. what seems to have ultimately worked for me was related to what gralem described here:

Quote:
Originally Posted by gralem View Post
There is something else... you need to remove all non-wildcard provisioning profiles from your iphone manually (not via xcode) and from your home directory. If you have all sorts of provisioning profiles on your system, I would go empty out ~/Library/MobileDevices/Provisions/ and ~/Library/MobileDevices/Provisioning Profiles/. Then I would re-download my 2 wildcard profiles and install them.

To remove the profiles off your device, go to Settings -> General -> Profile (2nd-to-last item). Hopefully, you will only have your 1 development profile on your phone. If you have a list of profiles, remove your non-wildcard profiles from your phone.
his post was not here at that time, but i remember i have been able to build-n-run my app into the iphone after i cleaned up both the provisioning directories on my mac (that meant physically deleting the files) *and* deleted the provisioning profiles from my phone. then tried the trick with dragging the provisioning profile over the xcode icon again. i'm not at all sure that i can reproduce that, and i dont even think about trying again.

by the way, this whole topic contains great info on stuff that is poorly documented by apple and shaky in the program portal, and i think parts of it should make it into the sticky at the top of the list. gralem - your posts were great, thank you.
drivefast is offline   0 Reply With Quote
Old Jul 15, 2008, 09:00 PM   #11
ausyeti
macrumors newbie
 
Join Date: Mar 2008
Location: Europe
Quote:
Originally Posted by louden View Post
A couple of other gotchas that caused frustration:

2) The name to use for your "Code Signing Identity": It used to be that we'd to use "iPhone Developer: FirstName LastName" for the identity, but per their updated instructions, It looks like you now need to use: "iPhone Developer" for debug/release builds and "iPhone Distribution" for distribution builds. My problem is, I sometimes didn't see the profile information you'd expect in the XCode drop downs when do this, but it seems like logging out and logging back into a session seems to help. This is a very flaky process.
That all sounds just great, but doesn't match my experience today at all
In way of introduction, I registered for a certificate in March and was also just accepted last weekend. So far, i also haven't got past the 0xE8000001 error...

In reference to your (louden's) post, I haven't found any documentation telling me how to incorporate my certificates into the build and code signing process. Which document or page have I missed?

I found the Code Signing section in the build settings, but when set to "iPhone Developer", "iPhone Developer: firstname lastname" or just "firstname lastname" I get an error during the build process saying that no such certificate can be found - build failed.

The only way I can get the build to work is by using the certificate's "other name" (10 characters, seemingly random - found by viewing the certificate's info in Keychain Access).

If I then try to run my app on the device I also get the now infamous 0xE8000001 error

I've gone through all of the tips mentioned in this thread, but I just can't get past the code validation. I've set up a my developer certificate, wildcard app certificate, the mobile device certificate and a development provision profile. Everything seems to match the documentation until I actually try to build my app.

Oh... and yes, my app works fine in the simulator, unsigned :-)

Cheers, and thanks for the forum! After working in this dark closet for so long its nice to know there are still others out there
ausyeti is offline   0 Reply With Quote
Old Jul 16, 2008, 07:11 AM   #12
killers
macrumors newbie
 
Join Date: Jul 2008
Hello all,

I am new to Xcode, new to mac and new to iPhone development like most people except the mac part

Ok I have done the following:

1. Created my App ID on the portal.
2. Created my Provisioning Profile and associated the App ID with it on the portal.
3. Dragged the Provisioning Profile onto the XCode icon and it created the profile in the correct location.
4. I have selected Device - Any iPhone OS Device: iPhone Developer for Code Signing Identity in the Project Properties/Build tab.
5. I have selected Device - Any iPhone OS Device: Default Provisioning Profile for Code Signing Identity in the Project Properties/Build tab. (This is the only option that is enabled. There is an iPhone Developer but its disabled.)
6. Code Signing Resource Rules Path does say: iphoneos2.0/ResourceRules.plist but not sure if that means anything.
7. Provisioning in Organizer for my device has my new Provisioning Profile and it is checked.
8. My iPhone has my Provisioning Profile when I goto to Settings\General.

What I have not seen in this discussion is what the Bundle identifier should be set (Info.plist) to when the default Bundle Identifier is com.yourcompany.${PRODUCT_NAME:identifier}. For example if your App ID is XYZ.* do you change this to XYZ.*${PRODUCT_NAME:identifier} or do you change it to XYZ.* with nothing else.

Besides the Bundle Identifier in Info.plist where else do you need to set this XYZ.* (App ID) to?

I still get the 0xE8000001 error when I Build and Go

Also when I click Run when in Device | Debug I get this:

The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).

Thanks

Last edited by killers; Jul 16, 2008 at 08:02 AM.
killers is offline   0 Reply With Quote
Old Jul 16, 2008, 09:51 AM   #13
Vicegrip
macrumors newbie
 
Join Date: Jul 2008
Some insights

Here are some of the mistakes I was making. I did not correctly change the identity, following some instructions I had read. It was: iPhone Developer

I have changed the identity configuration to: iPhone Developer: <myname>

I also had not properly installed the certificates. You should have THREE certificates installed in your keychains.

1) the WWDR certificate
2) your development certificate
3) your distribution certificate
NOTE: contrary to some advice posted in various places, I dragged BOTH my developer profile and distribution profile onto XCode. I also copied the developer profile file into the ~/Library/MobileDevice/Provisions folder (which you have to create yourself). You can also drag it directly unto the organizer or import it from the organizer if you prefer to.

Your certificate is WRONG if there is a red icon on it identifying it is not trusted.

Finally, verify that the device ID you entered is correct. I still have no idea why this is the case, but the original device ID I copy pasted from the Organizer was incorrect. I updated Portal with the correct one once I noticed the Device ID on the Portal site did not match anymore what was in Organizer.

I had previously (a while ago) connected an iTouch... I suspect there may be a bug in the Organizer that caused it to display the Touch's UUID. At least thats all I can think of right now.

Last edited by Vicegrip; Jul 16, 2008 at 09:59 AM.
Vicegrip is offline   0 Reply With Quote
Old Jul 16, 2008, 02:37 PM   #14
Insomniac74
macrumors newbie
 
Join Date: Jul 2008
Got similar errors as everyone here and also looking for the solution. The debugger has the following output:
Code:
Thu Jul 17 03:33:07 unknown afcd[208] <Error>: user mobile has uid 501

Thu Jul 17 03:33:07 unknown afcd[208] <Error>: mode is 0x41e8
Thu Jul 17 03:33:07 unknown mobile_installation_proxy[210] <Error>: install_embedded_profile: Skipping the installation of the embedded profile
Thu Jul 17 03:33:07 unknown mobile_installation_proxy[210] <Error>: verify_executable: Could not validate signature: e800800e
Thu Jul 17 03:33:07 unknown mobile_installation_proxy[210] <Error>: preflight_application_install: Could not verify /var/tmp/install_staging.KxJA/AccelerometerGraph.app/AccelerometerGraph
Thu Jul 17 03:33:07 unknown mobile_installation_proxy[210] <Error>: install_application: Could not preflight application install
Thu Jul 17 03:33:07 unknown mobile_installation_proxy[210] <Error>: handle_install: Installation failed
Insomniac74 is offline   0 Reply With Quote
Old Jul 16, 2008, 02:52 PM   #15
Insomniac74
macrumors newbie
 
Join Date: Jul 2008
OK never mind caught it... duplicate key in my Keychain from an earlier failed attempt was confusing proxy.
Insomniac74 is offline   0 Reply With Quote
Old Jul 16, 2008, 07:40 PM   #16
NeonSurgeDev
macrumors newbie
 
Join Date: Jul 2008
Location: Southern California
Here's a tip

Quote:
Originally Posted by Vicegrip View Post
I have changed the identity configuration to: iPhone Developer: <myname>
Hey, having done some programming with a team, with each team member having their own certificate, you should not be setting the above to a static value. Instead... set your identity configuration to just: iPhone Developer

XCode searches through your Keychain and finds any entry that contains that text. It automatically finds your cert and uses it. When your co-worker checks out the code (assuming you're using a versioning system) they can also use the same targets, and build it for the device.

Also, to get it for distribution, have a separate target with iPhone Distribution which should be pretty much an exact duplicate of your "Release" target, except for that part.

We found this little gem by viewing the Apple Video on Release and Distribution on the AppStore, the latest addition to their iPhone video series. They actually don't mention this but if you look at their configuration, it's how they have it setup.

Cheers!
__________________
Neon Surge - neonsurge.net
Check out our first game, SolarQuest!
http://neonsurge.net/solarquest
NeonSurgeDev is offline   0 Reply With Quote
Old Aug 2, 2008, 10:08 PM   #17
Littleodie914
Thread Starter
macrumors 68000
 
Littleodie914's Avatar
 
Join Date: Jun 2004
Location: Rochester, NY
Wow... absolutely insane.

I completely did *everything* over again, from scratch. New certificate, new provisioning profiles, wiped and restored the device.

Still, SAME error.

Got so frustrated, I left it for all of today. Came back 5 minutes ago, and decided to do a final google search. Found the solution.

Solution, FINALLY: The bundle identifier in the info.plist. It should not be the same as your App Id. My App ID is com.craigotis.*, and it gave it something like ABCDEFG.com.craigotis.*. This is what I put in the info.plist. It's *not* what you're supposed to use. I changed it to "com.craigotis.${PRODUCT_NAME:identifier}" literally, and it worked. Hope this helps someone.

Apple really needs to streamline this, it's getting ridiculous.
Littleodie914 is online now   0 Reply With Quote
Old Aug 3, 2008, 01:13 AM   #18
DipDog3
macrumors 6502a
 
DipDog3's Avatar
 
Join Date: Sep 2002
 
SOLVED my problem with Ad Hoc Distribution...

SOLVED my problem with Ad Hoc Distribution...

First, look at your ad-hoc provisioning file in text edit (just view it, don't overwrite it!)

If it does NOT contain a line that says "<key>get-task-allow</key>" then you need to go to the program portal and get a NEW ad-hoc provisioning profile.
There is a workaround where you can use the provisioning profile without this key, but Apple apparently has added this key to the ad-hoc provisions, and you might as well have the latest.

However, that is not the final fix.

The next thing you have to do is add a new file to the root of your project ... file, new file, iphone, code signing, entitlements. Call it "dist.plist" ...

Open that file, and it will say "get-task-allow" with a checkmark for "true" -- this needs to be FALSE. Uncheck the checkbox, or if in text mode, type in "false"

OK, almost there!!!

Open the target build info window and where it says "Code Signing Entitlements" add "dist.plist"

CLEAN THE BUILD

BUILD AND GO

ENJOY.
__________________

Interactive Phone - Try out the new Virtual iPhone 5s (Download Code @ RedRome.com)
DipDog3 is offline   0 Reply With Quote
Old Sep 12, 2008, 10:26 AM   #19
apolson
macrumors newbie
 
Join Date: Dec 2007
Quote:
Originally Posted by Littleodie914 View Post
Wow... absolutely insane.
Solution, FINALLY: The bundle identifier in the info.plist. It should not be the same as your App Id. My App ID is com.craigotis.*, and it gave it something like ABCDEFG.com.craigotis.*. This is what I put in the info.plist. It's *not* what you're supposed to use. I changed it to "com.craigotis.${PRODUCT_NAME:identifier}" literally, and it worked. Hope this helps someone.

Apple really needs to streamline this, it's getting ridiculous.
Thank you! Thank you! Thank you! Like you I was getting completely frustrated with this process and couldn't figure out what was wrong. All I wanted to do was load and run an example app. This suggestion pushed me over the top and now I'm developing.
apolson is offline   0 Reply With Quote
Old Sep 15, 2008, 03:27 PM   #20
caveman_uk
Guest
 
caveman_uk's Avatar
 
Join Date: Feb 2003
Location: Hitchin, Herts, UK
Quote:
Originally Posted by Vicegrip View Post
Same constant Error:
Your mobile device has encountered an unexpected error (0xE8000001) during the install phase
This link tells you how to fix it.

Link

Basically you need to put a real value in the Bundle Identifier field in Info.plist. Something like the com.mycompanyname.appname ... It didn't work for me with the defaults.
caveman_uk is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
New Mac, color profiles, printing problems cool11 Digital Photography 19 Apr 3, 2014 09:17 AM
Xcode 5 and provisioning profiles MacMan988 iPhone/iPad Programming 0 Sep 23, 2013 10:09 AM
iPhone: evasi0n and provisioning profiles f00f Jailbreaks and iOS Hacks 1 Feb 12, 2013 03:56 PM
Provisioning Profiles MoodyM iOS 6 0 Feb 9, 2013 09:08 AM
No unexpired provisioning profiles error LARRYSE iPhone/iPad Programming 1 Dec 31, 2012 10:42 AM

Forum Jump

All times are GMT -5. The time now is 07:24 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC