Can't build my game for Ad Hoc properly (first time trying to test)

Leaufai

  • Posts: 327
Hi,

I just got my iOS developer license and since I got my iPod Touch 2nd generation (4.2.1) in the mail last week I had everything I needed to start testing the iOS game I had been working on. And then I failed. Can't get it to work. The thing is, I use Windows so part of the process isn't as straight forward as on a Mac which is probably the part where I got it wrong. Since there's so many steps I'll just go through all of them. Hopefully someone will be able to help.

I used this tutorial to get a .p12 as I was informed to do by the Stencyl help article:
http://www.adobe.com/devnet/air/articles/packaging-air-apps-ios.html

1. I got my App ID:



2. I got my device name and UDID and copied it directly to New Device and set it up correctly.

3. I generated a CSR file. I downloaded OpenSSL-Win32 and used CD to set CMD to the correct directory.

Had an error: WARNING: CAN’T OPEN CONFIG FILE: /USR/LOCAL/SSL/OPENSSL.CNF
but using this I fixed it:
Code: [Select]
set OPENSSL_CONF=c:\OpenSSL-Win32\bin\openssl.cfg
I then used CMD to do the following command:
Code: [Select]
openssl genrsa -out mykey.key 2048.
That got me a mykey.key file in the bin folder.

Then I used this command:
Code: [Select]
openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj "/emailAddress=myaddress@example.com, CN=Stefan Rumen, C=NL"
That got me a file called CertificateSigningRequest.certSigningRequest

I then went to Certificate>Developer
Put the file above in the Request Certificate window and after a few minutes I was able to download ios_development.cer



Did not download the WWDRCA.cer file at the time, but it doesn't seem to use it in the Windows procedure, only the OSX one.

Then I went back to CMD and put in:

Code: [Select]
openssl x509 -in ios_development.cer -inform DER -out ios_development.pem -outform PEM
That got a pem file. Then I did:

Code: [Select]
openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iOS_dev.p12
That asked me for a password, which I was unable to enter anyway. I looked on the internet and seemed to find a solution. Did this:

Code: [Select]
openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -password pass:fakepassword -out iOS_dev.p12
That got me a p12 file. I later learned that the password input is invisible, but even when I did the original code and typed in a password it didn't work. Anyway I then set up two distribution profiles like this:





Then I set up my Stencyl like this:



Tried the Joystick example to test it but I then got this message. Kept changing it but it never compiled correctly.

Quote
                                   
1 identity imported.
iPhone Developer: Stefan Rumen (3R2DAF83YQ)
Build settings from command line:
    CODE_SIGN_IDENTITY = iPhone Developer: Stefan Rumen (3R2DAF83YQ)
    SDKROOT = iphoneos5.1

=== BUILD NATIVE TARGET AppScaffold OF PROJECT AppScaffold WITH CONFIGURATION Release ===
Check dependencies
Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates

vodkaman6661

  • Posts: 121
Are you using stencyl 2.2? Since updating to 2.2 I've had a lot of issues using the ad hoc while being on a windows based machine. It work perfect before then.

Your cerficates look okay from a quick look.

Try going back to stencyl 2.0 or 2.1 and give it a try, I've had positive result using this method.

Hope this helps mate

magicpegasus

  • Posts: 101
I'm also having the same problem. When I do get the game to build, strangely by using dev profile instead of ad-hoc in Stencyl preferences, the game will not install. I get "unable to download" error on my iPhone. When I choose the ad-hoc profile, the game will not build at all and I get the error described above.

I've tried using 2.1 and get the exact same results.

I know everything can't be easy, but trying to set up everything just to test a game has been really difficult! Like the OP, I feel like I followed the guides precisely, and I'm disappointed with the results.

Is Stencyl 3 ready to test games on my device? I heard we're doing away with ad-hoc builds anyway, right?