watch-connectivity / react-native-watch-connectivity

Enable communication between apple watch app and react native
http://mtford.co.uk/react-native-watch-connectivity/
MIT License
692 stars 89 forks source link

Add validation for user info payloads #86

Open mtford90 opened 2 years ago

mtford90 commented 2 years ago

User info payloads should respect the following types: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/PropertyLists/AboutPropertyLists/AboutPropertyLists.html otherwise receive user info throws a native error

Context: https://github.com/mtford90/react-native-watch-connectivity/issues/77#issuecomment-1125074227

cc @walterholohan @yolpsoftware

RWOverdijk commented 1 year ago

@mtford90 I wasn't sure if I should write here, the other issue linking here or create a new one.

Before I go into details, the issue I am seeing is that sendMessage works fine and transferUserInfo doesn't trigger any of the relevant delegate methods (didReceiveUserInfo, didFinish).

Testing simulators should work, right? Is this related? The payload is literally copy/paste from the docs.

mtford90 commented 1 year ago

@RWOverdijk always best to test on real devices - I've found in the past that pairing simulators is extremely flaky - this is noted in the troubleshooting section of the docs.

RWOverdijk commented 1 year ago

Oh never mind me, I wrote my app natively instead, much easier. Thanks for replying though!