Post

Replies

Boosts

Views

Activity

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
585
Jun ’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
521
Jul ’24
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
509
Oct ’24
iOS WebSocket error: Default TLS Trust evaluation failed
I'm trying to connect to a web socket server using WatchKit. I already have a Javascript app and a Windows application that can connect to this WebSocket server, but with iOS and WatchOS it fails with the errors below. Any idea how I can figure out what's wrong? I already added the App Transport Security Settings to my plist file. Connection 1: default TLS Trust evaluation failed(-9807) Connection 1: TLS Trust encountered error 3:-9807 Connection 1: encountered error(3:-9807) Connection 1: unable to determine interface type without an established connection
13
0
7.4k
Jun ’21
Why is typing in X-Code so sloooooooow??
I've been having this issue with X-Code for years and have never found a fix. I've seen many people post this issue but no solutions that work. When typing in X-Code, ever few letters I type the editor just hangs, sometimes the rainbow beachball spinner even comes up. Just pressing return takes a second to complete. Any ideas? There's got to be a fix for this
3
0
1.5k
Jul ’21
Unable to upload Watch App screenshots to App Store
I'm trying to update our app, but every time I try to upload screenshots for our Watch App it just freezes and never finishes uploading the picture. The progress indicator on the image just gets stuck in place at about 10% and there are tons of Javascript errors. I wrote Apple and gave them all the logs and errors but they haven't fixed it and won't even tell me if/when it will be fixed. I've been having this problem for over 2 months now and am unable to submit app updates, which is a big problem. Anyone else having this problem? Anything I can try?
5
0
2.2k
Dec ’22
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
769
Oct ’24
Live Activities with WatchOS app
Can you initiate a live activity from a Watch app? From what I can tell you can only do it from an iOS app and then have the Watch mirror it, is that true? If you were builiding a standalone timer app for WatchOS for instance and wanted the timer to show up automatically in Smart Stacks when the app is in the background, is this possible? Thanks
3
0
790
Oct ’24
Complications not showing up after WatchOS 26
We are having an issue with our app after upgrading to WatchOS 26. After some time our complication disappears from the watch face. If you go to add it back, our app shows up with an empty icon placeholder and you are unable to tap it to add it back. Sometimes restarting the watch will bring it back, sometimes it does not. Has anyone experienced this? What should we be looking at to figure out why this is happening? Or could this be a bug in WatchOS 26?
3
1
206
Oct ’25
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
2
4.4k
May ’23
NSURLErrorNotConnectedToInternet after updating to Watch OS 9.0
After updating to Watch OS 9 our app suddenly cannot connect to the internet with my app using a NSURLSession. It gets an error NSURLErrorNotConnectedToInternet every time. But this still works fine on Watch OS 8. I'm definitely connected to the Internet over WIFI on my Watch and iPhone. It still works fine in the simulator but not on my Watch. Are there any new requirements in Watch OS 9 to get internet access, such as request permission from the user or adding anything to info.plist? Thanks
5
1
1.4k
Sep ’22
Why is Apple Watch development still so terrible?
In all the years of developing for the Apple Watch, the process of trying to run my app on a physical watch or simulator through Xcode is still an absolute nightmare. I probably waste hours each day trying to get my app running. Either the watch doesn't show as paired in Xcode, or it's stuck setting the watch up for development, or it says it's running but Xcode just hangs, or it just doesn't show up in Xcode at all. I have to do so many combinations of restarting my watch, my iPhone, my Mac to try and get it working again. Sometimes it works, sometimes it doesn't and I just give up for the day. Once I get it running I may have 5 times the app will start properly before going back to not running. When trying to use the simulator the watch keeps coming unpaired with the iPhone and won't run. And it's not possible to use Xcode with an iPhone that has multiple Apple Watches paired to it, which is annoying because I can't have one dedicated watch for testing. I just don't understand after all these years Apple Watch development just keeps getting worse and worse. I'm almost ready to just drop my Watch app completely, it's just not worth the headache we go through trying to develop it.
2
4
2.0k
Mar ’23