December 4, 2026
70067-147705-IMG_0083-xl.jpg

I show You how To Make Huge Profits In A Short Time With Cryptos!

Figuring out the UV index earlier than heading outdoors solely tells you a part of the story. I constructed a shortcut for iPhone and iPad that estimates how a lot UV radiation publicity provides up throughout out of doors actions.

My colleague Wesley Hilliard has been on a mission to fill as many information classes in Apple Well being as potential utilizing apps and automation. Logging the UV index proved significantly difficult with out sharing private data with a third-party app.

Wes finally constructed an automation that information the present UV index each time he begins an out of doors exercise. Apple Well being receives the measurement, however the automation would not account for a way lengthy he is been outdoors.

I wished to see if Shortcuts may take publicity length under consideration. It was additionally an excellent alternative to experiment with the persistent storage options Apple launched in iOS 27 and iPadOS 27.

My shortcut, known as Observe UV Publicity, saves particular person UV index readings in Apple Well being and maintains a historical past of estimated radiation doses inside Shortcuts. You do not want an Apple Watch, specialised sensors, or third-party apps.

How you can monitor UV publicity on iPhone and iPad

I’ve added feedback all through the shortcut explaining what the actions do and why they’re obligatory. You’ll be able to change how the shortcut works or use it as a reference when constructing your individual automations.

You will want an iPhone working iOS 27 or an iPad working iPadOS 27. Shortcuts could ask for permission to entry your location, write information to Apple Well being, and save exported information.

  1. Run Observe UV Publicity earlier than starting an out of doors exercise.
  2. Choose Start Outside Exercise.
  3. Run the shortcut once more while you’ve completed.
  4. Choose Finish Outside Exercise.

The 2 menu choices inform the shortcut while you’ve began and completed spending time open air. If you end, a notification shows your estimated radiation dose.

You will discover the person UV index readings beneath Different Knowledge in Apple Well being. Choosing View Publicity Historical past permits you to assessment accomplished classes instantly from the shortcut, and you too can export your information to be used in a spreadsheet.

Tablet screen displaying a health or exposure tracking app, with a pop-up menu listing activity phases like begin or end outdoor activity, view exposure history, and export exposure historyRun Observe UV Publicity earlier than starting an out of doors exercise

Be sure you finish the session as quickly as you end your exercise. Should you neglect and run the shortcut a number of hours later, it’s going to depend the additional time towards your estimated publicity.

Measuring greater than the UV index

The UV index tells you ways intense ultraviolet radiation is and takes under consideration its skill to trigger sunburn. Checking the UV index in Climate earlier than going for a stroll is beneficial, however spending extra time open air means probably accumulating extra radiation publicity.

For instance, spending an hour outdoors beneath a relentless UV index of three leads to the identical ambient radiation dose as spending half an hour beneath a UV index of 6. The radiation is twice as intense within the second situation, however you are uncovered to it for half as lengthy.

Scientists measure cumulative UV publicity in customary erythema doses (SED). In keeping with the Worldwide Company for Analysis on Most cancers, one SED equals 100 joules per sq. meter of ultraviolet radiation weighted by its skill to trigger pores and skin reddening.

Consider the UV index as a measure of depth and SED as a measure of how a lot radiation has amassed over time. The distinction makes it potential to match out of doors actions of various lengths.

My shortcut estimates ambient radiation quite than measuring how a lot reaches your pores and skin. It would not know whether or not you are sporting sunscreen, sitting within the shade, or protecting your pores and skin with clothes.

Apple added assist for UV publicity to HealthKit in iOS 9. Builders can document UV index measurements over time, however Apple would not present a devoted measurement for cumulative radiation doses in SED.

Constructing a shortcut that remembers your exercise

I began with a Select from Menu motion to offer customers two choices for beginning and ending a session. Conserving every little thing in a single shortcut makes it simpler to make use of, however there’s an issue with how Shortcuts usually handles data.

Unusual variables lose their values as soon as a shortcut finishes working. Should you document the UV index and begin time earlier than a stroll, the shortcut will not keep in mind both worth while you run it once more an hour later.

Apple demonstrated its new storage actions at WWDC 2026. Shortcuts can now save data for future runs with out counting on a third-party app or making a separate file.

Shortcuts makes use of names known as storage keys to retrieve saved data later. Persistent storage helps information varieties together with dates, numbers, and lists, and saved values can sync throughout units by iCloud.

Tablet screen displaying a health or research app, showing text instructions, activity options with colored icons, and a side panel containing code-like data fields and a toggle switchShortcuts makes use of names known as storage keys to retrieve saved data later

When you choose Start Outside Exercise, the shortcut captures the present date and time and retrieves the native UV index from Climate. Two Retailer Content material actions save the data beneath separate keys.

  • uv_start_date shops the beginning date and time.
  • uv_start_index shops the beginning UV index.

A Log Well being Pattern motion information the beginning UV index and its timestamp in Apple Well being. Choosing Finish Outside Exercise retrieves each saved values, checks Climate for the newest UV index, and captures the present date and time.

Earlier than doing any math, the shortcut checks that it has all the data it wants. It additionally makes positive the ending time comes after the beginning time so it would not calculate a detrimental exercise length.

A UV index of zero continues to be a sound studying. The shortcut checks whether or not Climate returned a measurement with out requiring the worth to be larger than zero.

Calculating cumulative UV publicity

The shortcut must know the way lengthy you have been outdoors and the way sturdy the UV radiation was throughout that point. A Get Time Between Dates motion calculates what number of seconds handed between the beginning and finish of your exercise.

Since there are 3,600 seconds in an hour, the shortcut divides the elapsed time by 3,600 to transform the length into hours. It then provides the beginning and ending UV index readings collectively and divides the sum by two to search out the typical.

If the UV index was 4 while you began and 6 while you completed, the typical could be 5. The shortcut makes use of that tough estimate of UV depth and the exercise length to calculate the radiation dose utilizing the next formulation.

0.9 ? Common UV Index ? Elapsed Hours

The quantity 0.9 comes from how scientists outline the UV index and customary erythema dose. Every level on the UV index represents 0.025 watts per sq. meter of ultraviolet radiation weighted by its skill to trigger sunburn.

Multiplying 0.025 by the three,600 seconds in an hour provides us 90 joules per sq. meter. Dividing by 100, the variety of joules per sq. meter in a single SED, provides us 0.9.

In sensible phrases, spending an hour outdoors beneath a relentless UV index of 1 leads to an ambient radiation dose of 0.9 SED. A 30-minute exercise beneath a relentless UV index of 6 would lead to 2.7 SED.

Storing your UV publicity historical past

After watching Apple’s WWDC presentation on Shortcuts storage, I spotted I may preserve your entire publicity historical past inside the shortcut. Apple demonstrated how an automation may retrieve a listing of beforehand generated info, add one other truth to the listing, and reserve it for future runs.

I utilized the identical method to UV publicity monitoring utilizing a mix of dictionaries and lists. A dictionary teams associated items of knowledge beneath named keys, very like a spreadsheet row with labeled columns.

Every accomplished session creates a dictionary containing six items of knowledge.

  • Exercise ending date and time
  • Exercise length in hours
  • Beginning UV index
  • Ending UV index
  • Common UV index
  • Estimated radiation dose in SED

The shortcut retrieves the prevailing publicity historical past, provides the brand new dictionary to the listing, and saves the up to date listing in persistent storage. Every dictionary represents a separate session, so including one other document would not change the earlier one.

A separate menu choice retrieves the saved historical past and codecs the data for simpler studying. I additionally saved the choice to export the information as a CSV file for anybody who needs to research their publicity in Numbers or Excel.

Again within the Finish Outside Exercise part, a second Log Well being Pattern motion saves the ending UV index in Apple Well being. Two Delete Saved Content material actions then erase the beginning date and UV index with out affecting the publicity historical past.

Eradicating the momentary data prevents the shortcut from unintentionally reusing information from a accomplished session. A Present Notification motion finishes the method by displaying the estimated radiation dose.

Debugging the shortcut

Getting data from Climate into Apple Well being was pretty easy. Getting Shortcuts to recollect the right time took significantly extra work.

My unique design saved the beginning date and UV index collectively as a single piece of textual content, separated by a semicolon. On the finish of an exercise, the shortcut separated the 2 values and tried to show the textual content again right into a usable date.

An early check produced a detrimental exercise length and a detrimental radiation dose. One other check lasting roughly 42 minutes produced a recorded length of greater than two hours.

Subtracting the recorded length from the ending time recommended Shortcuts was deciphering the beginning time as midday, although I would began the session greater than an hour later.

Tablet screen displaying a UV exposure history document in a centered pop-up window, with text details listed and a workflow automation interface visible blurred in the backgroundShould you stroll, run, or cycle repeatedly, you could possibly use the shortcut to match estimated UV publicity from morning and afternoon actions.

I saved the beginning date and UV index individually so Shortcuts may retrieve each values with out reconstructing the date from textual content. After reconnecting the Apple Well being actions on my iPad, I ran a number of extra assessments to substantiate the length and radiation dose calculations have been appropriate.

A profitable check on November 27 lasted 5 minutes and 23 seconds. In the course of the session, Climate reported a drop within the UV index from 1 to 0.

The shortcut accurately calculated a median UV index of 0.5 and an estimated radiation dose of roughly 0.0404 SED. Each UV index readings appeared in Apple Well being, and the unique CSV log contained the right length and dose.

I additionally tried ending the session a second time with out beginning a brand new one. Shortcuts displayed a notification about lacking or incomplete session information, confirming that it wasn’t reusing data from the earlier exercise.

On November 29, I examined the revised model with persistent publicity historical past. Two separate classes lasting three minutes and 5 seconds and 6 minutes and 53 seconds confirmed that the shortcut may retain a number of information with out overwriting earlier entries.

Each classes had a UV index of zero, giving me one other alternative to confirm that the shortcut may save zero values. The saved historical past contained the right durations and radiation dose calculations.

The preliminary historical past viewer displayed the information as uncooked JSON, a format that is helpful for software program however tough to learn at a look. I added formatting to make the measurements simpler to know and efficiently examined exporting the saved information as a CSV file.

What you possibly can study from UV publicity information

Should you stroll, run, or cycle repeatedly, you could possibly use the shortcut to match estimated UV publicity from morning and afternoon actions. You may also discover substantial variations between in any other case an identical exercises in summer time and winter.

Exporting your publicity historical past to Numbers permits you to add up the estimated radiation doses from a number of out of doors actions. You’ll be able to create charts to look at how your publicity adjustments all year long or evaluate weekly and month-to-month totals.

For somebody who likes taking an hour-long stroll daily, the data may assist establish a time of day with decrease UV publicity with out shortening the stroll.

You will nonetheless have to observe established solar safety steering. The World Well being Group recommends safety when the UV index reaches 3 or larger.

The shortcut solely checks the UV index twice, so it may miss adjustments in radiation depth between readings. Passing clouds, for instance, can have an effect on UV ranges throughout an exercise with out both studying capturing the change.

Do not use the calculated dose to foretell sunburn, decide how lengthy it is secure to remain outdoors, or estimate your particular person threat of pores and skin most cancers.

I would prefer to see Apple construct cumulative UV radiation monitoring instantly into Well being. The Apple Watch can already document exercises and measure time open air in daylight, giving Apple a possible basis for extra automated monitoring.

What began as an try to fill an neglected class in Apple Well being grew to become an experiment in constructing a extra succesful monitoring software with Shortcuts. Apple’s persistent storage options let me accumulate, retain, assessment, and export data with no need a third-party app.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *