Hi guys!
OK, reaching out for some help here.
I am having all kinds of trouble with OSDeclareDefaultStructors.
I have seriously been at this for nearly a week now and have come to the conclusion that I need to reach out for help from people that are more experience using Xcode.
I believe entirely that my issue is just that I can't for whatever reason see how to set up includes and libraries and things like that.
I have this line:
OSDeclareDefaultStructors(NukeVirtualGamepad)
No matter what I do, Xcode will not recognize OSDeclareDefaultStructors.
The project builds a DriverKit > Driver extension.
I have literally tried absolutely everything with this. I am at a loss for words. I even set up a new blank project and it still will not recognize OSDeclareDefaultStructors.
I did a lot of research and it looks like expo needs OSDeclareDefaultStructors in order for the extension to build with a binary in it instead of being just a codeless extension.
Here is the code with the issue:
#pragma once
#include <DriverKit/OSMetaClass.h>
#include <HIDDriverKit/IOUserHIDDevice.h>
#include <DriverKit/OSData.h>
class NukeVirtualGamepad : public IOUserHIDDevice {
OSDeclareDefaultStructors(NukeVirtualGamepad) // The problem is right here! This line!
public:
// Keep it minimal; no 'override' keywords since the .h types may not mark them virtual
bool init();
void free();
kern_return_t Start(IOService* provider);
void Stop (IOService* provider);
OSData* newReportDescriptor();
// (Optional) helper you’ll use later to inject input matching your report
kern_return_t PostInput(uint16_t buttons, int8_t x, int8_t y);
};
I do have to mention to everyone that I am still very new with Xcode. So there is a ton that I don't know yet or might be misunderstanding.
Has anyone seen this before?
Thank you in advance.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi guys!
I have gone through an absolute nightmare, trying to solve the issue that I am about to tell you about.
As the title says, I am getting the error:
Library '/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/lib/darwin/libclang_rt.profile_driverkit.a' not found
I trimmed off part of that directory as I did not want to reveal that information about my computer.
From what I can tell, the file in question is no longer even a part of Xcode. I have searched, it is not on my computer anywhere.
I have also downloaded older versions of Xcode to search with it. None of them have it.
I have literally tried everything under the Son to solve this issue.
I have been stuck on it for two days.
I have even resorted to doing something I hate, which is asking for ChatGPT to assist me with solving the issue. No help there.
I am at my wits end. So I am coming to you guys, have you seen this error?
Any ideas at all? The odds are pretty good whatever you recommend I have probably already tried 200 times over. But I am still open to hearing anything.
Have any of you had this error? Any ideas?
I am on the latest version of macOS.
The project is for a macOS app.
M4 Mac mini.
Any additional information I can provide, that will be helpful?
At this point, I am leaning more towards this being a bug with Xcode than anything.
Hi guys.This might be a dumb question but I am going to ask it anyways.I just started learning swift and have a ways to go. I have been looking to see if there is a simple ping command in swift on a mac app?I have been looking but can not seem to find information about this. For exaple, pinging gooogleThank you in advance and sorry ifthis is a dumb question.