Sign In Register

How can we help you today?

Start a new topic
Answered

Building iOS .ipa in Xcode - can't code sign

Hi,


I recently integrated GameSparks into our Unity iOS game, and everything works great, except when I come to build an .ipa for upload to TestFairy. Everything used to work fine, but now, when I try to export the .ipa from the archive in Xcode, I get a very unhelpful error telling me that code signing has failed.


Just before it tries to build, and fails, I see this dialogue:


Does the "0 entitlements" after the GameSparks bundle indicate a problem?

I have checked the various logs and I can't see anything helpful, I've rebuilt my distribution certificate and provisioning profile, all the usual things to check when code signing fails. My app didn't have an app id set, so I've set that up now, just in case that was a problem. The app builds and runs just fine, and will build and code sign the archive. It's the .ipa export where it fails


I'm not even sure if this is a GameSparks problem, I thought I'd ask here in case anyone has any ideas. I've spent a couple of days on this so far and it's driving me insane.


Best Answer

Hi Tam - I discovered that most of the problem was caused by the GameSparks post process script not being called when building on Jenkins. This is a problem with Unity. I fixed this by adding the postprocess code directly into the build script.


A bit of extra info - I'm using Unity 5.3.2f1, and Xcode 7.2.1.


This is what I get in IDEDistribution.critical.log (this is the entire file):

2016-02-09 20:08:24 +0000 [MT] Presenting: Error Domain=IDEFoundationErrorDomain Code=1 "Codesign failed" UserInfo={NSLocalizedDescription=Codesign failed}


No other errors can be seen in the logs, as far as I can tell. I can post them if someone wants to see them.


This is just as helpful as the pop-up error message, which simply says "code sign failed"


If I completely remove GameSparks from my Unity project, everything works fine, I can build .ipa's as before.


I can provide any other info if required, any help is very very gratefully received!

Thanks for the info Christian.
We're looking into it currently.

Thanks,


Oisin.

I was able to work around this by deleting "Unity-iPhone/Frameworks/Plugins/gamesparksunityosx.bundle" from the Xcode project.  Removing it shouldn't cause any problems, but your results may vary.


1 person likes this

Rich - that works!!! Thanks very much, I didn't even think of deleting that because I assumed it was a vital component...


1 person likes this
The latest SDK should fix the issue but I haven't had a chance to try it yet.

Hi Rich, 
Just wanted to thank you on behalf of the community and the GameSparks team for you valuable contributions! 


Regards, Patrick. 


1 person likes this

We tried the latest SDK but it didn't fix this issue.

Answer

Hi Tam - I discovered that most of the problem was caused by the GameSparks post process script not being called when building on Jenkins. This is a problem with Unity. I fixed this by adding the postprocess code directly into the build script.

With me, I must delete Assets/Plugins/gamesparksunityosx.bundle/ folder in Unity Project and rebuild Ios project

Same here - we updated to the newest SDK some days ago - and this thing is blocking our signing process. 

Can you give us a little bit more inside, where and when the postbuild script is supposed to delete this file - so we can try to fix the issue on our own ? 


Thanks 


P.S: Release Notes would help a lot ! Could have saved me days of research until finaly suspect gamesparks blocking the signing !

I tried many searches to figure out what was going on with the code signing.  It didn't occur to me to delete the bundle and it probably would be a blocker with other developers.  It certainly would be helpful to make finding the solution a bit easier.

In order to get your post process scripts called when building from the command line (ie: Jenkins) add the following to your command "-buildTarget ios"


When will the new sdk be released ?

Thanks Benjamin, you have saved me a great deal of pain! I had no idea what the buildTarget option was for!

I am getting this problem also.  Where do I put the "-buildTarget ios" value?

Login to post a comment