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

0 favourites
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • 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

  • 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!

  • 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.

  • 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

    [quote:23gdo7rq]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.

  • 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....

  • 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.

  • How do we add additional plugins? How about custom plugins?

  • 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

  • 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.

  • 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

    zipalign -v -p 4 UNSIGNED_RELEASE.apk ALIGNED_UNSIGNED_RELEASE.apk[/code:2xywc8t8]
    4. Run the command [code:2xywc8t8]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[/code:2xywc8t8]
    
    METHOD B: Using [b]jarsigner[/b]
    
    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:2xywc8t8]jarsigner -keystore MY_KEYSTORE  -signedjar SIGNED_UNALIGNED_RELEASE.apk UNSIGNED_RELEASE.apk KEYNAME [/code:2xywc8t8]
    4. Give the passwords for your keystore and key when prompted
    5. Run the command [code:2xywc8t8]zipalign -v -p 4 SIGNED_UNALIGNED_RELEASE.apk ALIGNED_RELEASE.apk[/code:2xywc8t8]
    
    METHOD C: Using [b]jarsigner [/b]and [b]apksigner[/b]
    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.
  • I was able to create a debug apk and run it on my device without any issues. iOS is another issue. I opened the project, Ghost Shooter Tutorial, in XCode and deployed to the iOS simulator. It runs but I end up with just a black screen in the simulator. I tried other unaltered samples from the home page with the same result. Any ideas would be greatly appreciated.

  • Unfortunately the debug APK wont work on my mobile, just says "cant open file"

    install from unknown sources is set to on.

    As a reference, it installs from XDK builds, without a hitch.

    Android 6, Moto G (4Lite)

    Just as a reference, Construct3 will not work on my mobile also, after downloading spritesheets,

    I always get "Aw Snap", probably a memory issue.

  • rhg1968 I'll take a look in when I get to the office tomorrow, just finishing up for the day at the moment.

    sizcoz Just to sanity check, do you have developer mode enabled on your phone and did you select the correct version of Android for your device when you exported?

    It might be a memory issue, but I would find it surprising. I checked and your device should have 2GB of RAM, even taking into account the device being busy C3 generally uses less than 0.2 starting up and drops back fairly quickly. The only known major memory pinch point is during export.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • rhg1968 I'll take a look in when I get to the office tomorrow, just finishing up for the day at the moment.

    sizcoz Just to sanity check, do you have developer mode enabled on your phone and did you select the correct version of Android for your device when you exported?

    It might be a memory issue, but I would find it surprising. I checked and your device should have 2GB of RAM, even taking into account the device being busy C3 generally uses less than 0.2 starting up and drops back fairly quickly. The only known major memory pinch point is during export.

    Ok, got it to install !! Happy days.

    IMPORTANT!! You have to have a File explorer like Astro file manager to install an APK not from Google, otherwise you get a "can't open file", I think maybe pointing this out, will help.

    I also managed to sign and align.

    I signed with jarsigner from the Java Bin directory, also I made sure that I had my .Keystore file and my C3 APK in the same directory, to save any lengthy file pathnames.

    When in the Java Bin Directory hold down SHIFT & Right Click your mouse and choose Command Prompt.

    Use this Command at the prompt>

    jarsigner -verbose -keystore yourkeystorefilenamehere.keystore -storepass yourstorepasshere -keypass yourkeypasshere yourAPKhere.apk yourALIAShere

    Then the only way I could Align it was from a program called apk-signer, found here https://shatter-box.com/knowledgebase/android-apk-signing-tool-apk-signer/

    Following these steps seemed to work for me.

    Thanks again Nepeo

    Just Admob intergration, Play Services etc to go, and your on to a winner.

  • this key sign process needs to be more simple like the Cocoon.io is, just load your previous saved key and press build, no command lines needed. Maybe a option to create a new key too.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)