iOS Workflow share - Scan QR Code

Workflow: Scan Code

Many times we unconsciously QR Code with a micro-channel scanning, and then open regardless of what we wants. I often wonder in the end is what QR Code encoded information, in the end it is an ID, or a URL (possibly deeplink), or is it a JSON. So I made this simple Workflow, the first QR Code in plain text content is displayed, then let me choose which app to receive this string. If the string is a URL, Workflow will be prompted to open my browser, I can also use Opener to open deeplink.

If you have not installed Workflow , you can go to download and install for free. Then open Scan QR Code and click on "GET WORKFLOW" this Workflow will be automatically imported into your Workflow go, then you can call it to scan the QR Code.

Incidentally, the above-mentioned addition recommend that called Opener App's. It is very simple to do, you give it a URL for the site, if the site has a corresponding app, then it will try to open the URL corresponding to the content inside the app through deeplink. For example, I know almost open a question on Mobile Safari, then I can put the URL of this page sent Opener let me know almost open the app and open the same problem in the know almost app.

principle

The Workflow most important action is the first step, using the "Scan QR / Bar Code" scanned the QR Code. This action will return after a present QR Code encoded string, and then we save it in a Contentvariable.

Workflow: Scan Code

Next "Get URLs from Input," this action could Contentseemingly URL contents extracted, so if Contentthe URL we'll get URL otherwise there is no content. To verify the URL extraction is successful, check the contents out of the proposed contained ://, if any, it must be a URL, otherwise, it is non-URL text.

For the URL, I offer five options for operations; for non-URL, only one of the two. Then the following is a selection made by the user, perform one of five operations:

  1. Open (URL only): Using the iOS system opened this URL. If this is a deeplink or Universal Link, it will open in the corresponding app.
  2. Open (URL only) in Chrome: Because I use Chrome for iOS instead of Mobile Safari, so I have a normal web page using this option.
  3. Open (URL only) in Opener: If I want to try to use this website, then open the corresponding app. I set up if no corresponding app on the default prompt I used Chrome open Opener in.
  4. Copy: copy the string.
  5. Share: Share function call system.

subscription

I will share more after Workflow, do not want to miss the words of welcome by e-mail or RSS / Atom subscribe to my blog.

Guess you like

Origin www.cnblogs.com/cathsfz/p/11479083.html