Publishing V-Play Games & Apps

Publishing Overview

This tutorial will guide you step-by-step on how you can build your game ready for publishing.

Note: This guide assumes that you already built your game and deployed it to a test device once, meaning that all tools are set up successfully. For a guide how to deploy your games to test devices, see Deploying V-Play Games & Apps.

V-Play License

To publish your game, you need a valid V-Play license.

With your V-Play account, you can then generate a GameWindowItem::licenseKey for your game. Go to https://v-play.net/developers/license/ to create a key.

Note: You also need to create a licenseKey if you are in the V-Play Free Plan. If you upgrade your license, create a new licenseKey after purchasing a V-Play license.

Use the same appIdentifier and versionCode on all your platforms. These are the files to look at:

  • In the config.json file in the qml folder for desktop platforms, as identifier and versioncode.
  • In the Project-info.plist file in the ios folder, as CFBundleIdentifier and CFBundleVersion. Also see Set iOS Bundle Identifier.
  • In the AndroidManifest.xml file in the android folder, as manifest package="" and android:versionCode="" attribute. Also see Set Android Package Identifier.

Every time you update a new version of your game to the app stores, increase the versionCode in these 3 files and generate a new licenseKey for the updated version.

You can also see appIdentifier and versionCode of your game when you run a development build: it is displayed as a white overlay text on the bottom of the screen.

Note: Make sure to only publish a Publish Build in Release Mode of your application. Otherwise your game will stop working once your license has expired and you will continue to see the white debug text on the bottom with your appIdentifier debug information.

Publish Builds

To enable a Publish Build, set "stage": "publish" in your config.json file in the qml folder and build a Release Build from Qt Creator. Publish Builds have a better performance, disable logging so your app cannot be introspected, and they will continue working when your V-Play license is expired. So if you released a game in the app stores and later your license expires, you do not need a new license. For submitting a new game or a an updated version with increased versionCode of your existing game to the app stores, you will need a valid V-Play license to generate a new licenseKey.

Protect your Source Code with the Qt Resource System

With V-Play, you can easily protect the source code of your app. V-Play supports to compile your QML and JavaScript files to your application binary. This makes your IP (Intellectual Property) inaccessible for external use and piracy.

Note: With the default settings in your .pro file, your QML and JavaScript files are not protected. In order to protect them, follow the next steps.

Follow these steps to protect your source code with V-Play:

  1. Remove or comment the line DEPLOYMENTFOLDERS += qmlFolder from your .pro file, to avoid shipping your qml files with the application (instead they get compiled to the app binary with the next step).
  2. Create a .qrc file similar to the ones from the V-Play demos or from a V-Play application wizard. If you created subfolders in the qml folder, add them to the .qrc file. See the qrc files of the V-Play demos for a reference, for example of the Squaby Demo in <QtSDK>/Examples/V-Play/demos/Squaby/resources_Squaby.qrc.
  3. Enable RESOURCES += resources.qrc in your .pro file.
  4. Set the main qml file to "qrc:/qml/Main.qml" in your main.cpp file.
  5. Call qmake and re-build your project.

The V-Play approach to support both DEPLYOMENTFOLDERS and the Qt Resource System (qrc files) has the following benefits:

  • During development, you can re-run an application when you disable the shadow build option. This saves the time for re-compilation and allows much faster application startup times. Note: This only applies when you change QML or JavaScript files - a change of C++ files always requires a new compilation of your project.
  • Your assets and code are separated. The assets are always deployed with DEPLOYMENTFOLDERS to prevent issues with playing audio files from resources. We also solved the issue that qrc has problems with large assets packs (in our tests assets files bigger than 50MB stalled the qrc compilation process).
  • V-Play abstracts the file access for you, i.e. you dont need a prefix assets:/... for your images, or mix up your code with any qrc:/... prefixes. Just enter the relative directory from your qml file like ../assets/img.png in your qml game code, and the file access automatically works with both deployment methods, qrc and DEPLOYMENTFOLDERS.

For more details about the decision to support both qrc and DEPLOYMENTFOLDERS, see this Qt Project Forum Thread and our comments at the Qt Blog Post about Qt Creator 3.1 Release.

Publishing in iOS App Store

Prepare Your iOS Project

If you created your project with one of our project wizards you are almost ready for building your project for distribution. Please adapt the following settings to your game's need:

Set iOS App Icon

Our project wizard comes with a set of default app icons. To replace them with your own simply open the ios subfolder within your project's root folder and replace all images named icon-*.png with your own, preserving the image sizes.

Set iOS Bundle Identifier

The project wizard prefilled the bundle identifier with the one you provided during creating the project. If you want to adapt it simply open the file Project-Info.plist in the ios subfolder within your project's root folder and change the string within the <string> tag below the <key>CFBundleIdentifier</key> tag, e.g.

 ...
 <key>CFBundleIdentifier</key>
 <string>com.mycompany.mygame</string>
 ...

Set iOS Version Number

Every new iOS version published in the iOS App Store needs an incremented version number. Make sure to adapt the version number for the following keys in the Project-Info.plist in the ios subfolder within your project's root folder, e.g. to set the version number for release 1.3 adapt following lines to:

 ...
 <key>CFBundleVersion</key>
 <string>3</string>
 <key>CFBundleShortVersionString</key>
 <string>1.3</string>
 ...

Note: The CFBundleShortVersionString is the public version number shown to users, the CFBundleVersion is only used internally and should be an incremented integer value for every release (1, 2, 3, ...).

Build Your iOS Project For Distribution

Your project is now ready for building a binary for distribution. This involved two major steps:

