Posts

Post not yet marked as solved
2 Replies
0 Views
why? The easiest thing to do is build a Universal application, at some (usually small cost) to the user in disk space. If you really must do this, you'll need to read up on the documentation for installers: https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW7 and consult the man pages for pkgbuild and/or productbuild. Somewhere in there, you'll probably find that you can restrict what is installed based on arch.
Post not yet marked as solved
13 Replies
0 Views
As we learned in the "Create camera extensions with CoreMedia IO" presentation at WWDC 2022, a Camera Extension can present a sink interface to the system, accessible to an app via the CMIOHardwareObject.h and CMIOHardwareStream.h APIs. The Camera Extension template only offers a source stream, but it is pretty easy to add a sink stream. That's one way to get video into a Camera Extension, it works on 12.3 and it doesn't require a helper daemon to enable the app and extension to find one another. In Ventura, the plan is to have the app's extension be owned by the app's owner, so XPC would be an option. Easier again is to have the extension itself handle the video sourcing, while the accompanying app only provides control and status reporting, using the property interfaces of the extension. That's the intent behind the design.
Post not yet marked as solved
13 Replies
0 Views
I'll type this in the answer box then. If you can require 10.12 or later, it is much simpler than this. As I found out, an IOSurfaceRef cannot be directly transported over NSXPCConnection, but an IOSurface can. No need to do the CreateXPCObject or LookupFromXPCObject stuff unless you're on 10.7 to 10.11. The two types are toll-free bridged. The only thing I'm not sure about is which flavor of __bridge to use at each end. I'm thinking I need write IOSurfaceRef surface = CVPixelBufferGetIOSurface(pixelBuffer); [remoteObjectProxy sendIOSurfaceToExtension:(__bridge_transfer IOSurface *)surface]; and at the receiving end CVPixelBufferRef pixelBuffer; CFPixelbufferCreateWithIOSurface(kCFAllocatorDefault, (__bridge_retained IOSurfaceRef)surface,...); I guess I'll find out...
Post not yet marked as solved
2 Replies
0 Views
You have a clean (new) install of macOS 12.3.1. It doesn't have python. https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes Search the interweb to find why 'python' doesn't usually resolve automatically to python3, and the various ways you can install multiple versions of python on your machine. I use pyenv.
Post not yet marked as solved
2 Replies
0 Views
from NSWorkspace.h (void)setDefaultApplicationAtURL:(NSURL *)applicationURL toOpenContentTypeOfFileAtURL:(NSURL *)url completionHandler:(void (^_Nullable)(NSError *_Nullable error))completionHandler API_AVAILABLE(macos(12.0)); before macOS 12, use LSSetDefaultRoleHandlerForContentType from LSInfo.h in the LaunchServices framework. No idea how to do this with AppleScript. You could use Automator to make a Folder Action for any file matching a pattern in a particular directory. You'd probably want to put a Set Application for Files action after a Filter Finder Items action.
Post marked as solved
5 Replies
0 Views
you're looking at the Code Review panel. There are no changes to review, so it is blank. You need to turn off the view by clicking the control indicated here:
Post not yet marked as solved
5 Replies
0 Views
https://developer.apple.com/forums/thread/128166 also, read the man pages for codesign and spctl, carefully. Read the log files from your failed notarization attempt - they're telling you what is wrong. Your app isn't signed, you didn't add the timestamp flag, you didn't enable the Hardened Runtime.
Post not yet marked as solved
1 Replies
0 Views
I'm pretty sure the reason this is happening is because you are trying to put the string "helloworld" into x. x has room for 10 chars, "helloworld" requires 11, because strcat wants to put the terminating null into the destination too. You can right-click on strcat and choose Services/Open man page in Terminal from the contextual menu to read about the correct use of strcat.
Post not yet marked as solved
3 Replies
0 Views
Paul Hudson's Swift on Sundays series on YouTube has this - https://www.youtube.com/watch?v=TJfh8wXbfEw A functioning game in an hour and a bit, and 160 lines of code.
Post not yet marked as solved
3 Replies
0 Views
2 days ago there was an outage of the notarization service, and a performance problem which persisted a few hours beyond the outage. You can visit https://developer.apple.com/system-status/ if things are taking a suspiciously long time, that's how I know.
Post not yet marked as solved
5 Replies
0 Views
I think the next step beyond "learning coding" is learning to apply that knowledge to a particular domain. Code does something, usually something useful to yourself or other people. What useful thing would you like to make possible? What would you like to learn, and how does being able to code help you with that goal?
Post not yet marked as solved
1 Replies
0 Views
are you sure you're leaking memory created by the call to IOCreatePlugInInterface? It creates an interface, as its name suggests, returned in pHandle. Are you releasing that interface when you're done with it?
Post not yet marked as solved
1 Replies
0 Views
what do you mean by "does not work"? your code doesn't compile, primarily because UIKit is not available on macOS (AppKit is, so your UIViews should be NSViews). Even so, in setupCamera you refer to a variable called 'view' which is not declared.
Post not yet marked as solved
1 Replies
0 Views
I entered your code and ran it. Byte doesn't stop walking because Byte isn't done. There's a little scoreboard at the top left of the scene - it shows Bytes has collected 1/1 gems and tripped 0/1 switches. Try to split your code into functions which do only one thing, and are well named. For instance, rename 'checker' to 'checkSwitch' and have it only change the switch state if necessary, rather than sometimes changes switch state, and sometimes move forward. In this exercise, the path is predictable (you can see it), so your steps can be a list of instructions, with no branches and no conditionals.