···5050 setupNetworkMonitor()
5151 }
52525353+ /// Re-read profile config and reconnect to the DB.
5454+ /// Call this each time the share extension is presented,
5555+ /// since iOS may keep the extension process (and this singleton)
5656+ /// alive across invocations — a profile switch in the main app
5757+ /// would otherwise go unnoticed.
5858+ func reloadProfile() {
5959+ setupStore()
6060+ }
6161+5362 private func setupStore() {
5463 guard let containerURL = FileManager.default.containerURL(
5564 forSecurityApplicationGroupIdentifier: "group.com.dietrich.peek-mobile"
···815824816825 override func viewDidLoad() {
817826 super.viewDidLoad()
827827+828828+ // Re-read profile config every time the share sheet opens.
829829+ // iOS may keep the extension process alive between invocations,
830830+ // so the singleton could hold a stale profile / DB path.
831831+ PeekCoreManager.shared.reloadProfile()
818832819833 view.backgroundColor = PeekTheme.bg
820834