Your comments

Apple recommends that apps support both Automatic Termination and Sudden Termination. That's what Textastic does.


Other apps probably do not use the official system mechanism for closing the app when the last window is closed but use a custom solution/hack.


With Textastic I try to follow Apple's best practices as much as possible.

You can disable Automatic Termination system-wide using the command line:


Disable Automatic Termination in Mac OS X
Launch Terminal and enter the following defaults write command:

defaults write -g NSDisableAutomaticTermination -bool yes

Re-Enable Automatic App Termination in Mac OS X
You can always reenable the default behavior of OS X and turn auto termination back on:

defaults delete NSDisableAutomaticTermination

I copied the instructions from this article: http://osxdaily.com/2012/05/15/disable-automatic-termination-of-apps-in-mac-os-x/

Actually, Textastic tries to use macOS standard behavior as much as possible. What you are seeing is called "Automatic Termination". It was introduced in macOS 10.7 Lion. If you close the last window and then switch away from the app, the app is closed automatically.


This is a snippet from the developer documentation:


Automatic and Sudden Termination of Apps Improve the User Experience

In OS X v10.7 and later, the use of the Quit command to terminate an app is diminished in favor of more user-centric techniques. Specifically, Cocoa supports two techniques that make the termination of an app transparent and fast:


  • Automatic termination eliminates the need for users to quit an app. Instead, the system manages app termination transparently behind the scenes, terminating apps that are not in use to reclaim needed resources such as memory.
  • Sudden termination allows the system to kill an app’s process immediately without waiting for it to perform any final actions. The system uses this technique to improve the speed of operations such as logging out of, restarting, or shutting down the computer.

Automatic termination and sudden termination are independent techniques, although both are designed to improve the user experience of app termination. Although Apple recommends that apps support both, an app can support one technique and not the other. Apps that support both techniques can be terminated by the system without the app being involved at all. On the other hand, if an app supports sudden termination but not automatic termination, then it must be sent a Quit event, which it needs to process without displaying any user interface dialogs.

Automatic termination transfers the job of managing processes from the user to the system, which is better equipped to handle the job. Users do not need to manage processes manually anyway. All they really need is to run apps and have those apps available when they need them. Automatic termination makes that possible while ensuring that system performance is not adversely affected.

Apps must opt in to both automatic termination and sudden termination and implement appropriate support for them. In both cases, the app must ensure that any user data is saved well before termination can happen. And because the user does not quit an autoterminable app, such an app should also save the state of its user interface using the built-in Cocoa support. Saving and restoring the interface state provides the user with a sense of continuity between app launches.

For information on how to support for automatic termination in your app, see Automatic Termination. For information on how to support sudden termination, see Sudden Termination.



https://developer.apple.com/library/content/documentation/General/Conceptual/MOSXAppProgrammingGuide/CoreAppDesign/CoreAppDesign.html

You can use the x-callback-url support in Textastic to open or replace existing files and add new files from the Workflow app.


The x-callback-url API is documented at https://www.textasticapp.com/v4/manual/x-callback-url.html


Getting file contents is not yet supported (mainly for security reasons).

I had started working on it quite a while ago, but didn't finish. I do want to implement it for Textastic 7 along other major improvements, but didn't yet change the status from "Under review" to "Planned" because there are other things I need to finish first.

The document picker and iCloud Drive file selection UI is entirely provided by iOS itself. Unfortunately I cannot change this behaviour.


It would be up to Apple to implement this, so you might consider filing a bug report or send an enhancement request at http://www.apple.com/feedback/

I could now reproduce the issue. It happened more frequently when using Split View on iPad Pro.

This will be fixed in the next update!

I cannot seem to reproduce this issue on my iPad Pro. Which iOS version are you running? Does it always happen or can you tell me the steps to reproduce it?

Thanks for letting me know. I thought I had fixed this problem in the last update. I'll look into it again. As a workaround, I'd recommend to set the time before it locks to 1 minute instead of immediately.

If you don't want to share this information publicly, please send it to support@textasticapp.com, thanks!