I'm working on improving iOS cross-compilation support for ghc
, which has a metaprogramming feature which requires running code at compile time. One mechanism for this involves running a process on the target and communicating with it from the compiler via pipes. This is a standard unix process (one compiled for iOS), not an iPhone app. How can I launch this process on a connected iPhone from the OS X box where the compiler is running? For the simulator I can use simctl spawn
but I don't know of anything similar for real devices.
IOS – Run a standard unix process (not an app) on iPhone from OS X command line
iosiphonexcode
Related Question
- IOS – bypass the error 3194 when downgrading from iOS 6 to 5.1.1 on a locked Verizon iPhone 4S
- MacOS – stored C “object” and “executable” files in Xcode
- IOS – Remotely distribute an iOS app compiled in Xcode 7 without App Store, developer program sub, or jailbreak
- IOS – A software update is required to connect to your iOS device / iPhone
- IOS – iPhone SE touch recognition and battery problem
- IPhone – Activating Titanium Apple Card: iPhone XS/XR vs iPhone X and earlier
Best Answer
You can't.
Jailed iOS devices have no method of executing any given program remotely. You'd have to jailbreak your device to be given access to terminal.
The iOS simulator is slightly different since it lacks many of the security features that the full iOS has, and since its running directly on your mac as child processes (rather than an emulator emulating a ARM processor).