Closed AnissaHum closed 4 years ago
Moving ticket to Python-Apple-support since this isn't an issue with the application template.
It's difficult to diagnose further without a full stack trace; however, you should be aware that iOS has a number of restrictions related to subprocesses - in short, you can't use them. An iOS app can be multi-threaded, but it can't be multi-process, and there's no concept of cross-process communication (well - there is a very restricted channel for resource sharing, but it's not anything like the "unix pipe" sense of the word).
In short, If you're trying to import subprocess
on iOS, you're going to have a bad time.
Thank you for your answer.
If ever someone gets the same issue : the problem is that iOS cannot run functions of subprocess
module because it uses linux-based functions (which are not available in iOS).
My app is actually used on both platforms : iOS and Linux, that is why I was trying to import subprocess
.
You should configure your app to not run functions that use subprocess functions. You can in addition do
try:
import subprocess
except ImportError as e:
pass
I tried to run my code with the following app_packages :
six
andipaddress
. I get this following error when I try toimport subprocess
inside my Python code