- In this lesson you will learn the following concepts
- The sample project used
- Opening the project
- Enabling the iOS platform
Lesson 4.1. Management application: Overview In this lesson you will learn the following concepts - Which project is used for this part?
- How to enable a platform?
In this lesson, we will develop an Android and iOS application that uses an HFSQL Classic database. In the previous lessons, we have already seen how to create projects. Now, we will work on an existing project that already contains the database and the data used by the application. | | |  | Note | In iOS and Android, only the HFSQL database is accessible in native mode. Both the Classic mode and the Client/Server mode are available. HFSQL Classic In HFSQL Classic mode, the data files are stored on the device (iPhone, iPad, Android phones or tablets). In this case, the application is stand-alone. No Wi-Fi or 4G connection is required. The data is stored in the device memory. The maximum storage size depends on the amount of memory on the device. If the data entered on the mobile device must be synchronized with a database on a server (HFSQL or other), a replication must be implemented (see Mobile data replication). In this part, we will develop an application that uses an HFSQL Classic database. |
| | |  | Note | HFSQL Client/ServerIn HFSQL Client/Server mode, no data is stored on the device. The data is stored on a machine on which an HFSQL server is installed.
To access this machine and the database, a means of communication with the server must have been enabled in the mobile application (Wi-Fi or 4G) to connect via the network or the Internet. Response times depend on the quality of the Wi-Fi or Internet network and the amount of data requested. The data will be accessed using Hxxx WLanguage functions and/or SQL queries. |
- Open the "WM Managing Products" project:
- Start WINDEV Mobile 28 if necessary.
- Go to the WINDEV Mobile home page (Ctrl + <).
- On the home page, click "Tutorial", then in "Part 4 - Development of an Android/iOS application", double-click "Android/iOS product management (Exercise)".
| | |  | Answers | A corrected project is available. This project contains the different windows that will be created in this lesson. To open the corrected project, go to the home page and click "Tutorial", then in "Part 4 - Development of an Android/iOS application", double-click "Android/iOS product management (Answers)". |
Enabling the iOS platform "WM Product Management" is a project intended to be used only on Android.. Since this application is also intended to be used on iOS, we will enable the iOS platform in the project. | | |  | Note | Reminder: Project configurations make it possible to define the different types of generations supported by the project: Android, iOS, component, etc, ... In cross-platform projects, project configurations allow you to generate the same application for multiple platforms. |
- To enable the iOS platform, simply create a project configuration:
- On the "Project" tab, in the "Project configuration" group, expand "New configuration" and select "iPhone/iPad application".
- The project configuration creation wizard starts. The wizard proposes to create an iOS platform. Go to the next step.
- Enter the platform information. Keep the default options and go to the next step.
- The wizard prompts you to choose the type of devices the project is intended for:
- Generate an application for all iPhones and iPads.
- Generate an application for all iPhones.
- Generate an application for all iPads.
- Generate an application for a specific device.
| | |  | Note | If the application is intended to be run on multiple iOS devices (phones with different sizes or resolutions, for example), it is recommended to use one of the following options: "Generate an application for all iPhones and iPads", "Generate an application for all iPhones" or "Generate an application for all iPads". |
- For this example, select "Generate an application for all iPhones".
- Go to the next step and validate the wizard. The iOS configuration is automatically created.
- You can check the new project configuration in the "Project explorer" pane:
- Expand "Configurations (iOS application)" at the top of the "Project explorer" pane.
- The two configurations are displayed:
- To select a specific configuration, double-click the desired configuration.
- The iOS configuration that was just created is automatically selected.
Let's now start developing the application. - For the rest of this tutorial, we recommend that you activate the Android configuration.
- Expand "Configurations (iOS application)" at the top of the "Project explorer" pane.
- Double-click the "Android application" configuration.
- The Android configuration is automatically selected.
| | |  | Note | The different images illustrating the lessons in part 4 have been created with the Android configuration. Slight differences may appear if you use the iOS configuration (especially in the Action Bar). |
|
|
|
|