Skip to content

[iOS] Add feels-like value parsing for weather app support #3911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/ios/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
0.16: Always request Current Time service from iOS
0.17: Default to passing full UTF8 strings into messages app (which can now process them with an international font)
0.18: Fix UTF8 conversion (check for `font` library, not `fonts`)
0.19: Convert numeric weather values to int from BangleDumpWeather shortcut
0.19: Convert numeric weather values to int from BangleDumpWeather shortcut
0.20: Add feels-like temperature data field to weather parsing from BangleDumpWeather shortcut.
5 changes: 3 additions & 2 deletions apps/ios/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ E.on('notify',msg=>{
let weatherEvent = {
t: "weather",
temp: d.temp,
feels: d.feels,
hi: d.hi,
lo: d.lo,
hum: d.hum,
Expand All @@ -192,7 +193,7 @@ E.on('notify',msg=>{
loc: d.loc
}
// Convert string fields to numbers for iOS weather shortcut
const numFields = ['code', 'wdir', 'temp', 'hi', 'lo', 'hum', 'wind', 'uv', 'rain'];
const numFields = ['code', 'wdir', 'temp','feels', 'hi', 'lo', 'hum', 'wind', 'uv', 'rain'];
numFields.forEach(field => {
if (weatherEvent[field] != null) weatherEvent[field] = +weatherEvent[field];
});
Expand Down Expand Up @@ -345,4 +346,4 @@ E.emit("ANCS", {
} else {
Bangle.ancsConvertUTF8 = E.asUTF8;
}
}
}
4 changes: 2 additions & 2 deletions apps/ios/metadata.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "ios",
"name": "iOS Integration",
"version": "0.19",
"description": "Display notifications/music/etc from iOS devices",
"version": "0.20",
"description": "Display/pull notifications, music, weather, and agenda from iOS devices",
"icon": "app.png",
"tags": "tool,system,ios,apple,messages,notifications",
"dependencies": {"messages":"module"},
Expand Down