New to Scriptable - is following able to be written in Javascript?

Hello Team,

we have an internal corporate application (crm app for iPad) and this app actually includes custom component. So in order to get these components available, user needs to do 5 clicks - which became very bothersome since they need act super fast.

I was trying to ask dev team to create for mentioned components “shortcuts”, but answer was “This is not possible”.

So I am currently searching for a way, if I can create a script/automation, where with just one click script will open app, log user in and redirect user on specified component of the app.

Me, as an javascript lover found “Scriptable”, but from docs still not sure, if something like that is even possible (and that is my question here). So basically:

  1. with Scriptable open app
  2. still by scriptable selecet prompt window and fill password in
  3. redirect user to a wanted location (it can be done by automated clicks by Javascript, if this is possible).

So, team, is anything like that possible with Javascript?

Thanks a lot!

1 Like

As you’re looking to control an iPad app that’s not going to be possible, with anything - at least right now.

Did your developers say not possible or not possible right now? E.g. not on the app road map, too busy, etc. Could it be that the app isn’t developed in house and it is just being used to access an in house instance of the cRM system?

What you are asking for sounds suspiciously like deep linking where they allow you to open and navigate into the app to a particular functional location using a URL. That is possible for an app developer to put into a URL scheme, but it is only possible for a developer to do this with their own app. No third party app, including Scriptable could supersede this on a typical iOS device with all the standard security and sandbox limitations in place.

Also “log user in” is a big red flag. CRM solutions need to have good security. Automatically logging in a user should not be possible and should not be sought. Deep links can trigger and follow on from user login, and should be a preferred approach.

Just as a final check, is your CRM app definitely an iOS app and not a link to a web page or a “simple” web wrapper that displays a web interface to the CRM in a separate app.

1 Like

Hey Sylumer,

as I am not familiar with iOS development (Swift/Objective) (only with Javascript on the BE (node) and Vanilla/React on the FE) I am pretty much guessing possibilities what can be done and what not.

Just trying to find the way I can at least push developers to create mentioned shortcuts since at least from my scope of programing experience - barely nothing is impossible on “web development world”.

What helped me at least was your sentence "That is possible for an app developer to put into a URL scheme"

It means, if this exist, URL can be set as an shortcut (at least iOS12 with its Shortcut app allows that) - and that would pretty much solve the problem. I guess our users would survive all the time logging in to app :slight_smile:

So anyway, your answer helped and I am just about to rise a question to our dev team.

Kind Regards
Jaroslav Huss

Ps. At least, with this javascript possibility, is there any way to console log this URL.scheme? To target an app’s URL object and see what is in there? (I miss “window” and “document” object here so much :smiley: )

It isn’t necessarily easy. They potentially would have to build in all the navigation hooks. Also you wouldn’t need to put it into Shortcuts in any way. it could simply be a link in an e-mail, a home screen bookmark, etc.

In your position I would probably seek to ask questions of the developers. When I was working in software development we would frequently get requests to do things that when you got down to it were not the right thing to do. I would recommend discussing the underlying issue with your developers.

For example, consider the following:

  • Is the app too difficult to navigate?
  • Is the app too slow to navigate?
  • Is the area you are wanting quick access to the first place these users always want to access when opening the app?

If you take each in turn, there are at least a handful of ways of addressing each. Some might be more practical to develop into the app than others, based on the app’s underlying architecture. Some may give a wider range of functionality that would benefit a wider range of user groups.

Developers often have a broader view as they have to support all users. Best to encourage discussion with them of your challenges than their challenges of implementing your own solution.

1 Like

Yeah,

totally agree. So, I just sent an email with additional questions about URL scheme and lets see. So far I saw, there is no possible way to at least programmaticaly react iOS’s URL scheme, so really, without dev team this “try” is doomed for now.

Anyway, big thanks for your help man!

Kind Regards
Jaroslav Huss