ios自动化构建 苹果创建自动化在哪_ios自动化构建

ipad iphone开发

ios自动化构建 苹果创建自动化在哪_java_02

Khamosh Pathak Khamosh Pathak

Apple’s Shortcuts app has been integrated directly into iOS 13 and iPadOS 13. After years of consistent improvements, you can now create trigger-free, notification-based automations on your iPhone and iPad.

苹果的Shortcuts应用程序已直接集成到iOS 13和iPadOS 13中 。 经过多年的不断改进,您现在可以在iPhone和iPad上创建基于通知的无触发器自动化。

(How Automations Work on iPhone and iPad)

Apple introduced the Shortcuts app in iOS 12. Before that, the app was sold on the App Store as Workflow.

苹果公司在iOS 12中引入了Shortcuts应用程序 。在此之前,该应用程序以Workflow在App Store上出售。

You can ask Siri to initiate a shortcut (a predefined set of actions) or press a button on your iPhone or iPad to do it. Now, a shortcut can fire off automatically based on given parameters. It can even happen in the background and use certain external triggers, like NFC. The Shortcuts Automations feature is available on devices that run iOS 13.1 or iPadOS 13.1 and above.

您可以要求Siri启动快捷方式(一组预定义的操作),或按iPhone或iPad上的按钮进行操作。 现在,快捷方式可以根据给定的参数自动启动。 它甚至可能在后台发生,并使用某些外部触发器,例如NFC。 快捷方式自动化功能在运行iOS 13.1或iPadOS 13.1及更高版本的设备上可用。

However, not all shortcut automations are automatic.

但是,并非所有快捷方式自动化都是自动的。

By default, the automation shows a notification in which you can trigger the shortcut after you tap “Run.” Some shortcuts based on direct physical manipulation with the iPhone or iPad do run automatically (more on this below).

默认情况下,自动化程序会显示一条通知,您可以在其中点击“运行”后触发快捷方式。 某些基于直接对iPhone或iPad进行物理操作的快捷方式会自动运行(有关更多信息,请参见下文)。

(How to Create an Event Automation on iPhone or iPad)

You can create two kinds of Automations on your iPhone or iPad: Personal and Home. Personal automations are related to your iOS and iPadOS device. The Home automations are related to your HomeKit devices.

您可以在iPhone或iPad上创建两种自动化:个人和家庭。 个人自动化与您的iOS和iPadOS设备有关。 家庭自动化与您的HomeKit设备有关。

In this article, we focus on the Personal automations on your iPhone and iPad. Let’s take a look at the actions you can trigger.

在本文中,我们重点介绍iPhone和iPad上的Personal自动化。 让我们看一下可以触发的动作。

大事记 (Events)

  • Time of Day: You can trigger this at any time of day, at sunrise, or sunset. 一天中的时间 :您可以在一天中的任何时间,日出或日落时触发此事件。
  • Alarm: This shortcut runs when an alarm is stopped or snoozed. 警报 :警报停止或暂停时,此快捷方式运行。
  • Apple Watch Workouts: This can be triggered when a workout on your Apple Watch starts, pauses, or ends. Apple Watch锻炼 :当Apple Watch上的锻炼开始,暂停或结束时,可以触发此锻炼。

旅行 (Travel)

  • Arrive: A location-based trigger that activates when you arrive at a certain location. 到达 :一个基于位置的触发器,当您到达某个位置时会激活。
  • Leave: A trigger for when you leave a certain location. 离开 :离开特定位置时的触发条件。
  • Before I Commute: This action tries to predict when you usually leave for work or home and triggers the shortcut at the given time, or up to an hour before you leave. 在我上下班之前 :此操作将尝试预测您通常什么时候去上班或回家,并在给定时间或离开前一个小时触发快捷方式。
  • CarPlay: A shortcut is triggered when you connect or disconnect from CarPlay. CarPlay :当您连接或断开CarPlay时会触发快捷方式。

设定值 (Settings)

  • Airplane Mode, Wi-Fi, Bluetooth, Do Not Disturb, Low Power Mode: This shortcut triggers when you turn these settings on or off. 飞行模式, Wi-Fi, 蓝牙 , 免打扰 , 低功耗模式 :打开或关闭这些设置时,将触发此快捷方式。
  • NFC: With this trigger, you can tap your iPhone on an NFC sticker and run a shortcut. Modern iPhones (iPhone XS, XS Max, 11, 11 Pro, and 11 Pro Max) can run NFC shortcuts in the background. NFC :使用此触发器,您可以在NFC贴纸上点击iPhone并运行快捷方式。 现代iPhone(iPhone XS,XS Max,11、11 Pro和11 Pro Max)可以在后台运行NFC快捷方式。
  • Open App: This trigger runs a shortcut when you open any app. 打开应用程序 :打开任何应用程序时,此触发器都会运行快捷方式。

