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 the device, the GMI front-end must be installed on your
iOS devices (or emulators).
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 and 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 Mac OS/X
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:
- Make sure that the gmibuildtool is available (if not done yet, extract the
fjs-fglgmi*.zip archive into FGLDIR).
- Go to the FGLDIR/demo/MobileDemo/gmiclient directory.
- Delete the complete build directory if it exists (can be done with a
make clean command).
- Make the GMI app with make (program files like main.42m
file must exist).
- Build the GMI front-end:
- To build only the GMI front-end (GMI.app directory) for the simulator,
execute the gmibuildtool command without any
parameter:
$ gmibuildtool
- 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
gmibuildtool command with following
parameters:
$ gmibuildtool --device booted
- To build only the GMI front-end IPA for devices, get a development certificate and provisioning
profile and execute the gmibuildtool command with following
parameters:
$ gmibuildtool \
--device phone \
--certificate "iPhone Developer" \
--provisioning "~/Library/MobileDevice/Provisioning Profiles/myapp.mobileprovision"
The
generated IPA file can be found in the build subdirectory. This IPA file can be
installed on your devices by using iTunes.
- To build and install the GMI front-end on the device plugged to your Mac, get a development
certificate and provisioning profile, and the exact device name (with the instruments
-s command) and execute the gmibuildtool command with following
parameters::
$ gmibuildtool \
--device "Mike's iPhone 6 (9.0)" \
--certificate "iPhone Developer" \
--provisioning "~/Library/MobileDevice/Provisioning Profiles/myapp.mobileprovision"
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.