Commit Graph

449 Commits

Author SHA1 Message Date
Paul Plant a7edde85b4 Merge branch 'develop' into watch-app-3 2024-03-12 14:59:01 +00:00
Paul Plant 4f0b9589e6 widget + live activity view updates 2024-03-12 11:58:14 +01:00
Paul Plant 3229a0e532 watch app improvements, follower mode data source, iOS widget improvements
- also widget data is stored in a new userDefaults variable based upon the app bundle to avoid cross-contamination if various versions are installed on the same device
2024-03-10 11:35:05 +01:00
Paul Plant 48beccc216 implement follower mode functionality for Watch App 2024-03-06 09:15:00 +01:00
Paul Plant 2929118301 added widget .accessoryRectangle + various improvements 2024-03-05 17:22:50 +01:00
Paul Plant d671e6ab0a WidgetKit implementation for Watch and xDrip targets 2024-03-04 20:04:07 +01:00
Paul Plant 214ab60ac8 update 240226 2024-02-26 18:10:53 +01:00
Paul Plant c0308aa7f9 update 240225 2024-02-25 12:39:47 +01:00
Johan Degraeve f631d54bd8 DexcomG7 companion mode
Identifies the Dexcom G7 without the need for filling in the device name. Requires that the official Dexcom App always runs in parallel.
2024-02-25 12:15:25 +01:00
Paul Plant c581b2bbcd initial wkcomplication structure 2024-02-23 17:42:23 +01:00
Paul Plant da7b119ec2 update 240223 2024-02-23 12:02:24 +01:00
Paul Plant f6ec1deba9 add refresh timer to watch view 2024-02-22 14:36:37 +01:00
Paul Plant e7e45aaec1 update 240221a 2024-02-21 18:56:10 +01:00
Paul Plant 8ea699d1b8 update 240221 2024-02-21 10:38:59 +01:00
Paul Plant 4742bab560 Update project.pbxproj 2024-02-20 10:36:48 +01:00
Paul Plant 007c8328ba update 240219 2024-02-19 20:22:20 +01:00
Paul Plant 26057fd272 refactoring and cleaning up
removed widget/watch specific/duplicated extensions, moved common data models to xDrip target and made sure targets are set correctly for all common files.
2024-02-14 19:59:53 +01:00
Paul Plant 0e51afe250 Merge branch 'develop' into watch-app 2024-02-13 22:16:52 +01:00
Johan Degraeve 89b03ec2ee Libre3 and/or Dexcom G7 and/or OmniPod as heartbeat
- Libre 3 or Dexcom G7 as heartbeat
  - Libre 3 as heartbeat: avoids the need for audioPlayer that keeps the app alive in the background. When Libre 3 sends data, xDrip4iOS will wake up and fetch a reading from LibreView
  - Dexcom G7 as heartbeat: only useful in combination with Loop. Loop must read the Dexcom G7 readings and upload to NightScout. xDrip4iOS will wake up when G7 sends data and will fetch the latest reading from NightScout. This occurs with a delay (Thread.sleep) of 1 second, to give time to loop to upload the reading to NightScout. Sometimes xDrip4iOS is still to early to fetch the reading. In that case, it may help to delete the heartbeat and recreate it.
  - OmniPod as heartbeat: for OmniPod users, this is a useful additional heartbeat. OmniPod has the interesting 'feature' to disconnect and reconnect every few minutes. Which allows to call the heartbeat function.
  - M5Stack as heartbeat: this is implemented as part of the M5Stack transmitter, it does not appear in the list of heartbeat devices. M5Stack will wake up xDrip4iOS if it didn't receive a reading from xDrip4iOS for more than 5 minutes. This allows xDrip4iOS to download the latest reading and send it to the M5Stack. Needs the latest release of M5stack or M5Stick-C software : https://github.com/JohanDegraeve/M5_NightscoutMon or https://github.com/JohanDegraeve/M5_StickC_xdrip_iOS

- the change required also to re-enable alarms, notifications, badge counter, ... when user has chosen followerBackgroundKeepAliveType disabled

- To use Libre 3 has heartbeat:
 - First connect to Libre 3 with official Libre 3 app
 - when connected, go to the iOS settings and read and note the name of the Libre (it's not something with ABBOTT in it, it's more like a random string)
 - force close the Libre 3 app
 - in xDrip4iOS, go to the bluetooth section
 - add a new transmitter of type HeartBeat
 - select Libre 3
 - as transmitter id, fill in the name you read in the iOS settings, just 4 or 5 characters is enough. It's case insensitive.
 - click the scan button. (you will not be asked to do NFC scan)
 - wait till connected
 - now reopen the official Libre 3 app

