Post

Replies

Boosts

Views

Activity

Text(date, style: .timer) issues with watchOS widget
I'm using Text(date, style: .timer) to display a timer in a WatchOS widget, which works great. The problem is that when the watchface goes dim the time goes from showing the time as "MM:SS" to showing "M minutes". Why is this occuring and how can I change the behavior? I understand it needs to remove seconds to preseve battery life, but why it is putting the word "minutes" at the end, this is messing up my layout. Thanks.
1
0
212
Oct ’24
WatchOS local notifications delayed
I'm scheduling local notifications on my WatchOS app, but they are always alerting exactly 13 seconds later than scheduled. I have read other users having the exact same issue but there is no solution anywhere. I'm not sure how one is supposed to write any sort of timer app when they are always coming in delayed. Any idea why this occurs and how to resolve it? For now I am subtracting 13 seconds from the end time, but that's not really a solution I'm happy with. Thanks
2
0
270
Oct ’24
Problems with SwiftUI preview and packages
My project has an iOS and WatchOS app. I added a package dependency, which supports both iOS and WatchOS, though I have only added the library to my iOS app. I can compile and run both apps just fine but when I try to use one of the WatchOS app views in Canvas preview I get errors saying different properties defined in the packages files are not available on watchOS. These blocks of code that give errors are wrapped in: "if TARGET_OS_IPHONE". I have selected the Watch Target and a watch device in the run selector as well as in the canvas. Why is this failing and how can I get it working? Thanks
0
0
362
Jul ’24
Getting the amount of audio loaded in an AVPlayer
I have AVPlayer loading an MP3 from a URL. While it is playing, how can I tell how much of the MP3 has been actually downloaded so far? I have tried using item.loadedTimeRanges, but it does not seem to be accurate. I get a few notifications but it usualy stops sending notifications around 80 seconds and doesn't keep up to even the current position of the player. Any idea? Also, is there any way to get the total duration of the audio? All the methods I've tried return NAN.
0
0
412
Jun ’24
Ultra Action Button showing on screen
When I initiate WKExtendedRuntimeSession with a background mode of "Underwater Depth" I get an orange indicator showing the Action button on the screen that stays showing all the time and then animates when you press the action button. I believe this started with a recent WatchOS update, because it never happened before. Does anyone know how to hide it? Or keep it and be able to detect the Action button presses within my app (if possible)?
1
0
420
Jun ’24
Does WatchOS kill apps when in extreme temperatures?
I have noticed that my Apple Watch app seems to randomly quit from time to time. It's not crashing and I have not been able to reproduce it in a controlled setting, but have noticed that it seems to only happen when I'm in very high or low temperatures. For instance, I was skiing recently and my app was supposed to stay running the whole time, but often when I would raise my wrist it would be back on the home screen and my app wasn't running. This also happened when I was on the beach on a very hot day. But when I'm testing it at home I can keep it running for hours and it never crashes, which leads me to believe it may have to do with the temperature. Does the OS kill apps when it's running in very high or low temperatures? If so, is there anything I can do to prevent this from occurring? Would doing less things in my app possibly prevent this? For instance, I have a timer, and use a bunch of sensors, would turning those off at times and using less of the display make a difference or does the OS not care what the apps are actually doing? If not, any other ideas? Thanks
1
0
581
May ’24
Turn physical surface into touchscreen in VisionOS
In VisionOS is it possible to detect when a user is touching a physical surface in the real world and also to project 2D graphics on that surface? So imagine a windowless 2D app that is projected onto a surface, essentially turning a physical wall, table, etc. into a giant touchscreen? So kinda like this: https://appleinsider.com/articles/23/06/23/vision-pro-will-turn-any-surface-into-a-display-with-touch-control But I want every surface in the room to be touchable and be able to display 2D graphics on the face of that surface and not floating in space. So essentially turning every physical surface in the room into a UIView. Thanks!
2
0
849
Sep ’23
Apple Watch: Waiting for first unlock
After all these years I'm STILL getting this message. WHY hasn't Apple fixed this yet?! I'm on version Version 14.3.1. Is there any way to get this working? Developing for Apple Watch has been a total nightmare from day 1, I don't understand how it hasn't gotten any better. This error keeps me from testing my app on my Watch. My Watch is obviously unlocked. I tired every troubleshooting step I've read in the dozens of other posts about this issue.
1
0
655
Aug ’23
How to manage simulators in Xcode 14?
How do I manage simulators in Xcode 14? I don't need a simulator for every minor version of iOS, they're just wasting space on my disk. I used to be able to delete these from Xcode, but it seems they removed this ability. Or did they move it somewhere that I am not seeing? I found all the files on my hard drive, but I don't want to start deleting individual files because it seems like there are multiple files for each simulator in different places.
0
0
729
Dec ’22
App hanging in XCode simulator
My app suddenly won't run on the simulator. It still runs on my iPhone, but if I try to run it in the simulator it just freezes. The UI comes up but it's completely unresponsive and I can't tap anything. If I pause the project and look at the call stack I see a message saying "Application violated contract by causing UIApplicationMain() to return. This incident will be reported.". And in the console the last message I get is "void * _Nullable NSMapGet(NSMapTable * _Nonnull, const void * _Nullable): map table argument is NULL". Not sure if those are related but that's all I could find.
2
1
3.4k
Oct ’22
Apple Watch (waiting for first unlock) in Xcode
I'm continuously getting this message in Xcode and I can't run my app on my Apple Watch. I'm running the latest versions of everything. I have tried to restart my Mac, my iPhone, my Watch. I tried to unpair and pair it back. Nothing is working. I also updated Xcode to 14.0.1 RC and that didn't help. How can I get this working? We're unable to do any work on our Watch App without this working. Thanks
28
13
15k
Sep ’22