DraftCode Help

Importing files and folders into DraftCode
Exporting files
Renaming, copying, deleting, zipping files or folders
External keyboard support
Absolute file paths in PHP
Using URLs and accessing the DraftCode server
PHP versions and extensions
About included PHP packages
What is the phpMyAdmin database password?
Can I configure 'Run' to start with a specific file?
Pricing and the App Store environment

Bugreports and getting in touch...


Importing files and folders into DraftCode

By default DraftCode uses its internal document storage. You can use the DraftCode Settings Panel (available via the cogwheel button on the bottom left) to change the workspace folder location to any other available folder on your device. For example you can use a Git Client like WorkingCopy to be the workspace location, an iCloud Drive folder, or other service that offer selectable folder locations.

You can import files into the current workspace by:


You can import folders into the current workspace by:

If you want to import a folder from a location that only supports files, we recommend to zip compress your folder, import it, and expand it in DraftCode using the built-in zip/unzip support.

Exporting Files

You can hand any file or folder in the workspace over to another iOS App or use an Extensions via the standard share button available when swiping right on a file or folder in the file navigation column on the left. This way you can export to iCloud Drive, DropBox or the FTP App of your choice.
If a destination app does not support folders, simply zip your folder first by swiping left and choosing "zip." and then send the zip file.


Renaming, copying, deleting, zipping files or folders

You can perform various tasks on files or folders by swiping the file or folder you want to modify in the file browser on the left side of the screen.



Swipe left to:


Swipe right to:

External keyboard support

The available keyboard shortcuts are shown when holding the Command key for a few seconds.
The Editor currently supports the following shortcuts: While running PHP you can use:

Absolute file paths in PHP

If you need to use absolute paths in your PHP code, it is recommended to use the PHP variables __FILE__, __DIR__ etc.
Please note that the workspace path changes when:
Many PHP Apps (for example WordPress) don't like it at all if the path changes and will need re-installation or re-configuration.

Using URLs and accessing the DraftCode server

You can access your DraftCode PHP files using URLS starting with http://127.0.0.1:8080. This URL points to the top level of your workspace.
The URL will be visible in the built-in browser, and will also be reachable on other Apps on your device, for example when runing DraftCode in Split View with another browser, or when running DraftCode on an Apple Silicon Mac. Please note that you can currently NOT access URLs on other devices on the local network, and that re-write rules are not supported.


PHP versions and extensions

PHPinfo outputs for all currently available PHP versions and their included extensions are available on the DraftCode main page.
You can switch between PHP versions using the Settings panel of DraftCode. Please note that not all included PHP packages work with all PHP versions!
Compiling PHP versions and extensions for iOS is a non trivial yet boring task :-), which is why in-App Purchases are required to support additional versions. Thank you.
Please get in touch if you need an extension to be supported.

About included PHP packages

DraftCode includes some PHP packages for your convenience. They are identical to what you can download from the internet.
The packages include their licenses and documentation files.
Please understand that fixing issues with included packages, explaining how to configure them, how to work with phpMyAdmin, WordPress or composer is not in scope of DraftCode support.
Please have a look at the included documentation or online forums of these Apps for more information.

What is the phpMyAdmin database password?

phpMyAdmin is a PHP App to access an EXTERNAL database. It does NOT INCLUDE a database and neither does DraftCode include a database server. In order to use it you have to edit its configuration file and enter the URL and credentials for your MySQL server.
DraftCode supports MySQL in the sense that the MySQL PHP extension is included, but a MySQL database itself is not (and cannot be) included.
For database work we strongly recommend using the superior option of SQLite3, which is a SQL database that does not require a server.
The included WordPress package for example uses a WordPress SQLite plugin to use a SQLite database instead of a MySQL server being required.

Can I configure 'Run' to start with a specific file?

Yes. You can use the "star" button in the code editor to mark a file as the starting point for when you hit "RUN" instead of the file you are editing right now. This is useful for larger PHP projects with many files that you might work on but that are not a valid point of execution.

Pricing and the App Store environment

DraftCode is a labour of love. I started it because I wanted to see if it was possible to do, and how it would feel to use an iPad for coding.
Apple did not support such ideas for many years and made it extremely difficult, for example by prohibiting importing PHP text files. I also feel the iPad never really lived up to its promise with ipadOS still making many things more difficult than on the Mac. I use DraftCode mainly on my Apple Silicon Mac now.
There is a general narrative that Apps should be free or sold at a price less than a cup of coffee, because "everyone can code" and "make lots of money". The reality is that the majority of Apps make almost no money. As such the time that can be invested into this project is limited by these realities.
If you want to help, please post a good review in the store occasionally.

Bugreports and getting in touch...

If you encounter any issues or have questions, please get in touch. While the natural response to encountering something unexpected seems to be posting a one-star review in the App Store, they are a difficult path to help you. Usually issues are difficult to reproduce and I would need to ask a question. Please e-mail instead. :-) Please send a message to the e-mail address:
draftcode -at - solesignal.com.
© SOLESIGNAL LTD 2024 - ALL RIGHTS RESERVED