- To use Dexcom G7 as heartbeat:
 - make sure you connected at least once to the Dexcom G7 with the official Dexcom app and/or Loop.
 - Not necessary to force close other apps (like Official Dexcom G7 app and Loop)
 - go to the iOS settings and read and note the name of the Dexcom G7. It's case insensitive.
 - in xDrip4iOS, go to the bluetooth section
 - add a new transmitter of type HeartBeat
 - select Dexcom G7
 - as transmitter id, fill in the name you read in the iOS settings.
 - click the scan button. (you will not be asked to do NFC scan)
 - wait till connected

- To use OmniPod as heartbeat:
 - Force close any other app that connects to the OmniPod (that should only be Loop)
 -  - in xDrip4iOS, go to the bluetooth section
 - add a new transmitter of type HeartBeat
 - select OmniPod
 - click the scan button
 - wait till connected
 - you can now reopen Loop
2024-02-13 21:52:40 +01:00
Paul Plant cfc97aa94c basic layout implemented 2024-02-13 20:20:19 +01:00
Paul Plant bc7801d307 rename old WatchManager to CalendarManager. Add placeholder new WatchManager 2024-02-11 12:54:13 +01:00
Paul Plant 1c2e230df9 old Watch App removal 2024-02-05 21:52:55 -06:00
Paul Plant e795fcece6 update 2024-01-21 11:54:04 +01:00
Paul Plant 55ca10a950 revert deployment target back down to iOS15 and add availability checks
also added fallback for live activity settings ui to show as disabled when iOS16.2 is not available
2024-01-03 17:03:24 +01:00
Paul Plant ebd5dc2335 update 2024-01-03 16:13:30 +01:00
Paul Plant 58f52c7957 new attributes model 2023-12-31 12:21:38 +01:00
Paul Plant fcdc5685ba initial attributes + view + variable groups + version etc 2023-12-30 17:59:57 +01:00
Paul Plant c61a47b541 remove old Today widget to leave clean build
- remove old widget target
- remove references
- remove files
- keep a copy of the localized text files and extensions used by the old widget as they can be re-used (stored in TodayWidgetSaved folder)
- app builds cleanly without anything left of old widget
2023-12-29 11:42:10 +01:00
Paul Plant bd6ce1c184 add user-defined TIR back but in a better way
to avoid adding extra menu lines, use an enum to track the TIR type chosen and allow the user to just chose directly, or cycle through by double-tapping the statistics view
2023-12-24 15:00:26 +01:00
Paul Plant d63da46f4a update widget style to match main app
...and also fix watch app build name mistake in earlier commit :)
2023-12-19 12:04:45 +01:00
Paul Plant fc3f710c4d Correct pbxproj 2023-12-18 12:16:36 +01:00
Paul Plant af42ec78e9 implement "Time in Tight Range" option
Removed old TIR option based on user-set values in favor of the newer "Time in Tight Range" method.

Two options are now:
- standardized TIR (70-180mg/dL)
- newer TITR (70-140mg/dL)

- https://diatribe.org/time-tight-range-new-diabetes-goal

- added double tap gesture to the statistics view to quickly change between both types.

-
- added transition so that the user is visually shown which limits are changed when changing types

- added localization. Initial translations for EN, ES.

