0

I want to run my app automatically in the background after the iOS Simulator is booted (probably after SpringBoard has launched).

On a jailbroken iOS device, I can accomplish this by placing a launchd.plist file inside /Library/LaunchDaemons.

Is there a way to do this on a per-device basis in the simulator?

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
SaRaVaNaN DM
  • 4,390
  • 4
  • 22
  • 30
  • I'm a bit confused. Is it even possible to jailbreak the simulator? – ephemer Dec 17 '15 at 10:38
  • Simulator doesnt require jailbreak. because all the files system of simulator can be accessible by anyone. simply we can say every simulator is jailbroken by default :) – SaRaVaNaN DM Dec 17 '15 at 10:42
  • This might help, you can launch the simulator and a specific app via the command line http://stackoverflow.com/questions/26031601/xcode-6-launch-simulator-from-command-line – James P Dec 17 '15 at 10:44
  • my requirement is little different. if i follow my iOS device approach i will be able to load/unload the app anytime without rebooting the simulator. so i need an alternate approach. thanks james, got some idea from that link to move further :) – SaRaVaNaN DM Dec 17 '15 at 10:56

1 Answers1

0

No. There is no way to do this on a per-device basis in the simulator. You can place a launchd.plist in [RuntimeRoot]/Library/LaunchDaemons, but that will be used for all simulator devices, not just an individual one.

You can run xcrun simctl launch booted [app id] to launch your app manually, but it won't be in the background.

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86