Let’s walk through an example. Say you want to create a shortcut that plays soothing music when you open the Twitter app. Open the Shortcuts app, and then tap “Automation” in the bottom toolbar.

让我们来看一个例子。 假设您要创建一个打开Twitter应用程序时播放舒缓音乐的快捷方式。 打开“快捷方式”应用程序,然后在底部的工具栏中点击“自动化”。

ios自动化构建 苹果创建自动化在哪_java_03

Next, tap the plus sign (+) at the top. If this is the first time you’ve used the Automations feature, you can skip this step.

接下来,点击顶部的加号(+)。 如果这是您第一次使用自动化功能,则可以跳过此步骤。

ios自动化构建 苹果创建自动化在哪_ios自动化构建_04

Here, tap “Create Personal Automation.”

在这里,点击“创建个人自动化”。

ios自动化构建 苹果创建自动化在哪_ios_05

You see the list of actions we outlined above. Scroll to the bottom of the screen and tap “Open App.”

您会看到我们上面概述的操作列表。 滚动到屏幕底部,然后点击“打开应用”。

ios自动化构建 苹果创建自动化在哪_蓝牙_06

Tap “Choose” in the “App” section. Search for, and then select the app. Tap “Done” to return to the previous screen, and then tap “Next.”

在“应用程序”部分中点击“选择”。 搜索,然后选择应用程序。 点击“完成”返回上一屏幕,然后点击“下一步”。

ios自动化构建 苹果创建自动化在哪_ios_07

Now, tap “Add Action.” You can scroll through suggested actions or explore actions based on apps and categories.

现在,点击“添加操作”。 您可以滚动浏览建议的操作或根据应用和类别浏览操作。

ios自动化构建 苹果创建自动化在哪_java_08

The best way to find an action is to search for it. Tap “Search” at the top, and then type “Play Music.”

查找动作的最佳方法是进行搜索。 点击顶部的“搜索”,然后键入“播放音乐”。

In the “Actions” section, tap “Play Music.”

在“操作”部分,点击“播放音乐”。

ios自动化构建 苹果创建自动化在哪_蓝牙_09

On the next screen, tap “Music.”

在下一个屏幕上,点击“音乐”。

ios自动化构建 苹果创建自动化在哪_ios_10

Tap the “Search” bar to find a playlist or song, or browse your library.

点按“搜索”栏以查找播放列表或歌曲,或浏览您的音乐库。

ios自动化构建 苹果创建自动化在哪_蓝牙_11

Browse through the list, and then tap a song or playlist to see the detailed view.

浏览列表,然后点击歌曲或播放列表以查看详细视图。

ios自动化构建 苹果创建自动化在哪_ios_12

Once you find the playlist or song you want, tap the plus sign (+) to select it.

找到所需的播放列表或歌曲后,点击加号(+)将其选中。

ios自动化构建 苹果创建自动化在哪_android_13

Tap “Next.”

点击“下一步”。

ios自动化构建 苹果创建自动化在哪_ios自动化构建_14

You now see the details of the automation broken into “When” and “Do” sections. As this option supports background triggers, you can toggle-On the “Ask Before Running” feature.

现在,您将看到自动化的详细信息,分为“何时”和“执行”两部分。 由于此选项支持后台触发器,因此可以启用“运行前询问”功能。

When you’re satisfied with the Automation, tap “Done.”

当您对自动化感到满意时,请点击“完成”。

ios自动化构建 苹果创建自动化在哪_ios_15

Now, when you open the Twitter app, the playlist or song you selected will play. If you didn’t enable the background trigger feature, you see a notification; tap “Run” to start the shortcut.

现在,当您打开Twitter应用程序时,将播放您选择的播放列表或歌曲。 如果您未启用后台触发功能,则会看到一条通知。 点击“运行”以启动快捷方式。

ios自动化构建 苹果创建自动化在哪_蓝牙_16

(How to Run an Automation in the Background)

You can enable most automations to work in the background. These are usually actions you control or that are a direct result of an action you perform on your iPhone or iPad.

您可以使大多数自动化在后台运行。 这些通常是您控制的动作,或者是您在iPhone或iPad上执行的动作的直接结果。

The following types of actions support the background trigger feature (you still receive notifications about them): Alarm, Apple Watch Workouts, CarPlay, Airplane Mode, Do Not Disturb, Low Power Mode, NFC, and Open App.

以下类型的操作支持后台触发功能(您仍会收到有关它们的通知):警报,Apple Watch锻炼,CarPlay,飞行模式,请勿打扰,低功耗模式,NFC和打开应用程序。

If you set up Home-based automations, the following actions work in background: A Time of Day Occurs, People Arrive, People Leave, and An Accessory is Controlled. You have to enable this feature individually for every shortcut that supports it.

