Twine on an iPad

Editing and Publishing


A very concise version of this document was written some time ago for iOS v12. This is a greatly expanded version which has been verified for iPadOS v13.4 on an iPad (5th gen) on 7-Apr-2020.


Contents


Prerequisites

  1. iPad

    (5th gen or later) It should be running iPadOS v13.4 (or perhaps later versions). This procedure might work on an iPhone running iOS v13.4 or later, but that has not been verified. This procedure was first developed under iOS v12, so it might work on older iPads, although some details might be different.

  2. Chrome browser

    You must use Chrome. It's available for free in the Apple Store. Other browsers that I tried were unusable in several different ways. Sorry, I didn't keep track of all of their problems, but some are listed at the bottom of this document.

  3. Documents by Readdle

    iPadOS and iOS "sandbox" applications. In other words, they prevent apps from modifying the underlying iOS file system except in very specific circumstances. However, apps, including browsers, can "send" documents to another app. (Supposedly v13 is less strict about file system access than previous versions were. I haven't verified this.)

    To get around this file system restriction, I use the free iOS/iPadOS app "Documents by Readdle", which is available in the Apple Store. There are other third-party apps which provide similar functionality, but I haven't tried any of them. "Documents" provides both its own filesystem and access to parts of the iOS filesystem. It includes a browser, zip/unzip, ePub reader and other audio, video and file utilities. It can upload and download files using a variety of cloud service providers, including Google Drive and Microsoft's OneDrive. It also can access file services of computers on your local network. Readdle makes their money by providing enhanced for-fee apps, but I haven't used any of them.

  4. Twine IDE

    You must use the online version of Twine. An iOS/iPadOS app for creating Twine content isn't available. The online Web version of Twine can be accessed at https://twinery.org/2/#!/welcome

Story (Game) Creation

To create a new story under iPadOS v13.4, I used the following procedure. Details are below.

  1. Use Chrome to open online Twine and create a story.
  2. Publish the story to a zip file.
  3. Send the zip file to Documents
  4. Upload the Zip file (or the HTML file that it contains) to an online service.

Details of Story Creation

Here's the story creation procedure shown above spelled out in detail:

  1. Create a story in Twine.
    1. Open Chrome
    2. Goto the URL https://twinery.org/2/#!/welcome
    3. Create your story.
      • Describing how to use Twine to create a story is beyound the scope of this document. One starting place is the Cookbook. There also are several introductory lessons on YouTube.
      • I recommend using the story format SugarCube. Harlowe would have worked just as well for my simple example story, but SugarCube is much more flexible.
  2. Publish the story to a zip file.
    1. Select the Title of your story in the bottom left corner of the browser window.
    2. In the new popup menu, select the item "Publish to File", which is at the bottom.
    3. In the next new popup menu (at the bottom of the Chrome window) select the option "Download".
    4. The menu changes, showing that "download.zip" is available.
  3. Send the zip file to Documents
    1. Select the new option "Open in...", which has appered in Chrome's popup download menu.
    2. A new popup window appears, offering many menu icons and other options. Select the option "Send to Documents" in the lower part of the menu window. (Despite this ambiguous name, it shows Readdle's icon at the right side of the button. It also offers "Send to Files", which I have not tried.)
    3. "Documents by Readdle" opens automatically, with the file "document.zip" highlighted.
      • Consider renaming that file if you're going to be saving more copies of your stories.
  4. Upload the Zip file (or the HTML file that it contains) to an online service.
    1. Select the zip file. "Documents by Readdle" will automatically extract the file "Test.html" (or whatever story name you specified in step "IC" above.)
    2. Verify that the story works.
      1. Select "Test.html" (or whatever you named your story). It will open in Readdle's browser.
      2. Play the story. (My simple test story consisted only of links among three passages.)
      3. Exit from the browser: select the "left caret" (<) that's at the upper left corner.
    3. Back in the file listing provided by "Documents", select the "..." menu option at the right side of "document.zip" and then the upload icon, sending it to an appropriate Cloud Service. (I sent mine to my "SharedStories" folder on Google Drive.)
    4. In the iPadOS Google Drive app (if that's what you used: select share, link sharing on, copy link to clipboard) I obtained my story's "file sharing link" that way. That link can be pasted into other apps (including discord and mail) and sent to other people. The link to my trivial game's file "document.zip" is https://drive.google.com/file/d/1Dm7QjnTxFaWPT9ZhCucpfJWHlVBSUMsR/view?usp=drivesdk
  5. I tested compatibility on a Windows computer by doing the following:
    1. Emailed the Google Drive link to myself (using Win365's Outlook on iPadOS and "Outlook on the Web" on Windows 10)
    2. Downloaded document.zip using that link and played the story on my Win10 computer from within the Zip file. Since all of my story's assets were within its .html file, I didn't even have to extract it from the Zip archive.

    I found that this procedure had produced a working story.

BackingUp and Recovering Your Stories

The online version of Twine can load story archive files which are stored on your iCloud Drive. This enables you to save copies of the stories that you're working on which you can revise later. I'm assuming you've already configured your iCloud Drive account.

Note: After 7 days of not using the Twine story editor, some iPad browsers (including Safari) will delete all stories. (This is not yet the case with Chrome, but might start happening in 2022.) To work around this limitation, you should export (archive) your stories as described below whenever you finish an editing session. If necessary, when you restart the browser and Twine, you can then import a recent copy of your current story and continue editing.

To Save Your Stories to iCloud:

  1. While in Twine's story editor, go to Twine's Home page. To do this, select the "house" icon in the bottom left corner of the window.
  2. In the menu column at the right side of Twine's Home window, select "Archive".
  3. At the right side of the new black popup menu at the bottom of the window, select "Download"
  4. "Download" changes to "Open in..." Select it.
  5. A new popup menu appears. Select "Save to Files" (at the menu's bottom).
  6. A new popup menu appears. Your iCloud Drive folders are at the top of this new menu. Change the uploaded file's name if you want, then select an appropriate iDrive folder.
  7. In the same popup menu, select the blue "Save" button at the top right.
  8. The popup menu goes away. Select the "X" in the black menu at the bottom of the Twine window.

To Recover Your Stories from iCloud:

  1. Go to Twine's Home page: select the "house" icon in the bottom left corner of the window.
  2. In the menu column at the right side of Twine's home window, select "Import from file".
  3. A new popup window appears. Select its "Choose File" button.
  4. A new popup menu appers. Select the "..." at its bottom right corner.
  5. The contents of your iCloud Drive's folder appears. Select the appropriat Zip archive.
  6. Twine might complain that the Story you've selected already exists. Decide if you want to replace it with the archived version.
  7. The download menu disappears and you are shown Twine's updated Story window. Select the Story 6hat you want to edit.

Browser Problems with the Twine IDE

Chrome works well with Twine, both as an editor and as a player. Unfortunately, many other iPadOS browsers have problems when used with Twine's online Web-based Integrated Development Environment, making them unusable. Here's a summary of some of the problems that I encountered:

I'm sure there were more problems under iOS v12, but I don't remember what they were. One can hope that the current problems will be resolved under iPadOS v14.


Contents


I hope these suggestions are a help in producing Interactive Fiction on your iPad. Please contact me if you have any suggestions for improvements or corrections to this document. If you don't let me know, I can't fix them.


Selden
7-Apr-2020

Contact information: