ShareShortcuts
Fork “Wi-Fi or Data?”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so gollap-exe gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
39K
Saved
1
Actions
17
Category
API
Version
1.0
Language
EN

A simple shortcut that detects whether you are on flight mode (stopping the shortcut), Wi-Fi or Data. Feel free to use in your own shortcuts, no credits needed!

What's New

Version 1.0

First release

Version History
1.0 Sep 4, 2022

First release

What it does

17 actions
  1. Show Alert
  2. Get IP Address
  3. If
  4. Show Alert
    Error
  5. Stop This Shortcut
  6. Get Device Details
  7. Wait
  8. Get Network Details
  9. If
  10. Comment
    This detects if the user is on Wi-Fi or Data, because shortcuts doesn’t allow us to set variables to custom text, we have to set it to something like the device model instead.
  11. Set Variable
    On Wi-Fi
  12. If
  13. Set Variable
    On Wi-Fi
  14. If
  15. Show Alert
  16. If
  17. Show Alert

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/network'
#define color green

confirm("Getting Network Details..")
const CurrentIPAddress = getExternalIP()

if !CurrentIPAddress {
	alert("You are on Airplane Mode!", "Error")
	stop()
}
getDeviceDetail("Device Model")
wait(3)
const NetworkDetails = getWifiDetail("Network Name")

if NetworkDetails {
	// This detects if the user is on Wi-Fi or Data, because shortcuts doesn’t allow us to set variables to custom text, we have to set it to something like the device model instead.

	@OnWiFi
} else {
	@OnWiFi = nil
}

if @OnWiFi {
	confirm("You are using Wi-Fi!")
} else {
	confirm("You are using Data!")
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by gollap-exe

See All

You Might Also Like

See All
Advertisement