Apologies if this is not the correct topic to post under.
EpochField 5.2 is our application. It's a .NET MAUI application built against XCode 16. A customer of ours uses another app, TN3270, to connect to a mainframe host. After installing our app on an iPad and restarting the device, the TN3270 app will disconnect when suspended. Uninstalling our app (EpochField) will allow the TN3270 to suspend without disconnecting. We have tried removing background services, setting UIRequiresFullScreen to false or removing it entirely, and several other ideas. The only remedy seems to be uninstalling EpochField.
On an iPad device:
-
Install MochaSoft’s TN3270 app (free version is fine). Create a connection to ssl3270.nccourts.org, port 2023, SSL/TLS turned on, keep alive turned on.
-
Verify that you can connect. Suspend the app by swiping up or choosing another app. Go back to TN3270 and verify that the app has not disconnected.
-
Install EpochField 5.2. Do not run or configure the app, just install it.
-
Repeat step 2.
-
Restart the device.
-
Open EpochField 5.2. You do not need to configure the app or login. Sometimes it isn't necessary to ever open EpochField to get the disconnects, but this is the most reliable way to reproduce the situation.
-
Repeat step 2. The TN3270 app will now disconnect when suspended, even if EpochField is closed. You may need to wait a few seconds after suspending.
-
Uninstall EpochField 5.2.
-
Repeat step 2: the TN3270 app will now remain connected when suspended.
The behaviour you’ve described in the failing case (specifically, in step 7) sounds right to me. I’m presuming that the TN3270 app is implementing the Telnet 3270 protocol. That’s based on TCP and, in general, TCP connections ‘tear’ when an app is suspended.
I talk about this more in TN2277 Networking and Multitasking. Note that I’ve not updated that technote in a long time, so some things have drifted:
- Its terminology is somewhat out of date. Rather than talking about socket resource reclaim, I now say that the connection has been defuncted.
- Recent versions of iOS defunct on app suspend, so you don’t have to explicitly lock the device.
As to why it’s working when your app isn’t installed, that’s hard to say. It’s possible that the TN3270 app is doing something weird to prevent defuncting, and the presence of your app is causing that to fail. Or it’s possible that there’s some sort of OS issue in play.
It sounds like you’re able to reproduce this yourself. If so, I have an experiment for you to run:
- Create a small test app that opens a TCP connection to the target server [1].
- Run through your steps to reproduce to see if it behaves the same way as TN3270.
The goal here is to get the TN3270 app out of the picture, giving you control over ‘both sides’ of the problem.
OTOH, if your app behaves correctly (well, according to my definition of correct) then it’s gonna be hard to debug this without talking to the TN3270 app developer.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] You mentioned ssl3270.nccourts.org
port 2023. I’m unable to access that at all:
% nc -v ssl3270.nccourts.org 2023
nc: connectx to ssl3270.nccourts.org port 2023 (tcp) failed: Connection refused