Posts

Post marked as solved
2 Replies
811 Views
2 years ago using Xcode 13, I created a phone app with a companion Watch app and it worked fine. This past month using Xcode 15, I created a new phone and companion app and everything is working with the following exception. From Xcode, my new app installs on the phone and watch, but my Watch app doesn't show up in the list of apps you can use as a launch complication on one of your watch faces. The app does show up in the launch screen for apps installed on the watch, so I assume the watch icon is generated properly. I started out using a single 1024x1024 app icon so I thought maybe I needed to create all variations of the icon before I'd see them as a complication option. I created all variations and loaded them in the Appicon asset. Still no luck. the one major difference between my Xcode 13 and Xcode 15 projects is the 15 project includes one watch app, where the 13 project includes the watch app and a WatchKit extension. my understanding is Xcode 14 and 15 don't use WatchKit Extension. So... what do I need to do to be able to add my Xcode 15 watch app icon to a watch face so I can launch the app from there?
Posted
by Weecabin.
Last updated
.
Post not yet marked as solved
1 Replies
510 Views
I built an autopilot for my boat, and took it further by writing an IOS app to control it via bluetooth with my phone. Everything was working great, until I thought I'd add the ability to navigate a route. Here's what has me stumped... I've got location manager generating updates, as long as the phone is moving (ever so slightly) in my hand. I've got the display setup to never sleep, and the phone is plugged in to power. If I put the phone down, I get a few new locations, then the location freezes. The didUpdateLocations delegate is called, but the location never changes. I've tried a number of settings but no matter what I try, none have solved the still phone issue. My current design uses self.locationManager?.requestLocation() sent on at programmable interval, so that I get updates with reasonable spacing. The updates come, but the location is identical if the phone is still (laying on the dash of the boat). If I just "wiggle" the phone a bit, locations come with a new value. If I keep "wiggling the phone, I get new locations every call to requestLocation. Seems like there is some kind of inactivity timer associated with didUpdataLocations that prevents retrieving new locations. It just re-sends the previous location. This issue has nothing to do with using requestLocation, since I had the same issue when didUpdateLocations was running on its own timing. I added the code and logic to support requestLocation in an attempt to force a new location. Has anyone experienced this or have any idea how to force a "new" location when the phone is still? I'm using Xcode Version 14.3.1 (14E300c) The phone is an iPhone 12 and the deployment target is set to 15.3 Here's how I currently configure location manager... This is one of a number of attempts, but all have the same issue. if locationManager == nil{ print("****** instantiating locationManager ******") locationManager = CLLocationManager() locationManager!.distanceFilter = kCLDistanceFilterNone // locationManager!.distanceFilter = 3 locationManager!.desiredAccuracy = kCLLocationAccuracyNearestTenMeters locationManager!.delegate = self locationManager!.showsBackgroundLocationIndicator = true locationManager!.startUpdatingLocation() locationManager!.startUpdatingHeading() locationManager!.allowsBackgroundLocationUpdates = true } }
Posted
by Weecabin.
Last updated
.
Post marked as solved
6 Replies
1.4k Views
I’m new to IOS development, and have spent the last month learning the development environment and the framework. I was able to successfully create a phone app with Xcode 13 that communicates with an autopilot I designed and built for my boat. It communicates with a BLE peripheral designed into the autopilot. All well, and good. The phone app includes a map and and allows for placing custom annotations on the map marking the location of fish I catch, or shallow spots on the lake. I decided it would be handy to have a watch app that would contain a few controls such as Lock onto the current heading, and turn left and right 10 degrees. Those functions are already implemented on the phone app, so I though it would be a simple task to send a message to the phone to activate those functions. For the life of me I can’t figure out how to send messages between the two apps. I backed up and created a simple phone app with a companion watch app. Same problem, no clue how to make them talk. I’ve searched online, but all the tutorials are way more complicated than what I need, and I can’t ferret the functionality I’m looking for from any of them. Can someone point me in the right direction to get started? Or if it’s not too involved, explain how to setup the link between the two apps.
Posted
by Weecabin.
Last updated
.