如果设置了基于家庭的自动化,则以下操作将在后台运行:发生一天中的时间,人员到达,人员离开和附件受到控制。 您必须为支持该功能的每个快捷方式单独启用此功能。

Select the shortcut from the Automations tab, and then toggle-On the “Ask Before Running” feature.

从“自动化”选项卡中选择快捷方式,然后启用“运行前询问”功能。

ios自动化构建 苹果创建自动化在哪_android_17

From the popup, tap “Don’t Ask.”

在弹出窗口中,点击“不要问”。

ios自动化构建 苹果创建自动化在哪_java_18

Now, when the shortcut is triggered, you’ll see a notification that says, “Running your automation.”

现在,当快捷方式被触发时,您将看到一条通知,指出“运行自动化”。

ios自动化构建 苹果创建自动化在哪_ios_19

(How to Create an NFC-Based Automation)

You can use any empty NFC tag as a trigger for a shortcut. The Shortcuts app doesn’t write any data to the tag; it simply uses it as a trigger.

您可以将任何空的NFC标签用作快捷方式的触发器。 快捷方式应用程序不会将任何数据写入标签; 它只是将其用作触发器。

Newer iPhones (iPhone XS, XR, XS Max, 11, 11 Pro, 11 Pro Max, and newer) can use NFC tags to trigger actions even when the Shortcuts app isn’t in the foreground.

即使“快捷方式”应用程序不在前台,较新的iPhone(iPhone XS,XR,XS Max,11、11 Pro,11 Pro Max和更新版本)也可以使用NFC标签触发操作。

Open the Shortcuts app, and then go to the “Automations” tab. Tap the plus sign (+), tap “Create Personal Automation,” and then tap “NFC” in the list.

打开“快捷方式”应用程序,然后转到“自动化”选项卡。 点击加号(+),点击“创建个人自动化”,然后在列表中点击“ NFC”。

Note that if this is the first time you’ve used the Automations feature, you don’t have to tap the plus sign (+).

请注意,如果这是您第一次使用自动化功能,则不必点击加号(+)。

ios自动化构建 苹果创建自动化在哪_java_20

Tap “Scan” next to the “NFC Tag” option.

点击“ NFC标签”选项旁边的“扫描”。

ios自动化构建 苹果创建自动化在哪_android_21

Hold the NFC tag near the top of your iPhone to scan it.

将NFC标签放在iPhone顶部附近以进行扫描。

ios自动化构建 苹果创建自动化在哪_ios_22

After you scan it, name the NFC tag, and then tap “Done.”

扫描后,命名NFC标签,然后点击“完成”。

ios自动化构建 苹果创建自动化在哪_ios自动化构建_23

You’re returned to the “New Automation” screen; tap “Next.”

您将返回到“新自动化”屏幕; 点击“下一步”。

ios自动化构建 苹果创建自动化在哪_蓝牙_24

In the “Actions” screen, tap “Add Action.”

在“操作”屏幕中,点击“添加操作”。

ios自动化构建 苹果创建自动化在哪_android_25

Here, you can browse through the suggested actions or search for one in particular. Tap an action to select it. In this example, we’ve selected a “Send Message” action.

在这里,您可以浏览建议的操作或特别搜索一个。 点按一个动作将其选中。 在此示例中,我们选择了“发送消息”操作。

ios自动化构建 苹果创建自动化在哪_ios_26

In the “Actions” editor, you can configure the action parameters, like the message text. When you’re finished, tap “Next.”

在“动作”编辑器中,您可以配置动作参数,例如消息文本。 完成后,点击“下一步”。

ios自动化构建 苹果创建自动化在哪_ios自动化构建_27

In the “New Automation” overview screen, make sure you toggle-On “Ask Before Running.”

在“新自动化”概述屏幕中,确保启用“运行前询问”。

ios自动化构建 苹果创建自动化在哪_java_28

In the popup, tap “Don’t Ask” to enable an automatic background trigger feature.

在弹出窗口中,点击“不询问”以启用自动背景触发功能。

ios自动化构建 苹果创建自动化在哪_java_18

Now, simply hold your iPhone close to the NFC tag or tap the top part of your iPhone on an NFC sticker to run the shortcut.

现在,只需将iPhone靠近NFC标签,或在NFC标签上点击iPhone的顶部即可运行快捷方式。

The Automations feature in Shortcuts is just one of the many new and awesome features in iOS 13. After you upgrade, you might also want to try enabling the dark mode.

“快捷方式”中的“自动化”功能只是iOS 13中众多新增功能和令人敬畏的功能之一 。 升级后,您可能还想尝试启用暗模式 。

翻译自: https://www.howtogeek.com/442760/how-to-create-automations-on-an-iphone-or-ipad/

ipad iphone开发