WatchOS send data to iOS has bottleneck

Hi


I have a problem.....

that is apple watch send 100data to iOS per 1 sec

1 data = 40byte


but when send data 100data for 1sec, then have a bottleneck and lost data.


How can I solving problem..?

using Swift

Replies

1) There are different ways of sending data between the Watch and the iOS device. Explore the other methods - they may allow more data.

2) compress your data, for example, use 'short' integers

3) don't send so much data - after all what data is actually on one device that really needs to be transmitted to the other device? 4kilobytes per second is enough to display a full watch screen many times each second.

Thanks, PBK


4kilobytes data to server. from watch


data is made up of keyvalue, heartrate, accelerometer. And watch send data to iPhone.

iPhone made new data watch data + iPhone's accelerometer, gyroscope and send new data to server

so is your problem 1) transmitting data from the watch to the iphone or 2) transmitting data from the iphone to the server?

a typical heart rate is one per second. why is there 4 kilobytes per beat?

my problem is 1


I use this code


self.session.sendMessage(["msg":"\(self.start)"+""\(self.status)""+","+"\(self.Heart)"+","+"\(self.accel_X)"+","+"\(self.accel_Y)"+","+"\(self.accel_Z)"], replyHandler: nil, errorHandler: nil)


it is 40byte

I do not understand Swift so I can't comment on whether you dictionary is correctly constructed with:

["msg":"\(self.start)"+""\(self.status)""+","+"\(self.Heart)"+","+"\(self.accel_X)"+","+"\(self.accel_Y)"+","+"\(self.accel_Z)"]


Try replacing that dictionary with something less complex and see if it works. Like :

[NSDictionary dictionaryWithObjectsAndKeys:@"This is a test message to see if this system is working as I expect",@"msg", nil]