Version: 1.0.0

Alpha WatchBenchTM
App User Interface


Overview
|
Editing
|
Buttons, etc., on the Screen
|
Share Commands
Top of Page
Overview
The WatchBench iPhone App runs as a normal app. It shows two windows on the screen, known as Window 1 and Window 2. The windows are displayed either one above the other (in portrait) or side-by-side (landscape). The border between the two windows may be adjusted by dragging the slider in the middle of the separator.

The main purpose of the WatchBench app is to edit and examine the files that make up a WatchBench project. These files are used by the WatchBench WatchKit extension to drive the WatchBench app running on Apple Watch.

The app works with one "project" at a time. A project consists of multiple files, all in one folder. You may have any number of projects, and switch between them.

Each window can display the contents of one file at a time. The name of the file is displayed in a header above the window. Tapping on the name in the header will bring up the list of files in the project, and allow you to select a different file for viewing.

Editing may only be done in Window 1. There is a button on the right side of the header that may be used to open the file for editing. You may also double-tap on the text in the window to open for editing.

Files with the extensions ".txt", ".html", ".css", ".js", ".error", ".statuscode", and ".request" will be displayed as text files in either window and may be edited in Window 1. Files with the extensions ".png", ".jpg", ".pdf", and many others, will be displayed in a viewer and may not be edited. Files with unknown file extensions will have the beginning of the file contents displayed in hex dump format.

To aid in debugging, Window 2 has an Auto Refresh toggle button in the header. When enabled, Auto Refresh causes WatchBench to check for changes to the file about once every second. If there is a change, the window will be reloaded and be scrolled down to the end. This is very helpful for following log files when the project is running.

Help files may be displayed in Window 2.
Top of Page
Editing
When a file is opened for edit in Window 1 the on-screen keyboard normally is displayed. Right above the keyboard, a horizontal, scrolling list of buttons will be shown. This is called the AWBKeysList. It consists of buttons to perform various operations, like Undo, Redo, move cursor right/left, Copy, and Paste, as well as buttons to insert common characters and sequences that are tedious to type on the on-screen keyboard.

While the on-screen keyboard can be used quite well to create and edit files, especially when used in conjunction with the AWBKeysList, many people will find it more comfortable to edit using a physical keyboard. This can be easily accomplished on the iPhone by using a wireless keyboard, such as the Apple Wireless Keyboard. That keyboard supports normal typing, as well as arrow keys, and many Command-combinations for moving the cursor and copy/paste. You can close and open the on-screen keyboard from the physical keyboard with the "Eject" button in the upper-right of the keyboard. The AWBKeysList is still active, at the bottom of the screen, when using a physical keyboard.

In addition to using a physical keyboard, some people find it helpful to connect an external screen to the iPhone, either by AirPlay or an adapter and cable, and then use mirroring.

The header of Window 1 gives indication of the state of editing. The name of the file turns from blue to yellow during edit, with an "*" shown if the file is modified but not yet saved.

If the first line of a file being displayed in Window 1 of the iPhone app is "{" or "[", then WatchBench assumes that it should be in JSON format. When you save any changes, WatchBench attempts to parse the JSON. If there is an error, then "JSON error" is shown in red next to the filename in the window header.

Top of Page
Buttons, etc., on the Screen
This is a list of the components that make up the screen of the WatchBench app.
Window 1 Header
This normally displays the name of the current project, followed by the name of the file being viewed or edited. On the right, it shows an "Edit" button if the file may be edited, or "Cancel" and "Save" buttons if the window is editing a file.

Tapping the part of the header with the project and file names will bring up the list of files in the project.
Window 1 File List Header
When the list of a project's files is displayed in Window 1, the name of the project will be displayed in the middle of the header. Tapping that name will return to viewing a file.

Tapping a row in the list of a project's files will switch to viewing that file in Window 1.

The left side of the header has a "<Project" button. This will change Window 1 to display the list of projects.

The right side of the header has an "Edit" button and a "+" button. The Edit button enables editing of the list of files, such as to delete a file (red button) or rename it (tap on the name). The "+" button creates a new, blank file.
Window 1 Project List Header
When the list of a projects is displayed in Window 1, the word "Project" will be displayed in the middle of the header. Tapping that name will return to viewing a file.

