I am building a watch only application which contains some api requests to be integrated such that data should be shown. I am using the apple watch se and I have turned on the wifi in the watch. But when I am making an api request for example, Guess I am trying to display a list and inorder to obtain that list I am required to make an api call from the watch app itself and I have written the required code.
There are 4 different scenarios I tested and these are the results
1.IPhone wifi on, watch wifi on - works
2.IPhone wifi on, watch wifi off - works
3.IPhone wifi off, watch wifi on - doesn't work
4.Both switched off - doesn't work
1,2,4 can be accepted. But I am not sure why 3 is not working. I tested the app store in the watch as well following the above 4 scenarios and still the results are same. So my hypothesis is that it's the behaviour of the watch. But i am not sure the reason why 3. is not working since I am making a standalone app and the watch supports wifi or internet connection why can't we directly pull data via the watch internet connectivity? But I am surprised when siri was working fine in 3rd scenario. Please someone who can elaborate the reason will be greatly appreciated.
Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataPDTask <284518A5-63C9-42B2-A51A-EB785693DB8F>.<1>, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorCodeKey=50, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataPDTask <284518A5-63C9-42B2-A51A-EB785693DB8F>.<1>",
"LocalDataTask <284518A5-63C9-42B2-A51A-EB785693DB8F>.<1>"
Furthermore, the above error is coming while making a request based on the 3rd scenario. (Please note the wifi in watch is turned on) Thanks in advance!