Hello folks, I have been working on Maps and facing issues with map labels.
I am working on WatchOS App SwiftUI, in there i have implemented Apple Maps. Since watch is small and there isn't much space to fit labels when user is fully zoomed in. i want to reduce some categories of unwanted labels. the solutions i have tried where leading me to results where there are All Labels or No Labels (except default labels like, street names and City Names)
for this i have physical devices:
Apple Watch Ultra with watchOS 10 beta (21R5320i),
iPhone 14 pro max with iOS 17 beta 4 (21R5320i)
for this i have tried following ways
i have used PointOfInterestCategories in iPhone first and it is working as expected with all categories and filter out defined categories. code i have used it as below.
Map(position: $position)
.mapStyle(.standard(pointsOfInterest: [
.hospital,
.hotel,
]))
Then i have tried it in WatchOS Map like below code. For pointOfInterest i have to give rawValue because there are enums not available directly.
Map(position: $position, interactionModes: .all)
.mapStyle(
.standard(
pointsOfInterest: .excluding(
[
MKPointOfInterestCategory(
rawValue: "gasStation"
)
]
)
)
)
For giving rawValues i have also tried with different values like, MKPointOfInterestCategoryGasStation from class "MKPointOfInterestCategory.h" as well as gasStation directly
i know i have used different categories in Both examples but none of them are working.
form trying above solutions i am getting exact results from iPhone but in WatchOS it either providing me Map with all Labels or No Labels. i just want to hide some of them to be able to see the clear map details.
i think MKPointOfInterestCategory is not returning the rawValue that's why pointOfInterest array is passing empty and not excluding the provided category.
If there are other ways to achieve this that i am not aware of it would be really helpful
Thank You :)
Posts under watchOS tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi Everybody,
Last week I got my first apple watch and I noticed that is missing one feature: The is no shortcut for changing the wrist position.
This is very odd since I use to have my watch on the left but then I practice sport using the right arm. Everytime I have to go to settings -> position and change it.
Now, I was thinking on developing an app that just expose the possibility to change that setting on the fly.
Since I am new with developing on watchOs, I was reading the watchOs api but I did not find a way to access that settings in write mode. Do you have any clue on how to do it or if it is possible to do it?
Thanks in advance,
Davide Maraschio
Hi,
Is it possible to turn on airplane mode on watchOS using swift? or possible to know the state of airplane mode?
thank you
How to hide Apple Watch stand-alone app from the iPhone store. People are mad for downloading an app on their iPhone and can't remove it, because it's only for Apple Watch, and they rate my app with 1 star...
Is there an option to disable widgets for Smart Stack only?
Has anyone been able to do a restore while in WatchOS beta 10? I don't mean to a previous WatchOS version. I mean to the same WatchOS beta version 10.0. I unpaired my watch and then attempted to re-pair it and restore from backup to the same watchOS I had before un-pairing. For the most part it worked, EXCEPT the majority of the Apple Apps are stuck trying to download. Mail is stuck, Wallet is stuck, Find... is stuck. To be clear, I don't want to downgrade. I just want these apps to complete their downloading so I can use my watch as before I restored it. I am guess that it's trying to download these apps, but they are not compatible with the beta. So how do I get them back? Do you think they will download the next time there is an update? Help!
I was wondering which of the hkquantitytypeidentifiers I can collect while a workout is running.
Essentially which of these types are actually being collected by the sensors on the apple watch rather than being read from manual input.
Thanks
After unpairing a watch and restoring it came up like this, most of the built in apps aren't installed and won't install. I've tried doing a full reset several times, but it just comes back to this. Is there a way to do a full reinstall? Some other fix?
At the time I was trying to fix another issue where the watch wasn't showing up in Xcode 15 beta 6.
was able to run app on watch then upgraded watch OS to 9.6.1 and getting error of
apple watch not available because there was an error downloading it's symbols
xcode
Version 14.3.1 (14E300c)
watch
9.6.1
Tried rebooting a few times, disconnecting/connecting, etc. From some previous posts looks like the info needs to be loaded on Apple servers and maybe that needs to be done for this newer version of xcode/watch.
I an unable to play .m3u8 and live URL in watchOS swift but mp3 and Mp4 is playing.
VideoPlayer(player: AVPlayer(url: URL(string: "https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3")!)) {
VStack {
Text("Watermark")
.foregroundStyle(.black)
.background(.white.opacity(0.7))
Spacer()
}
.frame(width: 400, height: 300)
}
Hello everyone, i just downloaded the Xcode 15.0 Beta 6 release and after installing it I noticed that xcode couldn’t recognize my physical devices. I have the iOS 17.0 (21A5312c) and watchOS 10.0 (21R5341c). What I can do is run my app on the Simulator and it does says iOS 17.0 but i need the physical devices. Thanks on advance
I am trying to add a watch widget that I've created for Smart Stack feature of watchOS 10 to also appear in the list of shortcuts shown in the Siri Watch Face.
It seems like Apple now wants us to use RelevantIntentManager for this purpose, but my widget never shows up in the Siri Watch face.
This is the code that I am using.
func timeline(for configuration: ConfigurationAppIntent, in context: Context) async -> Timeline<GenericEntry> {
[...]
await updateRelevantIntents()
return timeline
}
func updateRelevantIntents() async {
var relevantIntents = [RelevantIntent]()
let defaults = UserDefaults.init(suiteName: "group.tesla.watch.maadotaa")!
guard let name2VIN = defaults.dictionary(forKey: Constants.VEHICLE_NAME_VIN_DICT) as? [String:String] else {
return
}
let carNames = Array(name2VIN.keys)
for (idx, name) in carNames.enumerated() {
let intent = ConfigurationAppIntent()
intent.order = idx
intent.carName = name
intent.action = nil
let txt = "\(name): info only"
let relIntent = RelevantIntent(intent, widgetKind: "WatchWidget", relevance: RelevantContext.date(from: .now, to: .now + 3600 * 1))
relevantIntents.append(relIntent)
}
do {
try await RelevantIntentManager.shared.updateRelevantIntents(relevantIntents)
} catch (let error) {
print("\(#function): \(error.localizedDescription)")
}
}
I have been stuck on this problem for like a week at this point and I cannot figure it out at all. I'm sure it's a simple problem to fix, but I've researched up and down and can't find a solution.
To make matters worse, I also cannot recreate the crash the reviewers are experiencing. The app works on my device fine, both from building from Xcode and from downloading from TestFlight internal testing. The app works fine on all the simulators as well.
It's an Apple Watch only app with a target dependency of watchOS 10.
Here's the excerpt from the crash log:
"termination" : {"code":4,"namespace":"DYLD","indicator":"Symbol missing","details":["(terminated at launch; ignore backtrace)"],"flags":518,"reasons":["Symbol not found: _$s7SwiftUI11WindowGroupV7contentACyAA04LazycD7ContentVyqd__GGqd__yc_tcAGRszAA4ViewRd__lufC",
"Referenced from: <654E1AA3-D932-32BB-AE35-3AA14E191C79> \/Volumes\/VOLUME\/*\/Wrist Notes Watch App.app\/Wrist Notes Watch App",
"Expected in: <CD8389BE-8133-355B-A2BD-DEE38FBB1732> \/System\/Library\/Frameworks\/SwiftUI.framework\/SwiftUI"]},
Any help would be much appreciated, I have pretty much exhausted all ideas to fix it that I could think of.
I have just updated my Apple Watch S7 to WatchOS 10 beta, and I am enjoying the new cycling features that allows me to read cadence/ power/ speed directly on iPhone.
The bug is, even though the watch is paired with speed sensor, and allows me set up wheel size, but when cycling, apple watch is actually not using the real-time data from my sensor but GPS data. When cycling in tunnel and underground space, there is no speed data.
Could any one explain to me how I show set up my watch? or, this is a bug that need to be fixed? Thx!
I'm looking to migrate my users ClockKit complications to WidgetKit in my next app update. I can only do this for WatchOS 10 users because the APIs are too limited for WatchOS 9 (eg. Widget corner round text not available). But I do need to do this for WatchOS 10 users in order to get in the Smart Stack.
When I tried to mark my getWidgetConfiguration method in my ComplicationController.swift with:
@available(watchOS 10.0, *)
it complains and says: Protocol 'CLKComplicationWidgetMigrator' requires 'getWidgetConfiguration(from:completionHandler:)' to be available in watchOS 9.0 and newer
I then tried modifying my WidgetKit extension to only support WatchOS 10. This seems to work for a while but at some point WatchOS 9 devices still try the migration and crash with symbolNotFound DYLD issues for the WidgetKit extension which shouldn't even be embedded in the WatchOS 9 builds! (all visible in iPhone Analytics data crashes)
So I'm not sure what else to try. I've researched a lot in docs etc... but can find no official way to achieve this.
I noticed that there was the ECG app on the Apple Watch that enabled you to gather an ECG sample. Was there any method that could programmatically enable tracking within your own watchOS application? Currently, the only way I can physically get samples is if I leave the application I'm building to physically start an ECG session through the ECG app which is not ideal.
Hello everyone,
I'm a complete beginner when it comes to programming and have been learning Swift for the past 2-3 months. I'm in the process of writing my very first project, an Apple Watch app for Tesla owners.
So far, I've managed to complete the UI aspect of the app and have recently begun diving into the coding part. However, I find myself a bit lost when it comes to connecting my app to the unofficial Tesla API.
On top of that, I'm also wondering if integrating Core Data is necessary for this kind of project?
If anyone could help me by providing a clear roadmap, it would greatly accelerate my research and learning process. Any tips, tutorials, or resources you could point me toward would be immensely helpful.
Thanks in advance for your assistance!
Best Regards
Sasan
Hello.
In our existing watchOS application developed in Objective-C (not SwiftUI), we used to set the title property of each screen of the application (in Interface Builder or in the Objective-C code).
The title was displayed on the top left corner (while the time was displayed on the top right corner) => The two information were on the same line, which left a large part of the screen for the interface without a need for scrolling
We have built the application for watchOS 10 (with watchOS 10 Beta 7 SDK) and tested it on watch OS10 Beta 7 on an Apple Watch
=> the title is displayed on the right, behind the time
=> It uses two lines and the interface available for the application screens is much reduced.
Is there any solution to set the alignment of the title to the left in order to make it appear on the same line as the time, as on watchOS 9?
Thanks in advance for your answer
Best regards.
Is there an API to capture the raw data of the apple watch optical sensor?
I need it to be able to acquire a photoplethysmographic wave to be processed to extract medical parameters.
Hi,
I am struggling with a design change in watchOS 10.
I have a TextField next to an Image in an HStack inside a List
The following code produces another (correct looking view) when using watchOS9.
With watchOS10 a strange background is added that I can not remove.
struct ContentView: View {
@State private var searchFieldInput: String = ""
var body: some View {
List {
HStack{
Image(systemName: "magnifyingglass").foregroundColor(.accentColor)
TextField("Search", text: $searchFieldInput)
}
}
}
}
This picture shows the difference:
(watchOS 9 on the left; watchOS 10 on the right
Does anybody know how to remove this background or if this intentionally?
I already filed a Feedback (FB12293618) but haven't heard back yet