Create the Xcode project

  1. Open your project in Qt Creator and select the iphoneos-clang Qt 5.4.x for iOS target (please note the *os instead of *simulator) and the release option like illustrated here:

  2. Run Clean Project and Run qmake from the Build menu. This creates an Xcode project in your shadow build directory, usually beside your project's directory named build-XYZ-iphoneos_clang_Qt_5_3_x_for_iOS-Release (please note again the *os name).

Prepare Your Apple Developer Account

Before you are able to build and upload your app perform the following steps:

  1. Get an Apple Developer Account (use an existing Apple ID or create a new one), select if you want to register as an individual or as company, enter your contact information and then select the “iOS Developer Program".

    The iOS Developer Program costs $99 per year, for a successful registration a valid credit card (and if enrolling as a company a D-U-N-S number) is required. After applying for the program Apple checks your information, this step usually takes five to ten business days.

    Note: For more information on program enrollment please have a look at Program Enrollment.

  2. After you successfully enrolled in the iOS Developer Program it's now time to prepare a distribution certificate and a provisioning profile, which are required for App Store publishing.

    Login to the iOS Provisioning Portal using your credentials provided during signing up.

    Select “Certificates" in the left column and afterwards the tab “Distribution". Request a certificate as described under the tab “How To".

    Next be sure to create an explicit App ID for your game, this is needed if you're using one of the V-Play plugins. Be sure that the App ID matches the CFBundleIdentifier value you entered in your game's Project-Info.plist, otherwise you won't be able to upload your iOS app.

    After that you are finally able to create a distribution provisioning profile in the left column under “Provisioning" and the tab “Distribution". Again, be sure to have a look at the “How To" tab for further information.

    Finally download your certificate and provisioning profile created in the previous steps. Import the certificate (along with the "WWDR intermediate certificate" if not already done) in your macOS Keychain Access application and drop the provisioning profile on the Xcode icon in your dock (or simply double-click the file).

    These steps are likewise the most error-prone, if there are any problems check the Apple How To's, use Google or also ask your questions in our support forums. Especially this document provides a lot of background information and step-by-step guides.

  3. The next step is to create your application in iTunes Connect. Log in, click “Manage your applications", select the button “Add New App" and provide the requested Meta information about your app.

    If you're using the V-Play GameCenter plugin or connected your game with VPlayGameNetwork for cross-platform leaderboard and achievements support, this is now the right time to configure your leaderboards and achievements.

    Now click the button “Ready to Upload Binary". For more information on how to add a new app entry to iTunes Connect have a look at the Developer Guide.

Build the Xcode project

  1. Open the generated Xcode project in your shadow build directory, usually beside your project's directory named build-XYZ-iphoneos_clang_Qt_5_3_x_for_iOS-Release.
  2. Set your distribution provisioning profile from the previous steps by selecting your project in the project tree, select your build target and set the profile from the release drop down menu:

  3. Make sure to select the iOS device item (or your device if anyone plugged into your Mac, like the "iPad Mini" in the screenshot above) in the upper left menu.
  4. Select Archive from the Build menu. If all was successful Xcode's Organizer window opens and you can upload your game by hitting the Distribute... button.

    Click "Distribute", select the first option "Submit to the iOS App Store", provide your iTunes Connect credentials, select the previously imported distribution provisioning profile for signing and then finally upload your app.

If all steps were successful all you have to do is to wait for Apple to review your uploaded game. Typically, this lasts about 7 days.

Make sure to send us a link to your game as soon as it is available in iOS App Store and post it to our Announcements Forum, so we can help you promote your game.

Publishing in Google Play Store

As a first step get a Google Play Developer Account (there is a one time $25 registration fee and you need a Google Checkout account too, which is free of charge).

Prepare Your Android Project

If you created your project with one of our project wizards you are almost ready for building your project for distribution. Please adapt the following settings to your game's need:

Set Android App Icon

Our project wizard comes with a set of default app icons. To replace them with your own simply open the android/res subfolder within your project's root folder and replace all images named ic_launcher.png in their respective subfolders with your own, preserving the image sizes.

Set Android Package Identifier

The project wizard prefilled the package identifier with the one you provided during creating the project. If you want to adapt it simply open the file AndroidManifest.xml in the android subfolder within your project's root folder and change the string within the <manifest package="" ... attribute, e.g.

 <manifest ... package="com.mycompany.mygame" ...

Note: You can also use Qt Creator's built-in editor by opening the AndroidManifest.xml file within the editor.

Set Android Version Number

Every new Android version published in the Google Play Store needs an incremented version number. Make sure to adapt the version number for the following attributes in the AndroidManifest.xml in the android subfolder within your project's root folder, e.g. to set the version number for release 1.3 adapt following lines to:

 <manifest ... android:versionName="1.3" android:versionCode="3" ...

Note: The android:versionName is the public version number shown to users, the android:versionCode is only used internally and should be an incremented integer value for every release (1, 2, 3, ...).

Build Your Android Project For Distribution

Your project is now ready for building a binary for distribution. This involved the following steps:

  1. Open your project in Qt Creator and select an Android target and the release option like illustrated here:

  2. Select your existing Android signing keystore or create a new one within the Projects - Android Kit - Run - Deploy configurations pane:

    Note: Please keep your private key secure and create a backup in a safe place, if you lose it you are not able to update your game in the future! For more information on the keystore and certificate have a look at the official Android guide.

  3. For convenience you can also select Open package location after build.
  4. Run Clean Project and Run qmake from the Build menu and finally build your project. Qt Creator builds the .apk and opens the folder containing the .apk.
  5. Finally you can upload your Android game according to Google's upload guide.

If all steps went successfully your V-Play powered game can be found in Play Store within a couple of minutes.

Official Android Qt Guides

For further information please also have a look at:

Make sure to send us a link to your game as soon as it is available in Android App Store and post it to our Announcements Forum, so we can help you promote your game.

Videos

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support