Rainfly answers one question at camp: should the rainfly go on tonight? It reads the night's forecast for your campsite and gives a yes or no with the reason, such as "Dew likely by 4 AM" or "Rain 35% after 2 AM", watches for changes through the night, and in the morning says whether the tent packs dry and how the forecast did. It runs on iPhone and on Apple Watch, each a complete app without the other, with no account, no ads and no analytics.
It is deliberately narrow. There is no radar, no weather map, no hourly chart and no week ahead, only what tonight means for your gear.
The main screen changes with the time of day at the camp. From noon until 22:00 it shows tonight's verdict. "Rainfly on" means at least one check fired, and the line under it names the one that matters most and when. "Rainfly off" means every check is clear. Notes below that suggest opening the vents when the rainfly is on and the air is damp or still, warn when the night will be colder than your sleeping bag's comfort rating, and give the morning the tent should be dry by, and a line warns of rain or storms due before the night starts. From 22:00 to sunrise it shows what has changed since the 22:00 forecast, Apple Weather's estimate of the weather right now with the barometer's trend, and the dew-point gap and chance of rain for each hour until sunrise, on a dark screen tinted red to keep eyes used to the dark unless the red is turned off in Settings. From sunrise to noon it says whether the tent will be dry by the time you plan to pack up, recalls what Rainfly said at 22:00 and whether the forecast changed overnight, and, once WeatherKit's record of the night is in two hours after sunrise, marks each check right or wrong with what actually happened; tonight's forecast is a tap away until it takes over at noon. A night is judged against its forecast as of 22:00, or as of sunset where the sun sets later. The camp and the age of the forecast are shown with it, the age turning orange after twelve hours and red after a day. The iPhone lists every check under the verdict, the ones that fired first, each with its symbol, its time and the night's value against its threshold, and tapping one tells why it matters and when it puts the rainfly on; the night's low, closest dew-point gap and highest rain chance follow. On the watch, All checks under the verdict opens the same list. On first launch the iPhone introduces itself, offers the dew diary, and starts from your location or from a camp you add; Settings can show the welcome again.
The checks are independent, and any one of them puts the rainfly on: thunderstorms overnight or before you pack up, rain during the night, a lower chance of rain on a windy night, frost or dew on a clear and calm night, rain in the morning before you pack up, and a cold night. Each threshold can be changed in Settings under Checks, grouped by the check it belongs to, and Reset to defaults puts them back; Settings also holds the units, the time you plan to pack up and the bag rating.
Forecasts are fetched while the device has a connection and kept on it, so the verdict holds in the backcountry. Camps holds the places you sleep. My Location is the device's own position. A camp can be added by searching for a campground, park, town or address, from the current position, or by coordinates in degrees and decimal minutes, entered with the Digital Crown on the watch or typed on the iPhone, which also takes decimal degrees and can place a camp by panning a map under a pin. Tapping a camp shows it from tonight on and leaves the trip as it is. The trip plans a camp for each night ahead, the main screen switches to it on those evenings, and Download trip fetches every night within a week so they are ready when the signal is gone. On the iPhone, each downloaded night of the trip shows its verdict and opens to its checks.
With both apps installed, the iPhone and the watch keep the same camps, trip, shown camp and settings, and a night downloaded on one is handed to the other, so a trip downloaded on the phone at home is on the watch at the trailhead. Each keeps its own My Location. When both have changed something while apart, each camp, night of the trip and setting keeps whichever change was made later, so changes to different things all survive.
The verdict also sits on the watch face as a complication in the circular, corner, rectangular and inline slots, and on the iPhone as a Home Screen widget and on the Lock Screen, following the same parts of the day: what has changed since 22:00 overnight, and whether the tent packs dry in the morning. With the overnight alert on, which it is unless turned off, the device sends one notification a night when a forecast fetched after 22:00 puts the rainfly on and the 22:00 forecast had it off. With the pressure alert on, the device reads its barometer on background refreshes through the night and sends a notification when the pressure falls fast while the rainfly is off. watchOS grants an app a few background refreshes an hour, more when its complication is on the active face, and iOS grants the phone fewer and less regular ones, so both alerts are coarse sampling rather than continuous monitoring and can come late. While the watch has its own pressure or overnight alert on, the phone keeps that alert quiet, so one change brings one notification.
The dew check is the forecast other weather apps do not make, so the iPhone can keep a dew diary to check it against your own mornings. Turned on in the welcome or in Settings, it keeps each night's forecasts, and from sunrise the main screen says what Rainfly expected on something left out overnight and asks whether it was right: yes, partly (light dew), no, rain, or didn't check. Only a no asks what was found and whether it stood under open sky or under cover; a yes takes the place from the last answer. An optional reminder comes half an hour before you pack up. Once the night is over, the phone fetches it again from WeatherKit's history. The diary screen counts the nights the dew forecast got right, the dew it missed and the dew it forecast that never came, says for each miss whether the forecast was wrong about the night or the settings called a correctly forecast night wrong, and, once it holds enough open-sky nights of both kinds, suggests the dew-point gap that would have done best, which one tap applies, there and on the morning screen; until then it shows how many nights it has toward a suggestion. Share with Excelano, which starts on and can be turned off in Settings, sends each answered night to Excelano's database in Apple's iCloud to help improve the dew check: what was found, the night's forecast and history, the thresholds, the camp's position rounded to 0.1° and a random diary ID, but no camp names or exact positions. A new diary ID and deleting the shared nights are on the diary screen.
Open Zeltwetter.xcodeproj in Xcode. The Zeltwetter scheme builds and archives the iPhone app, which embeds the watch app. The Zeltwetter Watch App scheme builds the watch app for a watch or the simulator and runs the tests. Code both apps use lives in Shared/, the iPhone's own in Phone/ and the watch's in Watch/. The widgets are extensions of their own, ZeltwetterPhoneWidgets in PhoneWidgets/ and ZeltwetterWidgets in WatchWidgets/, each sharing the forecast cache and settings with its app through an App Group.
The identity a fork changes, meaning the team id, the bundle ids, the App Group and the display name, lives in Config/Zeltwetter.xcconfig, and the version in Config/Version.xcconfig. The iPhone and watch App IDs need the WeatherKit capability and service and the App Group, and the iPhone widgets' App ID needs the App Group. The project has no dependencies beyond Apple's frameworks.
The rule engine in Shared/Engine uses Foundation alone and is covered by the tests, as are the sync rules in Shared/Sync. A Debug build launched with --demo and one of clear, rain, storm, dew or frost replaces WeatherKit and the location with a fixed two-night trip whose first night gives that verdict, and --open also opens a screen; Shared/Support/Demo.swift has the details. tools/dewdiary is a command-line tool, built from the same engine and judging code, that reads the shared dew diary nights from CloudKit with Excelano's server-to-server key and reports how each dew spread would have done on them; install.sh there builds it into ~/bin. Sync between the apps can be checked on a paired iPhone and watch simulator for the shared state, but WatchConnectivity does not deliver handed-on nights in Simulator, so that part needs real devices.
Rainfly sends a camp's position to Apple's WeatherKit for its forecast, and to Apple's map service when a camp is added or searched for. It reads your location while it is on screen, with permission, and the barometer during the night when the pressure alert is on. Forecasts, camps, the trip, settings, recent pressure readings and the dew diary stay on your devices, passing between your iPhone and your watch over WatchConnectivity when both apps are installed. The one exception is a shared dew diary, whose answered nights go to Excelano's CloudKit database as described above. The privacy policy is at https://excelano.com/legal/#rainfly.
MIT. See LICENSE.