Genero mobile development client for iOS

Set up a development environment to display app forms on an iOS device.

Installing the GMI front-end on iOS devices

To display Genero application forms on a device, the GMI front-end must be installed on the iOS device (or emulator).

Genero supports two types of GMI front-end apps for iOS:
  • The ready-to-use "Genero Mobile Development Client" for iOS, available through the App Store.
    Important: Due to Apple® limitations, the Genero Mobile Development Client app is not allowed to listen to a TCP port to provide a GUI service. In order to establish the GUI front-end connection, the front-end must connect to the runtime system running on the development machine.
  • A self-made GMI front-end, using the gmibuildtool to build a GMI front-end app with your own Apple developer account.
    Note: With this configuration, you can perform a classic GUI connection based on FGLSERVER.

Using the Genero Mobile Development Client for iOS

Go to the App Store. Search for "Genero Mobile". Select and install the "Genero Mobile Development Client".

Once the GMI development client is installed on the device, make sure that WIFI is enabled and start the GMI app.

Note: Because of iOS app limitations defined by Apple, an app shipped on the App Store cannot listen to a TCP port to provide a GUI service. In order to display Genero form on the GMI development client, you will have to establish the GUI connection from the device to the server, after starting the fglrun process with the --gui-listen option.
The main GMI screen shows a URL field to let you enter the IP address / hostname and the TCP port the runtime system will listen to.
Note: Make sure that the firewall on the development machine allows incoming connections for the TCP port number specified with the --gui-listen fglrun option.
Start the application on the development server, by using the fglrun --gui-listen=portnum command:
fglrun --gui-listen=6500 main.42m
On the iOS device, enter the following in the URL field:
fgl://dev-server-hostname:6500

Then tap the [Connect] button to establish the GUI connection.

Build your own GMI front-end

In order to use the classic GUI connection mode with fglrun connecting to the mobile front-end via FGLSERVER, it is possible to create your own GMI front-end, with your own Apple certificate and provisioning profile.

Note: As with other iOS apps, a self-made GMI front-end can only be created on a macOS®computer.

The generated GMI can then be deployed on your device or simulator. The GMI front-end will listen on the port 6400, to display applications running on a server through the FGLSERVER setting.

Before creating your own GMI front-end, fullfill the prerequisites to build an iOS app as described in Building iOS apps with Genero.

In order to build your own GMI front-end:
  1. Your macOS computer must be setup with Xcode® and Genero BDL environment as when creating of Genero Mobile for iOS apps. For more details, see Install Genero Mobile for iOS (single version).
  2. Make sure that the installed the fjs-gmi*.zip archive into FGLDIR.
  3. Go to the $FGLDIR/demo/MobileDemo/gmiclient directory.
  4. Delete the complete build directory if it exists (can be done with a make clean command).
  5. Compile the GMI front-end program files (main.42m, main.42f, etc): See Makefile for details.
  6. Build the GMI front-end:
    • To build and install the GMI front-end on the simulator, first make sure that the simulator is started (open -a Simulator command), then execute the make command with the gmi.install rule:
      $ open -a Simulator
      $ make gmi.install
    • To build and install the GMI front-end on the device plugged to your Mac, get a development certificate (for the IDENTITY makefile variable) and provisioning profile (for the PROVISIONING_PROFILE makefile variable), then execute the make command with the gmi.install rule, by specifying the TARGET, the IDENTITY and the PROVISIONING_PROFILE variables:
      $ make TARGET=phone IDENTITY=WKRRJZ999 \
          PROVISIONING_PROFILE="~/Library/MobileDevice/Provisioning Profiles/myapp.mobileprovision" \
          gmi.install

Once the GMI front-end is installed on the device, make sure that WIFI is enabled and start the GMI app.

The main GMI screen shows the IP address of the device and the TCP port it is listening to (0=6400).

On the development machine, define the FGLSERVER environment variable with the IP address of the device.

Now you are ready to run your app on the server and display on the iOS device.

Enabling Universal Rendering

Universal Rendering can be enabled by using the gui.rendering FGLPROFILE entry.