SPL Templates
MobileTogether Designer uses Spy Programming Language (SPL) templates to generate the various files of the program code that is used to build AppStore Apps for Android, iOS, and Windows.
•The SPL templates are delivered with your installation of MobileTogether Designer and are located in the folder C:\Program Files (x86)\Altova\MobileTogetherDesigner10\MobileTogetherSPL.
•The SPL templates use variables that are tied to information that you enter in the Generate Program Code Wizard.
So, if you need to modify the program code in any way, you should not modify the generated code directly. Instead, you should modify the SPL templates that generate the code. This way your modifications will not be lost if you were to re-generate program code from the templates. This section explains how the SPL templates work and what you can edit in them.
Location of the SPL templates
The SPL templates are located in the MobileTogether Designer application folder:
C:\Program Files (x86)\Altova\MobileTogetherDesigner10\MobileTogetherSPL
This folder contains entry-point SPL templates for each app format (Android.spl, iOS.spl, WindowsApp.spl, and WindowsPhone.spl), a common library SPL template (CommonLibrary.spl, which must not be modified), and a folder for each app format that contains additional SPL templates for that format. Inside the folder for each app format is a ZIP file and the SPL template files for that app format.
Each SPL file is a template that can generate a number of project files and call other SPL files. When creating an Android Studio project, for example, MobileTogether Designer begins by processing Android.spl (in the SPL template directory). This SPL file in turn calls other SPL files, which then generate other project files and call other SPL files. These SPL template files are the files that you can modify to alter the generated program code. They are written using SPL syntax and SPL instructions, which are described in the sub-sections of this section.
Using the SPL templates to modify program code
The steps to customize generated program code are as follows:
1.Copy either the entire SPL template directory (or only the templates you wish to modify) to a directory of your choice. In this way a re-installation of MobileTogether Designer will not overwrite your customized SPL templates. Note that the copy of the directory must have the same structure as the original directory.
2.Modify the SPL files as required.
3.Run the Generate Program Code Wizard with the modified SPL templates. In Screen 5 of the Generate Program Code Wizard, specify the location of the directory containing your customized SPL templates.
The program code will be generated according to your customized templates.
In this section
This section is organized as follows: