Getting the formatting right may be tricky, but you can create the template by running the command: "create /sys application template testing123" where "testing123" is the name of your iApp template.
You will be presented with a vi interface with the following populated:
create template testing123 {
actions replace-all-with {
definition {
html-help {
}
implementation {
insert tmsh script
}
macro {
}
presentation {
insert apl script
}
}
}
description none
requires-bigip-version-max none
requires-bigip-version-min none
requires-modules none
}
You can manually format the contents of your iApp into that form. You'll have to use the vi commands to "write" and "quit" after which you'll be prompted to save the configuration - whereon validation of your template will commence.
Secondarily, an easier way to do it might be upload the file using iControl. Joe Pruitt has a nice write up around managing iApp templates with iControl here: https://devcentral.f5.com/articles/managing-iapp-template-files-with-icontrol.