Post

Replies

Boosts

Views

Activity

Comment on Help with first watch app
I'm getting closer, but still have an issue... Thanks for the reply! I was starting down that road with a ViewModel shared between the phone and watch app. The ViewModel implements the WCSessionDelegate I added debug code verifying that the sessions activate with complete code of 2, on both devices (in the simulator). I was getting excited, but then I ran into the following issue that's got me stumped again. I thought it might have been a simulator issue, so I targeted my phone and watch but my message never gets to the watch. 2022-03-05 21:49:15.473640-0800 WatchPlay[8680:107318] [WC] -[WCSession onqueue_handleUpdateSessionState:]_block_invoke dropping as pairingIDs no longer match. pairingID (null), client pairingID: (null) Goggle provided no insight into what's going on here. I looked at all the project settings, and don't see any reference to pairingID.
Mar ’22
Comment on Help with first watch app
Sorry, I didn't read the complete thread of the previous post you linked above until just now. I'm so new to this, I'm not aware of what it means to create an app using swiftui, but I'll look into that when I get back on this. I had followed the strategy of another tutorial whereby you share the view model and app classes defined in the phone app with the watch app. I'll create another combined project, and look for differences in the way the app class (main) is implemented in the watch. if nothing jumps out at me, I'll try setting up my project the way you recommended now that found your suggested implementation. BTW, I'm a retired EE getting back into coding to as I build various imbedded projects. iOS development has been an interesting experience, as my background is imbedded HW controller design, and C/C++. Swift is somewhat strange and interesting at the same time. thank you so much for taking time to respond. I'll let you know how this project gets along.
Mar ’22
Comment on Help with first watch app
Since you offered, one thing I've been looking into without much success is how to add an annotation to a map with a tap or long press gesture. Most of the resources don't cover doing it with SwiftUI. i considered dropping a pin at the current location, which I do know how to do, then moving it, but haven't been able to work that out either. I'm starting to think I have to use a coordinator but that looks messy, and didn't want to jump down that rabbit hole if I didn't need to. Any help would be appreciated.
Mar ’22
Comment on Help with first watch app
I came up with an approach to add pins (fixes) at a location on the map that doesn't require dragging... I created a view and added it to the map Zstack. That view has a button that allows for adding an annotation at the current region center which I mark with an X. I just pan and zoom the map so that the X is where I want the fix and hit the button. Worked like a champ, and allows for exact placement of the fix
Mar ’22