Skip to content

Remove pre-iOS 18 Live Activity code paths#711

Merged
marionbarker merged 2 commits into
devfrom
cleanup/drop-pre-ios18-code
Jul 19, 2026
Merged

Remove pre-iOS 18 Live Activity code paths#711
marionbarker merged 2 commits into
devfrom
cleanup/drop-pre-ios18-code

Conversation

@bjorkert

@bjorkert bjorkert commented Jul 19, 2026

Copy link
Copy Markdown
Member

Now that the deployment target is iOS 18, this removes the Live Activity code paths and availability guards that only ever ran on older systems.

Dead code removed

  • LiveActivityManager — deleted startIfNeededLegacy and attemptLegacyRenewal (the Activity.request()-based start and renewal fallbacks), unwrapped the four #available(iOS 17.2, *) push-to-start guards, and dropped the three now-redundant @available(iOS 17.2, *) attributes. Push-to-start is the single creation path.
  • LoopFollowLiveActivity — collapsed the dual ActivityConfiguration into the .small-family-adaptive layout, inlined .contentMargins(.all, 0) (removing the applyActivityContentMarginsFixIfAvailable shim), and removed the iOSApplicationExtension 16.1 / iOS 18.0 attributes.
  • StorageCurrentGlucoseStateProvidershowRenewalOverlay now returns laRenewalFailed directly.
  • EKEventStore+Extensions — requests full calendar access directly instead of branching on iOS 17.
  • RestartLiveActivityIntent — dropped the redundant @available(iOS 16.4, *) attributes (the iOS 26.0 gate for continueInForeground() is kept).

Also

  • Deleted the orphaned LoopFollow/LiveActivity/RestartLiveActivityIntent.swift, which was not referenced by any target and shadowed the maintained root-level copy.

With the deployment target now at iOS 18, delete the legacy fallbacks and
availability guards that only ran on older systems:

- LiveActivityManager: remove startIfNeededLegacy and attemptLegacyRenewal
  (the Activity.request() start/renewal paths), unwrap the iOS 17.2
  push-to-start guards, and drop the now-redundant @available attributes.
- LoopFollowLiveActivity: collapse the dual ActivityConfiguration into the
  family-adaptive layout and inline contentMargins.
- StorageCurrentGlucoseStateProvider: the renewal overlay is driven solely
  by laRenewalFailed.
- EKEventStore: request full calendar access directly.
- RestartLiveActivityIntent: drop the redundant iOS 16.4 availability
  attributes.

Also delete the orphaned duplicate LoopFollow/LiveActivity/RestartLiveActivityIntent.swift,
which was not referenced by any target and shadowed the maintained root copy.

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve from code review.
Test that it builds.
Test that LA works for iOS 18 and iOS 26 test phones.

@marionbarker
marionbarker merged commit 05bd6bd into dev Jul 19, 2026
2 checks passed
@marionbarker
marionbarker deleted the cleanup/drop-pre-ios18-code branch July 19, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants