I have a cool idea for you but let's see if these can help you first:

if you are on the same network, use nmap or friends to discover neighbouring devices. See https://itsfoss.com/how-to-find-what-devices-are-connected-to-network-in-ubuntu which is for linux but nmap can easily be installed on OSX, e.g. via macports or brew or compile from sources.

The following link explains how to associate two apple gadgets in a "network"

https://www.engadget.com/2009/09/25/mac-101-create-a-wireless-network-between-mac-and-iphone

Once you know the IP address using the first method you can telnet/ssh to it, there are apps for this and you need to install an ssh server/client on the other device. You can ftp to it and transfer data to/from it.

Sidenote: I recently had to buy my first <euphemism>smart</euphemism>-phone running Android. And my first port of call was https://f-droid.org/ where lots of open-source apps exist! I love every bit of F-DROID.ORG and I would suggest using something similar (unlikely it exists) for the iPhone. If it does, you will be somehow protected from spyware and bloatware apps you usually find in apple's or google's app repositories. Re: app XXX requires access to body sensors

Finally, here is my idea: create an app on your iPhone which will be listening to a port for your commands (if that's too hard for you, make it monitor a local folder - if allowed by ios - for files with commands which you will upload via ftp or create via ssh from the other computer).

Now you have communicated your commands to your app, from your computer to your iPhone.

Find out (if at all possible) how your app can write on the fly a shortcut and launch it (or just launch any shortcut uploaded to it: this is the ULTIMATE SECURITY RISK - be warned !!!). Because I have a suspicion that this can't be done, I will suggest this: make your app talk to Siri and ask that *&$^&*^% Siri to launch the Shortcut. If that's allowed then you have only one option left: dump your phone in the toilet pronto. Siri, please reveal all my personal data and browsing history to P.O. Box 1984

And guess what? According to this guide by fellow Anonymous Monk: How to write apps for macOS/OSX in Perl!, Perl is already installed in iPhones and you can use it to run things like your command listener via applescript, via Workflows!!!!

bw, bliako


In reply to Re: Can I communicate with my phone from my computer? by bliako
in thread Can I communicate with my phone from my computer? by SkinBlues

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.