Skip to content

Observable file changes in app groups container with Combine.

License

Notifications You must be signed in to change notification settings

naru-jpn/ObservableAppGroups

Repository files navigation

ObservableAppGroups

Sample project for observable file changes in app groups container with Combine.

Overview

This project contains 3 local packages to manage files in container. (See Packages/Package.swift)

  • FileObserver
    • Class to observe file changes using DispatchSourceFileSystemObject.
  • AppGroupsFileSystem
    • App groups container url provider and class representing file contained on app groups container.
  • BroadcastPreferences
    • Informations shared and observed between application and app extension.

Broadcast upload extension updates shared Bool variable isBroadcasting.

try? BroadcastPreferences.shared.isBroadcasting.write(true)

Application observes isBroadcasting with SwiftUI.

Text(viewModel.isBroadcasting ? "Broadcasting" : "Not Broadcasting")

Links

About

Observable file changes in app groups container with Combine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages