PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV Mobile 26 feature!
  • In this lesson you will learn the following concepts
  • Overview
  • Generating the Android application
  • Generating the iOS application
  • Transfer the WINDEV Mobile project to the Mac
  • Compile the project in Xcode
Lesson 4.8. Deploying the application
In this lesson you will learn the following concepts
  • Generating the Android application.
  • Generating the iOS application.
Lesson duration

Estimated time: 20 mn
Previous LessonTable of contentsNext Lesson
Overview
That's it, our application is complete. To test it, we must compile it and install it on the device.
We will see how to deploy the application to Android and iOS..

Note

If you do not have both types of devices, follow the instructions for your device.
Generating the Android application
  • To generate the Android application:
    1. If necessary, select the Android platform in the "Project explorer" pane.
    2. On the "Project" pane, in the "Generation" group, click "Generate" (you can also click Generate the Android application among the quick access buttons).
    3. The Android application generation wizard starts.
    4. The first step of the wizard is to select the application generation mode. The generation format may change depending on the mode selected.
      For this tutorial, select "Generate for free deployment (corporate fleet, private store, etc.)". Go to the next step.
    5. The next step of the wizard is to check the tools needed to generate the Android application.
      Android generation wizard
      The wizard proposes to:
      • Download and automatically install the Android SDK and Gradle: in this case, you will only have to validate the license. WINDEV Mobile takes care of everything. If an update is available, the generation wizard will prompt you to perform the necessary updates. Only an Internet connection is required.
      • Use the tools automatically installed. This option is available if the tools have been downloaded and installed during a previous generation.
      • Specify the location of the tools already installed on your computer. In this case, all you have to do is specify the setup paths of Gradle and Android SDK.
    6. Select the option corresponding to your configuration and go to the next step.
      Remark: If you have chosen to download and install the tools, going to the next step may be quite long and you may have to validate the license.
    7. Go to the next step by clicking the arrows at the bottom of the wizard. The next step of the wizard allows you to:
      • define the application name (displayed below the icon used to start the application) and the corresponding package.
      • select the application icon in the image catalog of WINDEV Mobile ("stock" in the "Flat Soft" theme for example).
      • define the email address used by default to send an error report if necessary.
        General information
    8. Go to the next step. This step is used to define:
      • the splash screen of the application,
      • the information saved in the manifest,
      • the start mode of the application (when starting the device or not).
    9. Go to the next step. The wizard allows you to define the version number of the application.
    10. Go to the next step. This step is used to sign the application. The wizard proposes a generic signature that can be used for the application tests. A specific signature is required to distribute the application.
      For more details, see Generating an Android application.
    11. Go to the next step. As we have chosen to generate the application for a fleet of devices, the wizard proposes to choose the type of devices. Keep the default options.

      Note

      If you have a device connected to the PC, use "Detect hardware automatically". Thus, next time an application is generated, this type of device will be automatically selected.
    12. The next step is used to include the data files in the application. For our example, pre-filled HFSQL data files are available. They will be provided with the application. In this case, they must be specified in the "Integrating files" step
      • Click the "Add" button.
      • Select the data files (.fic, .ndx and .mmo) in the "EXE\Android application" directory of the project. The list of files is displayed.

        Note

        If your project only uses the Android platform, the files must be selected in the EXE directory of the project.
    13. Check the "Write" box for each file (required to be able to modify data from the application).
      Integrate files
    14. Go to the next step.
    15. Validate the other steps until you reach the "Configuration" step that is used to configure the options of Android SDK and the setup location.
      Configuration of SDK options
    16. Go to the next step.
    17. This step is specific to the use of Map controls. It is used to enter the key required to use the Map control. If you own a Google Maps API key, type it. Otherwise, click "Get a key".
      Configuration of the Map control
    18. Go to the next step.
    19. Finish the wizard. The generation is automatically performed in the background. The Generating icon indicates that the generation is in progress.
    20. When the generation is ended, a popup window appears in the editor:
      Completed generation
    21. To copy and run the application on the device linked to the computer or on an emulator, click “Deploy”.
    22. A new window is displayed, allowing you to select the runtime device. If you own an Android device connected to the development computer, select the device connected to the PC.

