I would like for my app to have a menu bar under certain circumstances, but not most of the time. Is this possible?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Is there a way to play a specific rectangular region of interest of a video in an arbitrarily-sized view?
Let's say I have a 1080p video but I'm only interested in a sub-region of the full frame. Is there a way to specify a source rect to be displayed in an arbitrary view (SwiftUI view, ideally), and have it play that in real time, without having to pre-render the cropped region?
Update: I may have found a solution here: img DOT ly/blog/trim-and-crop-video-in-swift/ (Apple won't allow that URL for some dumb reason)
I spent some time cleaning up my TCC data. During that I learned that some TCC info is cached in “Mac OS X Detached Code Signature” files. Is there a way to dump their contents suitable for human consumption? The codesign tool doesn’t seem to do it (or I can’t figure out how to invoke it).
I’ve got some code that creates an AVPlayerItem from a URL, the creates an AVQueuePlayer from it. If I check the player item's status after that, it's still unknown.
According to the docs, it'll remain unknown until it is associated with an AVPlayer, and then it "immediately begins enqueuing the item’s media and preparing it for playback." But checking the status right after that, I still get unknown, which tells me it’s not quite immediate.
Is there any way to test if the player item will work immediately after creation? In this case, the problem is that my app doesn't have permission, due to it being a bookmark saved in a sandboxed app.
I've filed FB13497581 on this topic. But Ever since macOS 14 (or perhaps one of the releases that came after), my machine (M1 MacBook Pro) frequently locks up the UI. Sometimes it's so bad the mouse won't move. It only lasts a few seconds, but at its worst it happens every few seconds. It usually manifests as no text appearing as I type (which sucks, since I write code all day).
I'm fairly certain configd is to blame. When this occurs, configd is using nearly 100% CPU, and spams logs with thousands of messages per second.
Killing it does nothing. Rebooting might fix it for a bit, but it eventually comes back.
I'm wondering if there’s some on-disk state I can blow away to start SystemConfiguration from scratch. I hate to do that in case someone from Apple asks me for files to analyze, but I feel like my FB is just going to languish. Meanwhile, this is rendering my machine unusable.
Or if anyone knows how to interpret the log messages.
I wrote a StoreKit unit test and set the renewal rate to .oneRenewalEveryTwoSeconds for the test session. But now my App expires and renews every two seconds when running normally, even though the StoreKit Configuration file is set to "Real Time." Changing it to anything else doesn't change the renewal rate. I've tried cleaning the build folder.
If, however, I set my SKTestSession explicitly to .realTime and run the test again, then my app behaves. However, again, it doesn't matter what I set the Configuration Settings to.
Anyone know where this information is stored?
Because I can't find a way to share StoreKit purchases between two apps (macOS), I was forced to make my LSUIElement application a single app. This is turning out to work reasonably well, except for one issue that I hadn't noticed before (maybe it's new in 14.2?).
The normal flow is this:
User double-clicks app icon
App calls SMAppService.agent(plistName: "com.myagent.plist").register(). The referenced plist points to the same application binary (see attached project) that the user launched in step 1.
System launches a second instance of the application binary
What I want the call to do instead is see that the app is already running, and just adopt it (that is, if it is killed or crashes, relaunch it).
I see two inelegant workarounds:
Wait until the user is done configuring the app after first launch, register the app and then quit. Thing is, I can't be sure when they're done, e.g. if they don't close the window.
Allow both instances of the app to run, but quit if they close the window and it wasn't launched by launchd, or if there are other instances running. This feels fragile (e.g. if the behavior of register() is ever improved as I'd like).
The best solution, of course, would be to share StoreKit context between apps, so I could separate this into the UI app and background agent.
(To Apple: I've filed FB13574819 with my project attached.)
How do I respond to a SpatialTapGesture in my RealityView when the tap is on no entity whatsoever? I tried just doing
RealityView {}
.gesture(SpatialTapGesture().onEnded { print("foo") })
but that doesn't get called.
All I can find searching is advice to add Collision and Input components to entities, but I don't want this on an entity; I want it when the user is not looking at any specific entity.
My app is a login item that gets registered as a background agent using SMAppService. On launch it checks to see that the user has an active subscription, and when I run it from Xcode, this works fine.
But it seems that if I restart my machine and it is run from launchd right at login, StoreKit doesn't return any purchases. This results in my app throwing up a window to tell the user to subscribe.
It’s hard to be sure this is the behavior, because I can't really use a debugger, and for whatever reason, OSLog is not persisting messages (despite being configured to do so).
Does anyone know if it takes a while after restart or login for Store Kit to reliably return purchases?
I'm having an issue with logging on my system (Sonoma 14.3.1), in that log messages disappear after 60-90 seconds, despite logging being configured to persist. This seems to happen across all subsystems.
The symptoms are:
• Watching the log stream in Console.app, messages older than 60-90 seconds disappear, even if no new messages are coming in.
• log show --last 2d only returns messages from the last couple of minutes.
I've filed FB13616761, but wondered if anyone had any other insights or suggestions. TIA
It seems cross-device passkey authentication isn't supported by the Simulator, is that right? I can't tell if it's the simulator not supporting it, or my app/server failing.
My app, running in the Simulator, presents a QR code during sign-in flow. I scan that with my phone, and it just spins "connecting…".
Can anyone confirm that the Simulator just doesn't support this?
What are my options for testing this flow? I guess I need another device not sign in to my AppleID.
I just started a little macOS app using SwiftUI and SwiftData. It seems to insist on placing the name of the file (along with the extension) in the title bar. I would prefer to put the name of the selection there instead (i.e. instead of "Untitled.paper", "New Article")..
Along with that, I'd like to control the appearance of "Edited" as well.
I have the suspicion that this simply isn't possible.
I'm trying to communicate with an RS-485 device using a USB-to-RS-485 adapter based on a CP21012N. It's capable of speeds up to 3 Mbaud. However, when I call tcsetattr() with speed set to anything other than one of the predefined constants (using cfsetspeed()), I get an "Invalid argument" error back from the call.
Googling, I found https://github.com/avrdudes/avrdude/issues/771
Seems like macOS really can't accept baud rates outside the predefined set without resorting to ioctl?
Topic:
App & System Services
SubTopic:
Drivers
_IOW and friends, defined in <sys/ioccom.h>, help build ioctl() calls. Is there an equivalent function in Swift?
Topic:
App & System Services
SubTopic:
Core OS
I don't know why we’re up to Xcode 16 and this stuff is still so damn difficult.
First of all, I don't know why I can't just send a .app I built for my M1 MacBook Pro to my friend who also has an M1 MacBook Pro. But even after going through the quarantine steps, he gets an alert saying the app can't be opened.
So I'm trying to do direct distribution of an archive. But that gives me two errors:
There is a problem with the request entity
You already have a current Developer ID Application Managed (With Kext) certificate or a pending certificate request.
No profiles for 'com.latencyzero.VideoBox' were found
Xcode couldn't find any Developer ID provisioning profiles matching 'com.latencyzero.VideoBox'.
The signing is managed by Xcode. CloudKit access works.
Topic:
Code Signing
SubTopic:
General