ipad iphone開發_如何在iPhone或iPad上創建自動化

ipad iphone開發

ipad iphone開發

The "Running Your Automation" shortcuts notification on an iPhone.
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上創建基於通知的無觸發器自動化。

自動化如何在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進行物理操作的快捷方式會自動運行(有關更多信息,請參見下文)。

RELATED: What Are iPhone Shortcuts and How Do I Use Them?

相關: 什麼是iPhone快捷方式以及如何使用它們?

如何在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, BluetoothDo Not DisturbLow 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應用程序時播放舒緩音樂的快捷方式。 打開「快捷方式」應用程序,然後在底部的工具欄中點擊「自動化」。

Tap "Automation."

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.

接下來,點擊頂部的加號(+)。 如果這是您第一次使用自動化功能,則可以跳過此步驟。

Tap the plus sign (+).

Here, tap 「Create Personal Automation.」

在這裏,點擊「創建個人自動化」。

Tap "Create Personal Automation."

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

您會看到我們上面概述的操作列表。 滾動到屏幕底部,然後點擊「打開應用」。

Tap "Open App."

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.」

在「應用程序」部分中點擊「選擇」。 搜索,然後選擇應用程序。 點擊「完成」返回上一屏幕,然後點擊「下一步」。

Tap "Next."

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

現在,點擊「添加操作」。 您可以滾動瀏覽建議的操作或根據應用和類別瀏覽操作。

Tap "Add Action."

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.」

在「操作」部分,點擊「播放音樂」。

Tap "Play Music."

On the next screen, tap 「Music.」

在下一個屏幕上,點擊「音樂」。

Tap "Music."

Tap the 「Search」 bar to find a playlist or song, or browse your library.

點按「搜索」欄以查找播放列表或歌曲,或瀏覽您的音樂庫。

Tap "Library."

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

瀏覽列表,然後點擊歌曲或播放列表以查看詳細視圖。

Tap the song or playlist.

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

找到所需的播放列表或歌曲後,點擊加號(+)將其選中。

Tap the plus sign (+).

Tap 「Next.」

點擊「下一步」。

Tap "Next."

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.」

當您對自動化感到滿意時,請點擊「完成」。

Tap "Done."

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應用程序時,將播放您選擇的播放列表或歌曲。 如果您未啓用後臺觸發功能,則會看到一條通知。 點擊「運行」以啓動快捷方式。

Tap "Run."

如何在後臺運行自動化 (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.

從「自動化」選項卡中選擇快捷方式,然後啓用「運行前詢問」功能。

Tap the "Ask Before Running" toggle to enable it.

From the popup, tap 「Don’t Ask.」

在彈出窗口中,點擊「不要問」。

Tap "Don't Ask."

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

現在,當快捷方式被觸發時,您將看到一條通知,指出「運行自動化」。

The "Running Your Automation" shortcut notification.

如何創建基於NFC的自動化 (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 (+).

請注意,如果這是您第一次使用自動化功能,則不必點擊加號(+)。

Tap "NFC."

Tap 「Scan」 next to the 「NFC Tag」 option.

點擊「 NFC標籤」選項旁邊的「掃描」。

Tap "Scan."

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

將NFC標籤放在iPhone頂部附近以進行掃描。

The "Ready to Scan" screen on an iPhone.

After you scan it, name the NFC tag, and then tap 「Done.」

掃描後,命名NFC標籤,然後點擊「完成」。

Type a name for your NFC tag.

You’re returned to the 「New Automation」 screen; tap 「Next.」

您將返回到「新自動化」屏幕; 點擊「下一步」。

Tap "Next."

In the 「Actions」 screen, tap 「Add Action.」

在「操作」屏幕中,點擊「添加操作」。

Tap "Add Action."

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.

在這裏,您可以瀏覽建議的操作或特別搜索一個。 點按一個動作將其選中。 在此示例中,我們選擇了「發送消息」操作。

Tap an action in the "Suggestions" list.

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

在「動作」編輯器中,您可以配置動作參數,例如消息文本。 完成後,點擊「下一步」。

Customize the action, and then tap "Next."

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

在「新自動化」概述屏幕中,確保啓用「運行前詢問」。

Tap the "Ask Before Running" toggle to enable it.

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

在彈出窗口中,點擊「不詢問」以啓用自動背景觸發功能。

Tap "Don't Ask."

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中衆多新增功能令人敬畏的功能之一 。 升級後,您可能還想嘗試啓用暗模式

RELATED: The Best New Features in iOS 13, Available Now

相關: iOS 13中的最佳新功能現在可用

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

ipad iphone開發