Note

If the device is not connected to the development computer, you must:
  1. Connect the device to the development computer.
  2. In the explorer, open the generation directory of the apk file corresponding to the Android application.
  3. Copy the apk file into the "Download" directory of device.
  4. Unplug the device.
  5. Start the application for file management on the device.
  6. Go to the "Download" directory and run the apk file. The application is automatically installed.
Generating the iOS application
  • To generate the iOS application:
    1. If necessary, select the iOS platform in the "Project explorer" pane.
    2. On the "Project" pane, in the "Generation" group, click "Generate" (you can also click Generate the iOS application in the quick access buttons).
    3. The iOS application generation wizard starts.
    4. The wizard is used to:
      • define the application name, the company and the copyright.
      • enter the bundle identifier.

        Note

        This identifier is the unique identifier of your application for Apple. It is defined and registered on the Apple developer account.
        This identifier will allow you to register your application so that it can be tested and deployed. By default, WINDEV Mobile automatically proposes an identifier that respects the development standard of Apple. This identifier can be modified.
      • define the email address used by default to send an error report if necessary.
        iOS application generation wizard
    5. Go to the next step.
    6. You can specify the path of the different application icons for each type of device.
    7. Go to the next step.
    8. Specify the characteristics of the splash screen.
    9. Go to the next step.
    10. Specify the version number of the generated application.
    11. Go to the next step.
    12. This step is used to include specific files (data files, images, etc.).
      • Click the "Add" button.
      • Select the data files (.fic, .ndx and .mmo) located in the "EXE\iOS application" directory of the project. The list of files is displayed.
        Files to include
    13. Indicate that these data files must be in write mode: check the "Write" box.
    14. Go to the next step.
    15. The wizard allows you to specify:
      • whether the application is allowed to be resized or not (Split View). The option allows the end user to display two windows of two different applications side by side on some devices.
      • whether files can be shared with iTunes. If this option is checked, you can copy the application files to the Mac during the synchronization. For example, if the application contains data files, iTunes will allow you to copy these files.
      • the minimum iOS version required to run the application.
        Configuration
    16. Go to the next step. This step is used to specify the signature options for Xcode.
      For more details, see Signature of iOS applications.
    17. Validate the wizard.
    18. The generation is performed in the EXE folder of the project directory. The name of the directory containing the source code that will be used on the Mac is "Project_name.xcode.gen" ("WM Product Management.xcode.gen" in our example). This is the directory that must be copied to the Mac. Click "Open generation directory".
The other operations must be performed on Mac. You must:
  • Transfer the WINDEV Mobile project to the Mac.
  • Compile the project in Xcode.

Transfer the WINDEV Mobile project to the Mac

  • To transfer the WINDEV Mobile project to the Mac:
    1. Copy the entire folder generated in the EXE directory to an external location (USB drive, external hard disk, shared directory with Mac on network). The name of this directory is <Project name>.xcode.gen.
    2. Paste this folder on the Mac that will compile the application.
    3. Open the folder on Mac and open the file “Project_name.xcodeproj”.
    4. The project is opened in Xcode.

Compile the project in Xcode

WINDEV Mobile automatically generates an Xcode project for your iOS compilations. To simplify the implementation of applications, WINDEV Mobile generates a “Scheme” for Xcode.

  • To compile the project in Xcode:
    1. Select the compilation options from the drop-down list in the upper-left corner. Select the scheme corresponding to your application then the compilation target (device currently connected or a simulator).
    2. To start the compilation, select "Product .. Clean" then "Product .. Build".
    3. A compilation status report appears at the top ("Succeeded", or the number of warnings and errors). You can click these symbols to see the list of errors/warnings.
    4. Once the program has been compiled without errors, you can start the simulation (select "Product .. Run"). The simulation window appears with the application.
You can then test your application directly on your iPhone or iPad.
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 26
Comments
Click [Add] to post a comment