Post

Replies

Boosts

Views

Activity

Core Bluetooth transfer speed. Does direction matter?
I developed an iOS app that communicates with an OS X app over Bluetooth. There appears to be a speed difference in transferring data depending on which one I make the peripheral. The iOS app is going to be sending data quickly to the OS X app and needs to be received with no delay. If I make the iOS app the peripheral and the OS X app the central this works relatively well. If I make the iOS app the central and the OS X app the peripheral then the data is sent with a lag, as if it is being buffered. Because I plan to use this on WatchOS too, I need to make the iOS app the central and the OS X app the peripheral. I'm setting CBCharacteristicWriteWithoutResponse when I send the data. I also tried to open a L2CAP channel but saw the same performance issue. Is this a known limitation or is there something I could be doing wrong?
0
0
996
Jun ’21
Digital Crown location on screen
Is it possible to get the Y location and height on screen of the Digital Crown? I capture the crownDidRotate event to perform my own actions, and want to show my own visual indicator next to the crown, like the one that comes up with you scroll a list. I could hard code the values based on the watch model, just wondered if there was a way to get this programmatically so I don't have to update it for newer models if the location changes. Thanks
0
0
953
Aug ’21
Independent Apple Watch app trying to access WIFI without iPhone
I developed an independent Apple Watch that can access network resources on its own using NSURLSession without going through the iPhone. This works fine if the iPhone is on, but if I turn the iPhone off it is not able to connect. Why does my app lose network connectivity when the iPhone is off even though it's a standalone app and the Watch is connected to my WIFI? Is there anything special I need to do to get this working? It appears that no apps work with the internet when the iPhone is off. WIFI is enabled and connected to my WIFI network under the Settings on the watch
0
0
997
Feb ’22
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
824
Dec ’22
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
NSCocoaErrorDomain when trying to run
I have been struggling with this error. My build succeeds but won't run. I've tried every suggestion I've ready in every article I could find and nothing has worked. This happens if I run it on the simulator or device. Any tips? ============================== The file “APP NAME” couldn’t be opened because you don’t have permission to view it. Domain: NSCocoaErrorDomain Code: 257 Failure Reason: You don’t have permission. Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info. User Info: {     NSFilePath = "/Users/Me/Library/Developer/Xcode/DerivedData/Main-ekzzcailcbrpykazzxdtbnpsjuhr/Build/Products/Debug-iphoneos/APP NAME.app"; } - The operation couldn’t be completed. Permission denied Domain: NSPOSIXErrorDomain Code: 13 Failure Reason: Permission denied
1
0
1.2k
Feb ’21
Independent WebOS app can only access Web Sockets through iPhone
I'm developing an independent WatchOS app that uses NSURLSessionWebSocketTask to access Web Sockets. This works fine as long as the Apple Watch is connected to an iPhone, but when it's not, the web socket won't connect and gives an error that there is no network available. Using NSURLSession to access a web resource works fine though whether the watch is connected to an iPhone or not. Is this a bug or is there a way to get this working? Thanks
1
0
1k
Feb ’22
Forcing Mac OS to update default settings plist files
I'm trying to get information about the current Mission Control Spaces, specifically the current space number. I can access this info by using "defaults read com.apple.spaces". The problem is that this info only seems to update when a new space is created or deleted. So if you read this and then change the current space or open a new window, that file will still be set to the previous space until a new space is created or deleted, which would then update the file. I can't see any other way to get this information. Is there any non-intrusive way to force the OS to update this plist file on demand (without relaunching the dock or Finder)? Or is there any other way to get the current space number any other way? Thanks
1
0
1.6k
May ’22
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
793
Aug ’23
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!
1
0
1k
Sep ’23