Game Development Community

A little help Deploying to a device

by Warthog · in iTorque 2D · 12/05/2008 (3:25 pm) · 17 replies

Hi all, I had to move to a different development machine, and I just can't get apps to deploy to my iPhone anymore. I can't remember how I got it working before.

Could someone familiar with Xcode please run me through what settings I need to change and what info to enter to get deployment working?

Everything goes fine until Verifying Application, then I get the following message:

"Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application
Try disconnecting and powering off the device; then power the device on and reconnect it."

Of course powering off and then on again does nothing.

@Michael - you just went through this, are you writing up deployment docs?

Also, for some reason my game sound doesn't work in the simulator on this machine and on my other one it did.

Here is the console log for the phone. Apparently I am missing an entitlement. Where should I be putting the application-identifier and what form should it take? Just the part that replaces the wild card or the whole thing?

Thanks.
-------------------------------------
Fri Dec 5 16:11:35 unknown mobile_installation_proxy[65] : install_embedded_profile: Skipping the installation of the embedded profile
Fri Dec 5 16:11:35 unknown securityd[57] : mobile_installat[65] SecItemCopyMatching: missing entitlement
Fri Dec 5 16:11:36 unknown securityd[57] : mobile_installat[65] SecItemCopyMatching: missing entitlement
Fri Dec 5 16:11:36 unknown mobile_installation_proxy[65] : entitlement 'application-identifier' has value not permitted by a provisioning profile
Fri Dec 5 16:11:36 unknown mobile_installation_proxy[65] : verify_executable: Could not validate signature: e8008016
Fri Dec 5 16:11:36 unknown mobile_installation_proxy[65] : preflight_application_install: Could not verify /var/tmp/install_staging.7sjWcP/TGBGame.app/TGBGame
Fri Dec 5 16:11:36 unknown mobile_installation_proxy[65] : install_application: Could not preflight application install
Fri Dec 5 16:11:37 unknown mobile_installation_proxy[65] : handle_install: Installation failed

#1
12/05/2008 (3:27 pm)
Sure you have changed the project to 2.2 or even downloaded the new xcode for 2.2 development?
#2
12/05/2008 (3:34 pm)
Hi Marc, I am still using 2.1. Is it safe to move to 2.2? so where am I supposed to enter my application identifier? Apple says:

During the application build process, Xcode will append any CF Bundle ID you specify in your Xcode project to the App ID in your provisioning profile.

Where do I specify the CF Bundle ID? I assume that will be filled into the wild card of my App ID

<10digits>.com.crudegames.*
#3
12/05/2008 (4:07 pm)
Warthog - should be in the Info.plist file
#4
12/05/2008 (4:15 pm)
Sorry for the trouble, figured it out. For all who might wonder:

inside info.plist, you set the Bundle identifier as follows:

Put everything that follows the 10 digits, not just what you are filling in for the wildcard. So you:

Take this: <10digits>.com.ourcompanyname.*
And use this: com.ourcompanyname.gamename

This is probably not a big deal for most, and I did it right a few weeks ago, but I have written this since there may be one of two other people who will benefit. Like I said, I am not in the least familiar with Xcode. Not yet anyway.

--edit--
@Casey - thanks, I saw your post after I posted this. I both wasn't sure where to put this, although I suspected I had that part right, but I mainly was putting in either:

<10digits>.com.ourcompanyname.gamename
or
gamename

neither of which work, of course.

I really appreciate the help
#5
12/05/2008 (4:23 pm)
"Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application"

Yeah, that error had me tearing my hair out. If you Google it, there are dozens and dozens of solutions proposed by other iPhone developers. I mean, major scattergun problem solving. There are crazy problems I've encountered due to the introduction of iPhone SDK 2.2 and Xcode 3.1.2.

Here's another gotcha:

We sometimes use the Distributed Builds feature for Xcode. Great feature, go Mac! Introduce iPhone SDK 2.2/Xcode 1.3.2, FAIL! Hundreds of errors will suddenly appear, and if you are new to Mac development and iPhone deployment like me, you immediately think it's your fault.

This is trial and error by fire my friends. I'm learning quick, but being unfamiliar with an IDE is a scary thing.
#6
01/09/2009 (5:32 am)
"Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application"

Does someone have a concrete sure fire fix for this? I almost always get it after reimporting my tgb project resources and of course I'm frustrated.. I'd tear my hair out but I am already bald!