- changed many of the settings menu row descriptions to remove the "?" from them to clean up the look of them.
2023-12-18 12:12:50 +01:00
Paul Plant 462a59efe7 data source + sensor progress views updated
- initial translations added (EN, ES)
- server connectivity indicator for follower modes to indicate when there is a working connection to the server
- data source URL for Nightscout follower can be hidden during 20 seconds by double-tapping it (for posting screenshots)
- ConstantsDexcomFollower.swift renamed to ConstantsFollower.swift (as it was never related to Dexcom Follower anyway :) )
2023-12-17 15:57:46 +01:00
Paul Plant 3e54d142e2 disable Address Sanitizer + CryptoSwift package version update
disable the Address Sanitizer in the schema to avoid build issues to physical devices when using Xcode 15.1
2023-12-12 20:37:21 +01:00
Paul Plant 9bf0d45007 screen lock dimming overlay 2023-11-29 20:05:33 +01:00
Paul Plant b314001881 initial implementation background keep-alive modes 2023-11-13 13:15:09 +01:00
Paul Plant 60874af5fd initial implementation sensor info view
- replaces the old image-based sensor countdown (only for Libre)
- will now work for all CGM systems that report a sensor start date (or sensor age in the case of Libre)
- if no current/valid data is found, the view remains hidden
- currently showing for Libre 2 EU BLE (14.5 days), compatible Libre via external transmitter (14.5 days), Dexcom G5/G6/One (10.0 days) and LibreLinkUp follower (14.0 days)
- starts at 0% progress for 0d and finishes at 100% progress for maxAge as per above line
- To simply UI, sensor countdown options are removed completely
- All maxAge values are in Constants file for easy updating if ever needed
2023-11-06 19:03:29 +01:00
Paul Plant 1ffa140b05 clean phantom DataSource group 2023-10-27 23:45:38 +02:00
Paul Plant e1e32598ff LibreLinkUp Follower - initial implementation 2023-10-24 18:21:29 +01:00
Paul Plant 51f01532f6 correct $(MAIN_APP_BUNDLE_IDENTIFIER) in watch app target 2023-09-25 11:06:16 +02:00
Paul Plant 64cfae2e23 update project configuration as per compiler recommendations 2023-09-23 10:59:31 +02:00
Paul Plant fcca3becde update project to work with new iOS17 EKEventStore requirements 2023-09-22 20:31:34 +02:00
Johan Degraeve 1ab06a7577 version 4.11.5 - build 4189 2023-09-16 14:02:43 +02:00
Liroy van Hoewijk 4091be7bd4
Fix AVAudioPlayer decoding issues (#458)
Reencode all sound files as .caf files with PCM mono LIE16 to prevent AVAudioPlayer() from crashing on locally installed instances via Xcode. This stops AVAudioPlayer from crashing in iOS17.
2023-09-15 21:29:17 +02:00
Paul Plant d27d20c905 Update project.pbxproj 2023-07-31 21:57:03 +02:00
Paul Plant 5e252cc0a3 tidy up prior to merge 2023-07-30 20:59:59 +02:00
Paul Plant f5b8f87920 nl translation added - pbxproj tidy-up 2023-07-30 20:53:56 +02:00
Paul Plant 1227b48392 initial translations for bg readings view 2023-07-30 20:53:47 +02:00
Paul Plant 1aba8029f9 initial commit - bg readings swiftui view 2023-07-30 20:53:15 +02:00
bjornoleh a13f11aa7a
FastLane and GitHub Actions for Mac-free install, for semi-automated TestFlight distributions (#419)
* Copy FastLane and GitHub Actions for Mac-free install

Copied from FreeAPS-X, not yet adapted to Xdrip4iOS. Originally based on FastLane and GitHub Actions from LoopKit/LoopWorkspace

* Adapt Fastfile and workflow file, rename workflow file to build_xdrip.yml

* Adapt instructions to Xdrip4iOS

* Fastfile: fix scheme (xdrip)

* xDrip.xcconfig: MAIN_APP_BUNDLE_IDENTIFIER = com.$(DEVELOPMENT_TEAM).xdripswift

* Add CURRENT_PROJECT_VERSION = $(CURRENT_PROJECT_VERSION) to xDrip and xdrip4iOS Widget targets

* testflight.md instructions: Add NFC Tag Reading to xdripswift App ID

-and some adjustments to identifier names

* Validate repository secrets

Copied from https://github.com/LoopKit/LoopWorkspace/pull/36

Validate repository secrets (#36)
* Validate repository secrets

Adds support for validation of repository secrets.

* Validate $FASTLANE_KEY as unencrypted PKCS#8

* Number workflows to guide sequential exection

* Add commented-out template for automated builds on push and on schedule (every two months)

Users must uncomment (remove "#") from the start of the lines indicated in the workflow to enable automated builds.

* testflight.md: Add Validate Secrets

instructions, and add numbered workflows.

* testflight.md: Add info about TestFlight on a child’s phone

* testflight.md: add info about steps to re-use for "Browser Builds" of other apps

* Add NFC tag reading capability to TestFlight app from Fastfile

Remove step for manual setup of NFC tag reading capability from testflight.md

* Always upload artifacts

* build_xdrip.yml: remove "secrets" job

No need to validate secrets for every build. This can be done by running Validate secrets manually.

- remove "with: submodules: recursive" from Checkout action

* build_xdrip.yml: Add branch name to run-name

* testflight:md: update instructions

* Build on macos-13 and Xcode 14.3

macos-13 is still in beta as GitHub Actions runner, but works well.

Available Xcode versions are listed here, Xcode 14.2 is currently the default:
https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode

* Remove $(SRCROOT)/ from  INFOPLIST_FILE due to build error with Fastlane


INFOPLIST_FILE = "$(SRCROOT)/xdrip/Supporting Files/Info.plist"

Fastlane error:
-Cannot set build number with plist path containing $(SRCROOT)
-Please remove $(SRCROOT) in your Xcode target build settings
More info: https://github.com/fastlane/fastlane/issues/329

* build_xdrip.yml: correct app name (xDrip4iOS) in workflow name

* Sync changes from upstream, and keep repository "alive" 

The keep alive action allow scheduled runs beyond the 60 day repo inactivity limit for scheduled GitHub Actions

* build_xdrip: SYNC_UPSTREAM: 'true' / 'false'
2023-06-02 11:13:42 +02:00