Rexios80 / watch_connectivity

Wrapper for WatchConnectivity on iOS and Wearable APIs on Android
https://pub.dev/packages/watch_connectivity
BSD 3-Clause "New" or "Revised" License
28 stars 17 forks source link

Type 'WatchSessionDelegate' does not conform to protocol 'WCSessionDelegate' #9

Closed phackford closed 1 year ago

phackford commented 1 year ago

I am getting this error when archive a project to push to TestFlight. everything runs fine on the simulators.

Showing Recent Messages /WatchSessionDelegate.swift:12:7: Type 'WatchSessionDelegate' does not conform to protocol 'WCSessionDelegate'

WatchConnectivity.WCSessionDelegate:8:10: Protocol requires function 'sessionDidBecomeInactive' with type '(WCSession) -> Void'

WatchConnectivity.WCSessionDelegate:10:10: Protocol requires function 'sessionDidDeactivate' with type '(WCSession) -> Void'

Rexios80 commented 1 year ago

What's your minimum iOS version target?

phackford commented 1 year ago

14

Rexios80 commented 1 year ago

Can you get a screenshot of where Xcode says that error is?

hifiaz commented 1 year ago

i got this error also, when build ipa, file WatchSessionDelegate.swift i got from example folder

Screenshot 2023-08-07 at 18 26 43
Rexios80 commented 1 year ago

Is that error even in code that's part of this plugin?

Rexios80 commented 1 year ago

The sessionDidBecomeInactive method is only for the phone side to support switching between Apple Watches. It looks like maybe you copy/pasted that file into an iOS app instead of a watchOS app? Anyways, I'm going to close this issue since this is not related to the actual plugin code.