Tapping a row in the list of projects will switch to viewing that project in the WatchBench app. No file will be chosen for Window 1, and the index.html file will be open as the Project Web App in Window 2. You can then use tapping on the two headers to change the file being displayed. The project the watch uses is NOT reset by doing this -- it is only reset when the Reset Watch button is tapped.

The right side of the header has an "Edit" button and a "+" button. The Edit button enables editing of the list of projects, such as to delete a project or rename it. There is NO UNDELETE, so be careful about deleting projects. You may want to use the Share button to save a copy of the project somewhere first.

The "+" button creates a new project with default content.
Window 2 Header
This normally displays the name of the name of the file being viewed. On the right, it shows an "Auto Refresh" button if the file may be monitored for changes.

If Window 2 is displaying the Project Web App (index.html) running in a web view, "Running index.html" will be displayed and there will be a Reload button on the right to reload the contents of the web view.

If Window 2 is displaying a Help file, "Help:" will be displayed followed by the name of the help file. There will be an "X" button on the right to return from Help to what was being previously viewed in Window 2.

Tapping the part of the header with the file name will bring up the list of files in the project.
Window 2 File List Header
When the list of a project's files is displayed in Window 2, the name of the project will be displayed in the left of the header. Tapping that name will return to what was being viewed in Window 2.

Tapping a row in the list of a project's files will switch to viewing that file in Window 2.

Tapping the row entry for "Run index.html" will load index.html into the Project Web App web view and display it.
Window 2 Help List Header
When the list of a Help files is displayed in Window 2, the word "Help" will be displayed in the left of the header. Tapping the header will return to what was being viewed in Window 2.

Tapping a row in the list of Help files will switch to viewing that file in Window 2.
Window 2 Help File Header
When a Help file is displayed in Window 2, "Help:" and the name of the file will be displayed in the left of the header. Tapping the header will display the list of files. Tapping the "X" button in the right of the header will return to viewing the file that was in Window 2 before help.
Reset Watch button
Tapping the Reset Watch button on the bottom left of the screen indicates to the WatchBench WatchKit extension that it should reset itself and start anew with the project currently being viewed.

The switch will occur the next time a page is activated on the watch. You can force this by either turning your wrist or by going to the home screen and relaunching the app or Glance.
Help button
Tapping the Help button on the bottom middle of the screen switches Window 2 to show a list of help files. Tapping on a file listed there will switch Window 2 to display the contents of the Help file in a web view.
Share button
Tapping the Share button on the bottom right of the screen brings up a menu of Share commands. The share commands are listed below.
Top and Bottom buttons
When viewing a text file in either window, buttons appear in the right side of the window that will scroll the display to the top or bottom of the file.
Top of Page
Share Commands
These are the commands in the Share menu. Some commands are only available when a file is being viewed in Window 1.
Copy filename
The filename will be the name of the file being viewing in Window 1.

This command copies the contents of the file to the iPhone pasteboard. It is only shown for files that may be edited.
Duplicate filename
The filename will be the name of the file being viewing in Window 1.

This command makes a duplicate copy of the file in the current project. A number is appended to the name to make it unique. You will be given an opportunity to rename it. Canceling the rename will remove the duplicate.
Duplicate Project
This command creates a new project with copies of all of the files in the current project. It will be given a unique name based on the name of the current project.
Email Project
This command creates a single file with the extension ".awbs" that contains the entire contents of the current project folder. It then opens up the iPhone Mail program with that file as an attachment.

If you select an attached file with the extension ".awbs" in Mail, a new project will be added to WatchBench (if it is installed on that iPhone) and those files will be included in it.

This is an easy way to do backup.

Note that a copy of the ".awbs" file will be placed in the "Documents" folder accessible in iTunes on a personal computer connected to the iPhone on the Apps tab at the bottom for WatchBench. Older files with the same name are overwritten. If you cancel out of Mail, this file is still created.

Note that these iTunes File Sharing files, as well as all files in all projects, are deleted if you uninstall WatchBench from the iPhone. They should be copied elsewhere on the personal computer if you want to use them as backup.
Email filename
The filename will be the name of the file being viewing in Window 1.

This command launches the iPhone Mail program with the file as an attachment.
Email Project as Separate Files
This command launches the iPhone Mail program with all of the files as attachments.
New File From Photos
This command allows you to select an image from the iPhone Photos and make a copy as a file.
Top of Page