-
Notifications
You must be signed in to change notification settings - Fork 862
Add remote commands via APNS for Loop users #434
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
base: dev
Are you sure you want to change the base?
Add remote commands via APNS for Loop users #434
Conversation
1db6ba2
to
d5ce515
Compare
The app stops responding when modifying various rows in the Configure Loop APNS Settings section. Enclosed is the most recent ips file from my iPhone 15 pro. Loop Follow-2025-07-17-154247.ips.zip Once configured, the remote commands worked well. I'll do more testing after the crash is fixed and the branch conflicts are resolved. |
I tested again. (I used the latest commit, d593cce, merged dev to it and resolved the conflict). I can select all and remove each of the items in:
I can then add each item back in. I can use the Camera to rescan the QR code URL if the row is already filled out.
With this crash I am getting ips files on the SE 2nd gen but not on the iPhone 15 pro, even though they both act the same. Here's one: |
95183f5
to
33b2054
Compare
Simplified validation
Remove manual device token refresh and move debug info to main settings
The notes now say that Nightscout Remote is no longer supported for Loop. If that is the decision, I understand it. However, Nightscout should not be provided as an option on the Remote Settings screen if a Loop URL is detected. |
I just updated the RemoteSettingsView to conditionally enable the Nightscout remote type based on viewModel.isTrioDevice, ensuring it's only an option for Trio users. |
Test IssuesiPhone 15 observing a Loop URL When an override fails with the message "Failed to activate override invalid Nightscout URL", it needs to be a modal alert.
|
Test SummaryIf there is a network error - I think message should be network error - check before sending again and return to main screen Is there a way to make sure the NS URL and the TOTP are from the same site? And if they don't match - warn the user? Test DetailsThis is with SE 2nd gen phone running iOS 18.5: I have my APNS credential entered. As an experiment, I changed the QR Code URL to point to a different site and confirmed the value updated Then I issued an override
Then I changed back to the QR code URL that goes with test site 3
|
Updated the Override Presets view to improve user feedback and align with Trio Remote Control Changes:
|
Design comments (my opinion only, for consideration) On the main
On the main
The APNS settings are not
|
d4e45e0
to
770caf5
Compare
Summary
This commit implements remote commands via APNS (Apple Push Notification Service) for caregivers to Loop users, adding a new communication method for sending commands to Loop devices.
Key Changes
🆕 New Features:
APNS-based remote commands - New communication channel for Loop users
TOTP authentication - Added Time-based One-Time Password (TOTP) generator for secure authentication
QR code scanner - Simple QR code scanning functionality
Override presets - New system for managing and applying override presets
Enhanced remote settings - Improved remote configuration management
📱 New Views & Services:
LoopAPNSBolusView - Remote bolus commands interface
LoopAPNSCarbsView - Remote carb entry interface
LoopAPNSService - Core APNS communication service
LoopAPNSSettingsView - APNS configuration settings
OverridePresetsView - Override preset management
🗑️ Removed:
Legacy Loop Nightscout remote views (LoopNightscoutRemoteView, LoopOverrideView, LoopOverrideViewModel)
�� Infrastructure:
Updated project configuration and dependencies
Enhanced storage system for new remote features
Added necessary permissions and capabilities to Info.plist
Validation of Loop APNS key format
Introduces a more robust and secure remote command system
Replaces the previous Nightscout-based remote functionality with APNS-based communication
This represents a significant architectural improvement for remote Loop control, moving from Nightscout-based commands to a more direct and secure APNS-based approach.