doronz88 / pymobiledevice3

Pure python3 implementation for working with iDevices (iPhone, etc...).
https://discord.gg/52mZGC3JXJ
GNU General Public License v3.0
1.19k stars 162 forks source link

Allow custom args for `pymobiledevice3 developer dvt launch` #726

Closed corrrso closed 7 months ago

corrrso commented 7 months ago

Feature request:

pymobiledevice3 developer dvt launch doesn't seem to allow custom arguments to be passed (useful for passing startup args). I wonder if it's possible to extend the command to allow this (there is something already implemented for env variables, just not for arguments), since also other libraries allow this as well (E.G. libimobiledevice).

E.G. I'm trying to pass args like this pymobiledevice3 developer dvt launch my_bundle_identifier --argname=argvalue --argname2=argvalue2 --rsd xx:xxx:xxx:xx yyyyy If I try to do so, I get Error: No such option: --argname

Tested this on version 2.33.0, tvOS 17.1

doronz88 commented 7 months ago

all arguments are passed in the same string so you'll need to escape it correctly:

pymobiledevice3 developer dvt launch --rsd xx:xxx:xxx:xx yyyyy my_bundle_identifier -- '--argname=argvalue --argname2=argvalue2'
corrrso commented 7 months ago

If I try the above with your exact syntax I get Error: Got unexpected extra argument (--argname=argvalue --argname2=argvalue2)

doronz88 commented 7 months ago

correct. i had a small mistake:

pymobiledevice3 developer dvt launch --rsd fdf6:dc0:6705::1 62157 -- 'my_bundle_identifier --argname=argvalue --argname2=argvalue2'
corrrso commented 7 months ago

oooh now I get it, ALL arguments must be passed as a single string, bundle id included.

Yup this works. Thanks!