1

Is there a way to run any app in iOS 10+ from command line/Mac without jailbreaking?

Re-signing and none of the existing tools seem to work (ios-deploy, Instruments) nor have I been able to find a way via iTunes or other programs.

otso
  • 504
  • 4
  • 12

5 Answers5

1

Yes it is possible for any App you have the source code for.

No it is not possible for any App you acquired from the App store or direct download.

der_michael
  • 3,151
  • 1
  • 24
  • 43
0

Not quite sure I fully understand your emphasis on any app, but here is what I understand:

1) If you mean you want to run any app from the app store that can currently be downloaded, and you have a .ipa file, you can definitely install it manually to another device using this method (iTunes drag and drop)

2) If, however, you're trying to run an .ipa on a Simulator, that's not possible, as described by this answer.

3) Lastly, if you have source, which I'm confused about since you mention re-signing, then you can easily build that source into an executable for either Simulator or device using either Xcode, or since you asked about command line, you could also use xcodebuild, info found here

I hope one of these 3 options is what you're looking for, as it's hard to tell from the wording of the question. If it's not, expanding on exactly what use case you're trying to resolve would be very helpful.

Community
  • 1
  • 1
BHendricks
  • 4,423
  • 6
  • 32
  • 59
  • Thanks BHendricks - I am looking for a way to start any app from Mac terminal/command line. None of the alternatives listed in the question work e.g. for apps dowloaded from the App Store (so `$ instruments -l 20000 -t 'Activity Monitor' -w com.foobar.myapp` or say `idevicedebug run com.foobar.myapp` fail). Hope this clarifies. – otso Dec 26 '16 at 11:16
  • Ok, then you're looking for option (3) I listed above. `xcodebuild` is the way to build any **iOS** app you have the source for and there is a parameter in that method to launch with a specific simulator. – BHendricks Dec 26 '16 at 13:43
  • Sorry, this option does not work for apps downloaded from the App Store. – otso Dec 26 '16 at 13:46
  • Ok, then see (2). You cannot run an app from the App Store in Simulator, as referenced in the answer I linked, which states: `If it was downloaded via the iTunes store it was built for a different processor and won't work in the simulator.` – BHendricks Dec 26 '16 at 13:54
  • Target is to run the app in a real iPhone/iPad. – otso Dec 26 '16 at 13:56
  • lol, then see (1). If it HAS to be through command line, the only thing I can suggest is to create an AppleScript through `Automator` and then running that script from command line. – BHendricks Dec 26 '16 at 13:59
  • Appreciate the suggestion. Installation would go fine via this method but not running/starting the app (the problematic part). – otso Dec 26 '16 at 14:05
  • 1
    @otso You really should clarify your question in stead of saying the suggested solutions won't work. Explain in detail what exactly you are trying to do, or even what you need it for, so we can help with the actual problem or suggest other ways of reaching that same goal. – Leon S. Dec 28 '16 at 21:17
0

From the comments in @BHendricks answer, it seems you want to use the command line on your computer to start apps that are installed on an iOS 10+ device.

This is not possible without jailbreaking the phone!

On a jailbroken phone it might be possible to write something that connects over ssh and starts apps, but on vanilla iOS this is disabled for security. You could search for an app that you can send commands, but I highly doubt iOS apps have access to system features like starting other apps, as this is also a large security risk.

Leon S.
  • 3,337
  • 1
  • 19
  • 16
0

If you have the ipa, you can install the app via iTunes. This is what we used to ask QAs to test apps on devices and it works fine. Please refer to this [SO] for detail Install IPA with iTunes 12.

Community
  • 1
  • 1
Yuchen
  • 30,852
  • 26
  • 164
  • 234
0

Use Cydia Impactor (cydiaimpactor.com) to sign the app. 99% chance it will work