Yes I think about generate UUID my self and save it in watch but in one case I need solution.If user change the watch (or uninstall the app) then how to identified that user.
Post
Replies
Boosts
Views
Activity
Thank you for answer.For now I go through timestamp and make it my unique id (Yes getting problem when deletion and reinstallation of the app because keychain also delete value during uninstall).
Thank you for coment.I folow same page for developing the code.And you can check by below:monitor.pathUpdateHandler = { path in if path.status == .satisfied { print("We're connected!") self.lbl_Network_status.setText("Connected".localized) self.image_Network.setImage(UIImage(named: "ic_network")) if path.usesInterfaceType(.wifi) { print("It's WiFi!") } else if path.usesInterfaceType(.cellular) { print("3G/4G FTW!!!") } else if path.usesInterfaceType(.wiredEthernet) { print("wiredEthernet") }else if path.usesInterfaceType(.loopback) { print("loopback") }else if path.usesInterfaceType(.other) { print("other") } } else { print("No connection.") self.lbl_Network_status.setText("Not Connected".localized) self.image_Network.setImage(UIImage(named: "ic_network_not")) } // print(path.isExpensive) // Only ipv4 Connection is support .Connection dns and ipv6 not support } let queue = DispatchQueue(label: "InternetConnectionMonitor") // let queue = DispatchQueue.global(qos: .background) monitor.start(queue: queue)
As code show it's else part execute and "Not Connected" status show.And I print status and also set in Label property to display but in both case is "Not Connected".Any other way to get network property in apple watch and I developed standalone application(Independ watch app).
Thank you.I go through your solution, so I get state value unknown (or some time unsupported).I check it in the simulator maybe for that it give this result.To check this real device required or simulator can work??
By status, I mean network status (like connected or not connected).