I don’t have a fancy iPad with a fancy keyboard, and I can’t imagine being productive coding on my iPhone, so I’d like to write the bulk of my code on my laptop in an IDE such as PyCharm or Webstorm, VS Code, Atom, Vim, or anything really (but in that order of preference).
The only problem is is that it the IDE will complain quite a lot. I totally understand why it would complain about things that are purely Scriptable constructs, and for those I was wondering if there were some kind of stub or header file(s) I could use to teach my IDE the proper interfaces so he doesn’t complain.
Request.headers but the other version wants me to pass them into the constructor. Could someone kindly explain why these are different? The Scriptable documentation says it is using “ECMAScript 6” and as far as I can tell the one on the Mozilla page is also ECMAScript 6.
Thanks in advance.
request one you noted. But it may be that if you define it, it would. It may simply be something not covered on their documentation page. But in theory itt looks like you could create your own libraries for WebStorm and if necessary you could run a transformation on the final code if you needed to say transform a definition for say
request so that it could be interpreted correctly on iOS.
There’s certainly an element of testing that goes along with the coding. You would potentially have to test on iOS for many things as there’s no iOS replication on your Mac/PC for many things you could be doing on iOS; unless you have an emulator running alongside I guess. It does make me wonder how the round tripping would feel (in terms of friction to development). It may be that round tripping is still more practical than coding on device, and if you are using a Mac then iCloud sync may well be practical. It isn’t a constraint I’ve had to contend with, but I do wonder about what it would be like to be the ain approach.
I am in a position where I write scripts mostly on my iPad (an old(?) 9.7" pro) using a Bluetooth keyboard; but I do also reglarly use the same keyboard (a Logitech K480) with my (plus size 8) iPhone in landscape mode and it isn’t as good, but it is practical. The physical keyboard is absolutely the thing that makes the difference.
Prior to my current keyboard I used a cheap Bluetooth keyboard and a little foldable plastic stand. It was functionally equivalent (lighter in fact, but not as nice to type on) and cost less than 12 GBP from Amazon UK. My point here being that it may be worth trying out something with a keyboard that maybe doesn’t rise to the auspices of being described as “fancy”. It may be a secondary option for native coding on iOS for you beyond the desktop focussed IDE.
It’ll be interesting to see if anyone else is already doing this, and where you plan to take it next. Good Luck!
Unfortunately, the Scriptable
Request type definition collides with the default lib.d.ts
Request type… and the only way I’ve found to force the override of the default type is to disable the lib.d.ts typings altogether… which is no good since I want to use the existing defs for
I’ve just been dealing with it since I just airdrop the scripts to Scriptable on my phone to run anyways, but if someone figures out a way of overriding the lib.d.ts
Request type I would love to hear it!