kean / Pulse

Network logger for Apple platforms
https://pulselogger.com
MIT License
6.32k stars 302 forks source link

Pulse breaks Watch Connectivity after opening #201

Closed ptxmac closed 1 year ago

ptxmac commented 1 year ago

After opening the PulseUI on iOS a LoggerSyncSession is created. This class replaces the WCSession delegate on init, without any regard for an existing delegate.

This will more or less break any iOS app that has a companion Watch app.

A better solution would be to either:

kean commented 1 year ago

Good catch. I don't know why it never occurred to me that the delegate was shared 🤦‍♂️

Force the user to explicitly check for file transfers and forward any pulse files to LoggerSyncSession

Can you please elaborate on that?

There is a new ShareLink API in watchOS 9. I wonder if it could replace this feature. It'll also partially cover the lack of remote logging on the physical devices. I originally added WCSession because of the lack of sharing.

ptxmac commented 1 year ago

Force the user to explicitly check for file transfers and forward any pulse files to LoggerSyncSession

Can you please elaborate on that?

Meaning the developer integrating Pulse is responsible for implementing a WCSession delegate and check if a file transfer is happening.

kean commented 1 year ago

Ah, got it. Yeah, that makes the most sense. But I'm not sure if it's worth keeping this feature given that the ShareLink now exists. Yes, it's going to require slightly more steps, but it'll work on any platform.

Btw, in addition to Pulse for Mac, there is also a new Pulse app coming for iOS. It'll allow you opening Pulse log files on the iOS devices. I haven't pushed it to TestFlight yet.

ptxmac commented 1 year ago

Yeah, ShareLink does sound like a fair solution, except that It's WatchOS 9 only... Personally, I always support at least one version back. From my statistics, I still have 6% of users on WatchOS 7!

kean commented 1 year ago

I've done a couple of (successful) prototypes, and I'm planning to:

This will not be too much work from the user's point of view and will address the issues you highlighted. Once again, thank you for testing it and reporting the detailed issues. I really appreciate it!

kean commented 1 year ago

Fixed in 4.0.0-beta.3.