With Xcode 16 I cant make the Final Cut Extension Workflow work.
I am quite sure I was able to add the Workflow Extension target a couple of months ago in Xcode 15 and did successfully build it, but in Xcode 16 it wont build and it fails with this error:
clang: error: unknown argument: '-e_ProExtensionMain'
I have installed multiple times Workflow Extensions SDK 1.0.2 and even disabled Library validation like its described in the release notes but I dont think thats the problem here.
Seems like clang doesn't have the arguments for it, I guess the SDK should add these but seems like something got messed up - the template shows up fine in Xcode. I reinstalled Xcode and command line tools but that didnt help. Checking clang it really doesnt have the argument. But where does the SDK add this? Xcode seems to be using internal clang and /usr/bin/clang doesn't have it either.
Any tips what could be the problem here? I was not really able to locate the SDK to remove it before trying to install again - any ideas?
Steps to reproduce
Create new project
Add FCP workflow extension target
Build -> it fails
Same behaviour with 16.1 Beta. I am running Sonoma 14.7.
Thanks in advance for any ideas!
Post
Replies
Boosts
Views
Activity
I’m trying to implement XPC Rendezvous like Quinn described in many awesome posts on here but I’m now at a stuck point were I just have no idea.
I want to communicate with a Safari extension via XPC and also a helper application which led me to XPC Rendezvous (https://developer.apple.com/forums/thread/715338) because a XPC Service in the Extension is scoped to the container. I then made a Command Line Target and added it like its described here (https://developer.apple.com/documentation/xcode/embedding-a-helper-tool-in-a-sandboxed-app
) and also took the xpc test code and inspiration to set up my launch agent from here (https://developer.apple.com/documentation/servicemanagement/updating_your_app_package_installer_to_use_the_new_service_management_api). This command line tool should do the management for the XPC connections because it’s not in the sandboxed container.
The tool sets up the xpc connection like in the sample code directly and not in a XPC Service added via a Target template. It exposes the Mach Service.
And that looks like its building fine after some fighting but the service just wont start - I saw it trying in console and after running it in Xcode and finally finding the crash report - it brought me there (https://developer.apple.com/forums/thread/706390)
I have Process is not in an inherited sandbox. - and thinking about it, it makes sense because I first thought its just because it ran through Xcode, but its crashing this way also as a LaunchAgent.
I mean it does make sense - there is nothing to inherit because it’s spawned by launchd - and that’s what I want isn’t it - to make the Rendezvous?
Okay I thought now removing com.apple.security.inherit brings it in its own Sandbox (its needs sandboxing) but this also crashes the process because of the sandbox. Also after adding it to the App Group. What am I missing here or what do I want to accomplish? Do I want to inherit the sandbox? I guess not the helper should have its own.
The only difference I see in comparison to SMAppServiceSampleCode is it moves the product in Copy Bundle Resources, and I have a Copy Files Phase with Destination: Executables (Like the other sample code said - and that’s looks “more correct” - and well SMAppServiceSampleCode isn’t sandboxed.
I then tried making a new Command Line Target and just added App Sandbox Capability and tried to run this fresh one - and that also crashes. This makes me think I’m just ****** somewhere but I have read now everything I could find.
I’m happy to provide any Code or crash logs but I dont know what part is really relevant here, It looks like the LaunchAgent gets installed correctly and wants to run but the sandbox is preventing me. The Bundle Identifier and XPC device name of the helper starts with my teamID
(I got that from here https://developer.apple.com/forums/thread/703702)
What could I be doing wrong?
Thanks a lot!
Benjamin
Issue
After an Update to 12.4 my AVCapture session is using between 70-90% CPU
That code is just a simple capture session in a Mac Catalyst App with the webcam of the Mac. The session calls an empty func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) and nothing more is happing in the test app I tried. Also no rendering of the stream.
My test code ran with 10-15% CPU usage a week ago, before I made an update today to macOS 12.4 - with rendering into a Metal view maybe 20-25%
To reproduce:
take AVCam project https://developer.apple.com/documentation/avfoundation/capture_setup/avcam_building_a_camera_app
Set checkbox for Mac Catalyst Support in General
run on Mac
The original sample code from Apple is also running with the same high CPU usage.
But even my AVCaptureSession code ran a week ago at about 15% which might even be too much.
I have tested this on a 2019 Intel MacBook pro and also tried it on a macOS 12.4 iMac which did result in the same high CPU usage with all the test apps.
Update to macOS 12.5 Beta 3 did also not help. But I know it ran better with macOS <12.4 and also almost 100% CPU even with 800% overall available is too much for just camera capture
Profiling in Instruments
Insturments is showing me with the heaviest stack trace a lot VN calls with object detection - is this the camera autofocusing? Do I need to put more options for the capture device? I don't call anything from the Vision Framework - is this happening automatically?
It looks like this, feels like a lot of work for just the Mac webcam:
what to do?
Is this a problem with macOS 12.4? Do you have a better running Capture session on 12.4 and what is needed to archive that? Could this be a Catalyst problem? Is this a bug which needs a bug report with Apple? I can't really go back to a previous version, and it would be neat if the code would also work on macOS 12.4 haha