Game Development Community

Is there a provisioning step in iTGB?

by Mike Mann · in iTorque 2D · 08/10/2009 (2:09 pm) · 15 replies

I ask because when I try and build my game in Release setting (any optimizations), I get the following build script error:

Code Sign error: Provisioning profile '58B339CA-8BC5-4401-9C31-F7B7C8CDFA3D' can't be found

And then it won't rebuild my DSOs. I saw one other thread with a similar topic, but that appeared to be delivering this message in XCode, not iTGB. Any thoughts or insights into the process and how to fix this?

#1
08/10/2009 (3:30 pm)
Have you gone through the process for creating a provisioning profile on the apple developer program? There's quite a few hoops they make you jump through before you can actually deploy to a device. I'm probably not the best person to explain it as I simply followed a guide I found on the internet. It seems strange that you're getting it in iTGB though.
#2
08/10/2009 (4:45 pm)
Yes. You will need to have your provisioning profile setup and make the necessary changes for your project to the plist data in the XCode project to ensure that they match up.
#3
08/10/2009 (5:03 pm)
That's the weird part for me - I can build the project in XCode without a problem. Also, I can build the DSO files with a debug setting and build/run the project on the device just fine. The problem comes in when I switch to a release build - when I do that, I get the error above in the build text file.
#4
08/10/2009 (5:14 pm)
Make sure you switch the target to use your provisioning profile. In one of the targets of 1.2 it uses Mich's profile.
#5
08/10/2009 (5:27 pm)
But does iTGB use elements of the XCode project to build the DSO files? I've got no problem actually building the targets in XCode, its the Project Builder in iTGB that's giving me the trouble.
#6
08/10/2009 (5:31 pm)
DSO aren't built in XCode.
They are build by the editor / TGBGame
#7
08/10/2009 (6:12 pm)
Yup, I understand that they are the compiled versions of the script files built by TGBGame. But when I try to compile those scripts the same way I always have (File->Build Project), TGB launches a text file with the error:


Code Sign error: Provisioning profile '58B339CA-8BC5-4401-9C31-F7B7C8CDFA3D' can't be found


And since I can't compile the Release versions of the DSOs, I can't build the Release version of the project in XCode without the properly matched DSO files.

The question is still - how do I get TGB to recognize my valid provisioning profile? And why is it looking for one? Shouldn't that be left to the XCode project?
#8
08/10/2009 (6:14 pm)
The problem is not related to DSO at all.
It is, as others have poitned out above, related to the fact that you must change the provision in the project settings.
Each build target (optimize, script, script optimize, each in debug and release) has its own provision assignement. Its not per project.

Thats a good thing btw as it allows you to create AdHoc and Deployment build targets and just switch between them for the corresponding builds without any further work
#9
08/10/2009 (6:25 pm)
My provisioning profiles are set up correctly in XCode. As I pointed out above, I can build the projects in every setting without a problem and deploy them to the device. Having them run properly is another matter entirely.

An invalid provisioning profile in the Project Settings would give me an invalid Codesign error within XCode, wouldn't it? I've been there before and that's typically one of the first things checked in the Dependencies.
#10
08/10/2009 (6:31 pm)
Sure you read the error message you posted? ;-)
#11
08/10/2009 (6:33 pm)
Yup, 100% positive. That's why I've posted in the forums - why is that error coming up from TGB? If it came from XCode, I'd understand the reasoning and how to fix it.
#12
08/10/2009 (6:35 pm)
it comes from Xcode

code sign errors are not thrown by anything but Xcode.
TGB / iTGB does not even know nor care about code signing and provision profiles.
#13
08/10/2009 (6:38 pm)
Just to ensure that: nothing thats related to the iTGB / XCode iPhone project builds DSOs at all. and that project is the only project that uses code signing and provision profiles.

Only the regular XCode projects (TGB / TGBGame) can build DSOs at all. And these projects don't use any code signing or provision profiles.
#14
08/10/2009 (7:08 pm)
Provisioning:

Ensure your URL is in the right field of all Info-*.plist files.

Right-click the target under the Targets section in Xcode, select Get Info. Select Build and All Configurations, then scroll down to provisioning and see that yours are selected.

If you have made an extra target for the distribution version (the one to send to Apple), change Configuration to that and select its unique distribution profile. One dev profile for all programs you make, one unique for each app.
#15
08/11/2009 (12:37 pm)
Ok, I tried building my project in iTGB and I started having the exact same problem. I'm not sure I understand how everything works but here is how I resolved the problem.

1) Go to Xcode --> Project --> Edit Active Target
2) Go to the build tab and from there to the code signing section.
3) Click Code Signing Idenity and this should pull up a list with a default iphone developer selected.
4) Select your real provisioning profile and compile the code.

If you don't see another provisioning profile then there might be a problem with your provisioning process and you should go through that again.