Sometimes the only thing that works is to actually Clean, Build and Go Several Times before it works on the device.

[Edit] It seems more specifically to happen if I try adding in a folder named resources to the Resources section in xcode.
I am going to try removing it and see if I can clean and build and go on the device now.

[Edit] Removing the folder named 'resources' DOES make it work again. Now I will try adding it back in, cleaning, building, go

[Edit] Adding back in the resources folder from my tgb project causes the 003A error again, and removing it without Cleaning, Building does not let the app deploy. I can consider this tentatively confirmed and reproducable. Next I will try renaming the folder to 'assets' or something before I import it, and change the script references as well.

[Edit] Although renaming the 'resources' folder to 'assets' (and finding the script instances of 'Resources' and chaning them to 'assets' keeps it working when running from TGB, it doesn't look like the new folder is getting deployed at all to the actual device. I'll try running in the simulator to see if I can tap into a console log.
#7
01/09/2009 (7:29 am)
Hi,

I'm also having some issues with deploying on the device. Occasionally I do manage to do it, but lately I've been consistently encountering the error "GDB: Program received signal: 'EXC_BAD_ACCESS'." on compiledEval.cc, line 490. This only happens when trying it out on the device, in iTGB and in the xcode simulator it all works perfectly.

Did anyone ever encountered this?
#8
01/09/2009 (8:02 am)
Check out how much RAM you are using
the amount of RAM you have is pretty restricted (not present on the simulator and naturally even less on the regular TGB app)
#9
01/09/2009 (9:04 am)
Check out my messages in the feedback thread, might of saved you a bunch of time. I've had all the problems your having and more.

1. You can't use resources. So don't create the resources folder, it causes the verification error.
2. You have to do a full clean build/re-add the files everytime or it might miss some things. I haven't found a good work around for this yet.
#10
01/09/2009 (10:42 am)
The verification error has to do with the code signing and Info.plist file. You need to make sure you are using the correct provisioning profile, have entered your iPhone Developer info into the Code Signing under the Target's info build settings, and that you have the PRODUCT_NAME (app id) identical to what is listed in Info.plist.

For instance, my app id is itgb. In the info.plist, i have to write com.garagegames.itgb. PRODUCT_NAME in the build settings should be set to itgb. Case sensitive.

As for the other error, Bret is correct. Do not use resources (logged as a bug), and if you modify any files used by the XCode project, clean and rebuild.
#11
01/09/2009 (10:45 am)
Michael: I totally agree... but the hard fact is that if you add a folder named resources to your Resources, it will fail to deply with the verification error, 100% of the time. Remove it and you can clean and deploy ;) Just one of those things!
#12
01/10/2009 (1:41 pm)
@marc shaerer: where can you see how much ram is currently being used?
#13
12/30/2009 (3:15 pm)
Hi, I'm new to iTGB and totally enjoying the tutorials, however, i'm really struggling with the resources issue as stated by Dave and confirmed by Bret. If I remove "resources" the game deploys to the iPhone (without the art though). If I add "resources" xCode throws a wobbler and complains that my "application does not have a valid signature".

Can someone please tell me the workaround, I've spent three days on this, changing profiles, certificates, re-installing etc before I found this thread :(
Cheers
#14
12/30/2009 (3:22 pm)
You need to remove the resources from the project and import them as real assets to the project through the regular way to make them working.
#15
12/30/2009 (3:23 pm)
For the current version, resources are not supported. Any of the stock resources are not suitable for the iPhone, in the end. They are not optimized.
#16
12/30/2009 (3:33 pm)
Thanks for the replies.

Is there an easy way to import the any of the supplied art - I tried copying/pasting the resourceDatabase.cs into the level file but that didn't work.
#17
12/30/2009 (4:59 pm)
Okay, I've figured out something that works (for me). I've no idea if this is the correct procedure, but ...

1. Copy all of the resource data from ~/resources/<art>/resourceDatabase.cs e.g. t2dImageMapDatablock, t2dAnimationDatablock etc into ~/game/managed/datablocks.cs

2. Put it between (preserving anything else you already have here):

$managedDatablockSet = new SimSet() {
canSaveDynamicFields = "1";
setType = "Datablocks";

// Put the resources from resourceDatabase.cs here.

};

4. Save this file.

5. Copy the images from ~/resources/<art>/images into ~/game/data/images

6. Reload the project and you should be good to go.

Following the above I now have a working version of Whack A Mole on my iPhone :)

Cheers