How to build ipa(ios game )using build service?

Post » Fri May 19, 2017 7:00 pm

so I have 2 questions:
1.How to build ipa(ios game )using build service?
2. How to build apk/ipa using the zip file?

Thanks
[size=200]1. Best Construct 2 course :HERE.10$!

2. 155 games source codes for sale on scrira store 12,86$each. PM me if interested to speed up the uploading process.
[/size
B
32
S
8
G
4
Posts: 148
Reputation: 3,713

Post » Fri May 19, 2017 7:49 pm

I too would like to know how to do this (besides just clicking the "build" button on C3).... at least generate a proper .apk and key for the game so I can publish it on google play... and version control. Thanks in advance!
B
28
S
11
G
15
Posts: 47
Reputation: 9,533

Post » Sat May 20, 2017 2:41 pm

I am having problems, with the APK service, everything seems to be fine building an APK, then when i try to test it on my mobile it says, can't open file, am I missing something?, the APK generated from XDK installs fine on the same mobile.
With the lack of documentation / explanation of use, I guess I will have to keep guessing, I guess.
Anyway It's frustrating to have an APK sitting there that you cant open, any idea's?

Just Thinking it might be a certificate problem, if so how do you get the xdk (keystore) certificate signed for the c3 build, with the original certificate?

Edit.
Spent about half a day trying to work out how to sign and align the .apk, managed to do that, but guess what "can't open file", something hasn't worked.
I thought the XDK process was a tad complicated (but achievable), but this is just far too complex for me.
I just hope there will be some kind of equivalent process for signing apk's that XDK had, I dont want to be running stuff from command lines etc, the whole point of using c2/c3 is for simplicity of use.
Bushy Ball\Boatman Bill\Sticky Web\Snake

Image ImageImageImage

During the gold rush it was a good time to be in the pick and shovel business
B
43
S
12
Posts: 241
Reputation: 5,045

Post » Mon May 22, 2017 11:23 am

Hi there, I'm the developer for the build service so you can place any questions through me. I can't really comment on future development, but am happy to discuss the current situation and how things work.

To answer the current queries:

At the moment the build service will only provide an xcode project for iOS applications, to take this any further you will require a mac, xcode and an apple developer account. We don't have any tutorials on this at the moment, but there should be plenty of tutorials available for publishing applications from xcode made by other people.

Android development provides more options; you can choose to produce an android project, a debug APK or a unsigned release APK. Unless you are publishing to the store I would advise you to use a debug APK as this can be installed directly onto a development device without any extra steps.

Release builds must be signed to use on a device. Signing an APK is a pain point at the moment, but we will provide at a guide on how to perform this at some point.

If you dislike the command line and want to publish a android game then I would recommend choosing the project option and building an APK through android studio. It will provide the options for producing a debug APK or a release APK like the build service, but will handle signing release builds and generating a developer key if you do not yet have one.

@caad8user Versioning of an APK can be specified by using the project version property in the main C3 editor, it should be in the format MAJOR . MINOR . MAINTENANCE for example

1.0.4


@paala if you request both an iOS project and a android build then the zipfile you get back will contain the iOS project folder and an Android APK. If you request only one option, say just a debug Android build, then you will receive just an APK instead of a ZIP file.

@sizcoz You probably found most of this out already but to sign an APK you need a developer private key, the unsigned apk, the apksigner tool and the zipalign tool. If you don't have a keystore file you need keytool from the JDK to create one. Both apksigner and zipalign are part of the androidSDK. I can't remember exactly but I expect even a signed release build must go via the play store to install, so debug APK's are the way to go unless your publishing.
Scirra Employee
B
5
S
2
Posts: 124
Reputation: 871

Post » Mon May 22, 2017 11:26 am

@nepeo thanks for your reply. I finally figured it out although I didn't really test it yet. So C3 generates an UNSIGNED apk and I have to do all the signing etc. Versioning is done through C3 itself... Is this correct? Now, I'll have to figure out how to generate a proper .ipa and should be all set. Then again, there's always cocoon.io....
B
28
S
11
G
15
Posts: 47
Reputation: 9,533

Post » Mon May 22, 2017 12:40 pm

@caad8user yes that's pretty much it, but remember you can use debug builds to try your game out on a mobile without needing to sign or publish. Also once you've figured out how to sign an APK it's only 2 commands to converted your unsigned APK to a release ready one.

To help you out a little:

https://developer.android.com/studio/command-line/apksigner.html tells you how to sign an APK.
https://developer.android.com/studio/command-line/zipalign.html tells you how to align an APK.
https://developer.android.com/studio/publish/app-signing.html has some additional information about the signing process and instructions on how to do it through android studio.

As for IPA's... well let's say apple don't make it easy but I'll be revisiting it at some point.
Scirra Employee
B
5
S
2
Posts: 124
Reputation: 871

Post » Mon May 22, 2017 2:23 pm

How do we add additional plugins? How about custom plugins?
B
5
S
1
Posts: 13
Reputation: 401

Post » Mon May 22, 2017 4:19 pm

@sizcoz You probably found most of this out already but to sign an APK you need a developer private key, the unsigned apk, the apksigner tool and the zipalign tool. If you don't have a keystore file you need keytool from the JDK to create one. Both apksigner and zipalign are part of the androidSDK. I can't remember exactly but I expect even a signed release build must go via the play store to install, so debug APK's are the way to go unless your publishing.

@Nepeo

First I would like to say thank you for your response.
It's nice and reassuring to know someone is working on this.
Background
I have several Apps/Games of which I need to maintain, bring new versions enhancements to.
These games were wrapped into an APK from Intel XDK.
Ok I have my .keystore file from these games, from XDK.
Problem
I need to sign these future versions, with whatever will work.?
I signed the release version with jarsigner and zipaligned it with Java SDK, Android SDK, Signed ok, and Aligned ok, from the command line, but was unrecognised on my mobile, I must be doing something wrong somewhere, as this is a tedious process, involving application permissions, incompatable Java versions, Etc, as you are probably aware.
Retro signing an APK with a Keystore is not possible in Android studio as far as I am aware, which means, as you say exporting your project into android studio and building and signing from there, a bit complex.
So essentially what I was asking is there a cohesive roadmap of intent, to try and bring an APK signing process to C3 when you have already have a valid .Keystore file, as you need this .Keystore signed to be able to update your existing apps/games.
Also is there intent to provide a service for maybe any new apps/games created in C3 to get a new .keystore, auto signed, with maybe using our login details from C3 for our Alias, and Keystore file Passwords, using these details would probably make this process less complicated.

Anyway, Thank you again for your earlier response.

EDIT

To be fair I don't mind doing this myself if Scirra provided a comprehensive tutorial, and I am sure most would go with that too.

Cheers
Bushy Ball\Boatman Bill\Sticky Web\Snake

Image ImageImageImage

During the gold rush it was a good time to be in the pick and shovel business
B
43
S
12
Posts: 241
Reputation: 5,045

Post » Mon May 22, 2017 7:19 pm

sizcoz wrote:@sizcoz You probably found most of this out already but to sign an APK you need a developer private key, the unsigned apk, the apksigner tool and the zipalign tool. If you don't have a keystore file you need keytool from the JDK to create one. Both apksigner and zipalign are part of the androidSDK. I can't remember exactly but I expect even a signed release build must go via the play store to install, so debug APK's are the way to go unless your publishing.

@Nepeo

First I would like to say thank you for your response.
It's nice and reassuring to know someone is working on this.
Background
I have several Apps/Games of which I need to maintain, bring new versions enhancements to.
These games were wrapped into an APK from Intel XDK.
Ok I have my .keystore file from these games, from XDK.
Problem
I need to sign these future versions, with whatever will work.?
I signed the release version with jarsigner and zipaligned it with Java SDK, Android SDK, Signed ok, and Aligned ok, from the command line, but was unrecognised on my mobile, I must be doing something wrong somewhere, as this is a tedious process, involving application permissions, incompatable Java versions, Etc, as you are probably aware.
Retro signing an APK with a Keystore is not possible in Android studio as far as I am aware, which means, as you say exporting your project into android studio and building and signing from there, a bit complex.
So essentially what I was asking is there a cohesive roadmap of intent, to try and bring an APK signing process to C3 when you have already have a valid .Keystore file, as you need this .Keystore signed to be able to update your existing apps/games.
Also is there intent to provide a service for maybe any new apps/games created in C3 to get a new .keystore, auto signed, with maybe using our login details from C3 for our Alias, and Keystore file Passwords, using these details would probably make this process less complicated.

Anyway, Thank you again for your earlier response.

EDIT

To be fair I don't mind doing this myself if Scirra provided a comprehensive tutorial, and I am sure most would go with that too.

Cheers


This is exactly my feeling towards CS3. I need up to date comprehensive tutorials so I don't have to search around just to properly make my games work on different appstore. I already know what CS3 can offer, but I need assurance that I can publish to the Appstore and/or Google Play without a hitch. That's why I don't want to dive yet paying $99 for C3 without knowledge of how I can incorporate it to my current and (future) games. My main concern really is publishing... to different app stores. Hope I Construct can solve this soon.
B
28
S
11
G
15
Posts: 47
Reputation: 9,533

Post » Tue May 23, 2017 2:05 pm

sizcoz wrote:@Nepeo

First I would like to say thank you for your response.
It's nice and reassuring to know someone is working on this.
Background
I have several Apps/Games of which I need to maintain, bring new versions enhancements to.
These games were wrapped into an APK from Intel XDK.
Ok I have my .keystore file from these games, from XDK.
Problem
I need to sign these future versions, with whatever will work.?
I signed the release version with jarsigner and zipaligned it with Java SDK, Android SDK, Signed ok, and Aligned ok, from the command line, but was unrecognised on my mobile, I must be doing something wrong somewhere, as this is a tedious process, involving application permissions, incompatable Java versions, Etc, as you are probably aware.
Retro signing an APK with a Keystore is not possible in Android studio as far as I am aware, which means, as you say exporting your project into android studio and building and signing from there, a bit complex.
So essentially what I was asking is there a cohesive roadmap of intent, to try and bring an APK signing process to C3 when you have already have a valid .Keystore file, as you need this .Keystore signed to be able to update your existing apps/games.
Also is there intent to provide a service for maybe any new apps/games created in C3 to get a new .keystore, auto signed, with maybe using our login details from C3 for our Alias, and Keystore file Passwords, using these details would probably make this process less complicated.

Anyway, Thank you again for your earlier response.

EDIT

To be fair I don't mind doing this myself if Scirra provided a comprehensive tutorial, and I am sure most would go with that too.

Cheers


As far as I'm aware this should all be completely possible provided you have the keystore. The requirements should be that the APK has the same package name, same signature, same signature type, higher version number and that it had zipalign applied to it.

I believe your right that you cannot "retrosign" an APK in android studio, but creating a new APK that is signed isn't all that scary.

This is the process I use for signing APK's from the build service via the command line. While testing the build service I've published project using these methods to the play store alpha release channel successfully and tested purchases on device.

METHOD A: Using apksigner

1. Export and build a release APK in Construct 3
2. Move the resulting APK into the same folder as your keystore (or close, you just need to know where they are)
3. Run the command
Code: Select all
zipalign -v -p 4 UNSIGNED_RELEASE.apk ALIGNED_UNSIGNED_RELEASE.apk

4. Run the command
Code: Select all
apksigner sign --ks MY_KEYSTORE --ks-key-alias KEYNAME--ks-pass pass:KEYSTORE_PASSWORD --key-pass pass:KEY_PASSWORD --out SIGNED_RELEASE.apk ALIGNED_UNSIGNED_RELEASE.apk


METHOD B: Using jarsigner

1. Export and build a release APK in Construct 3
2. Move the resulting APK into the same folder as your keystore (or close, you just need to know where they are)
3. Run the command
Code: Select all
jarsigner -keystore MY_KEYSTORE  -signedjar SIGNED_UNALIGNED_RELEASE.apk UNSIGNED_RELEASE.apk KEYNAME

4. Give the passwords for your keystore and key when prompted
5. Run the command
Code: Select all
zipalign -v -p 4 SIGNED_UNALIGNED_RELEASE.apk ALIGNED_RELEASE.apk


METHOD C: Using jarsigner and apksigner
You can apply both signing methods to the same APK, I won't give the full commands as they are derivatives of the ones above but the flow is roughly:

1. Sign with jarsigner
2. Align
3. Sign with apksigner


MY_KEYSTORE is the location of your keystore file
KEYNAME is the name of the key within your keystore that you use for signing, it's normally "production"
KEYSTORE_PASSWORD is the password for the keystore
KEY_PASSWORD is the password for the specific key, this is probably the same as your KEYSTORE_PASSWORD

Bear in mind that when using apksigner specifically and giving the passwords as options in the command they need the "pass:" prefix in front of them.

I'm not sure which of these methods intelXDK uses but I believe the signature method needs to match if your trying to update an application. So this may require some trial and error. I tested all 3 of these methods with space blaster on my local computer and all 3 installed from fresh on my phone and ran correctly. I'm using JDK 1.8.0_131 x64 and Android SDK Tools 25.2.3 (although that shouldn't matter).

As for our roadmap, I sorry but I can't officially announce what our exact plans are going forward for application signing. But I can say we intend to continue developing the build service.

@at09

C3 plugins can specify cordova plugins as export requirements, and these are currently not restricted when you export a cordova project. However, the build service itself has strict limitations on what plugins are allowed to be included. Any other plugins will be not be included when the project is built. If you intend to use 3rd party cordova plugins you will likely need to run cordova locally and build the APK yourself.
Scirra Employee
B
5
S
2
Posts: 124
Reputation: 871

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest