Post

Replies

Boosts

Views

Activity

Reply to Can i use c++ in swift app project
Did you enable "C++ and Objective-C Interoperability" in the build settings (under Swift Compiler - Language)? What kind of interface does your library export? If it is C only, you won't need to do this. But if it exports any C++ symbols, or if its exposed headers include any C++ headers or data types, you're going to have to turn that interoperability on.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’24
Reply to Accessing Events from Video Device
The Apple driver has the UVC interface open all the time when the device is streaming, but not the device interface. You can send device commands or receive status over pipe 0. You would have to poll to get the button press. What platform is this on - macOS, or iPadOS? On macOS, if your button exposes a HID interface, you can use HID manager routines to get notifications of reports on the interrupt pipe. The system will attach its own driver to a keyboard or mouse, but it will leave a vendor-specific HID device alone, so your code can talk to it.
Topic: Media Technologies SubTopic: Video Tags:
Oct ’24
Reply to iPadOS, IOKit and Sandbox/MACF
nine months too late, but here we are. For dext loading, the OS uses the IOKitPersonalities dictionary, which is in your driver's plist. The entitlement is separate. For development, Xcode will make a special entitlement with idVendor="*", so you can play around with any device you like. I don't think I've ever managed to use "sign to run locally" for a dext. Instead, I use development signing with our team ID.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’24
Reply to Xcode Arguments Passed On Launch won't load
I see what you're seeing, but I don't agree with your expectation. BUILT_PRODUCTS_DIR and EXECUTABLE_NAME are not environment variables, they are Xcode build settings. The environment Xcode launches your tool into is empty, aside from the variables you set in the Environment Variables section of the Scheme settings. In my Terminal, I can echo $HOMEBREW_PREFIX and the result is /opt/homebrew. However, the result of getenv("HOMEBREW_PREFIX") in my program is null, if I run it from Xcode, but it is /opt/homebrew if I run it from an interactive shell, because that shell runs its programs in a non-empty environment. If you just want to debug your application, using the environment it would have if run at the command line in a shell on your machine, you can go the Scheme's Info tab, and select "wait for the executable to be launched". Then launch it from a Terminal window - it will get whatever environment your shell gives it.
Oct ’24
Reply to "How to" for dext distribution
I can tell you my experience with a Camera extension, and with a USBDriverKit extension. I believe the requirement that the kext's bundle ID begin with the bundleID of the hosting app is for iOS/iPadOS only. There isn't such a restriction for the dexts that I know about (but networking or security extensions might have different rules). That said, I see that I actually obey that rule with my projects, and it doesn't do any harm. Your dext has a managed entitlement for PCI. Your Account Owner has to make a profile for that on the developer portal - an Admin can't (but won't see a helpful error message, last time I tried as an Admin). You can leave all the Xcode settings that are working for development as they are. Try not to fiddle with Info.plist files or Build Settings directly if there is a way to set the same settings using the Info tab for your target, or the General tab, or the Signing and Capabilities tab, because those feed into the Build Settings. in my main app and dext targets, the Provisioning Profile is "Xcode managed profile" and the Signing Certificate is a Development one. That's fine, it is all going to re-signed for distribution. When you want to build for distribution from Xcode, archive your build. choose Distribute choose the Custom distribution method select Direct Distribution select the Export destination use the Manually Manage Signing option at this point, you'll be able to choose a Developer ID Application certificate, and the appropriate profiles for you app and its extension. If you're doing all this from a script, you have to figure out what the right commands are which correspond to the steps in the dialogs. Good Luck! I can't take you any further with this, because I gladly ceded signing and notarizing tasks to our DevOps team, so I don't have the signing certificates with the private keys on my Mac. AFAIR, I selected "None" for my app's Profile, it doesn't need anything special, while the driver has managed entitlements and I do need to set its profile explicitly. After a successful signing step here, you can use notarytool to notarize the app, and attach a ticket to it. There's a post from Kevin Elliot here about this https://forums.developer.apple.com/forums/thread/751490?answerId=787624022.
Oct ’24
Reply to The Digital Services Act (DSA) requires Apple to verify and display trader contact information for all traders who may distribute content in the EU.
if you scroll down to the bottom of this page, you'll see lot of links. Under the Support section there is a Contact Us section, use that to submit a support request to developer services. This forum is primarily for developers to help other developers with programming questions. It isn't an official Apple support channel, and it is public.
Oct ’24
Reply to Error I can't seem to fix
You haven't posted enough context. If you click on the Report navigator icon (the rightmost icon at the top of the left column in Xcode, which looks like a hierarchical list), you can see the full build log, which should help you to fix errors like these. With what you've posted, we can't see the name of the first missing file. The second missing file may be missing because the first is missing, and that in turn may be due to something reported only as a warning in the detailed build log.
Oct ’24
Reply to Organization Already Registered
in order to post here, you're a registered developer. If you click on the Account tab at the top of this page, then on the Membership Details icon, you'll see the name of the Account Owner and you can send them an email. Of course, that won't work if you're logged in as an individual rather than a member of the organization's team. If your company has lost those details, you can try the Contact Us link at the bottom of this page and explain your situation.
Oct ’24
Reply to Xcode basics
You could post the build log here, that would tell us some more. But there's (almost) nothing wrong with your code itself. I copied, pasted it, compiled and ran it. You probably configured your project wrongly (don't worry, there are LOT of options!) In Xcode, choose New Project. Choose the macOS Command-line Tool template. Give the project a name, choose C as the language. Once you save it, you'll get an Xcode project containing a command-line tool target which will print "hello, world" to stdout when run. You can select all the code you posted here, paste it in to main.c (replacing everything in the template code). Xcode will flag some errors due to formatting which are easy to correct - for example each #include line needs to be on a separate line. You'll end up with one warning about int main() being deprecated. You can fix that by changing int main () { to int main (void) { or int main(int argc, char ** argv) { after that, your program should build and run. If it doesn't, read the detailed build log, and if you don't understand it, post it here.
Nov ’24
Reply to Crash without stack trace in optimized builds on device (Xcode 16)
Maybe there's a bug in the optimizer. But I think it is more likely that your code is doing something wrong, and sometimes getting away with it. Try turning on the memory management diagnostics in the Scheme editor and run your debug version again.
Replies
Boosts
Views
Activity
Sep ’24
Reply to Local XCode Apple ID not updating after changing Apple ID email
Did you check in Xcode's Settings if you are logged in with the right Apple ID?
Replies
Boosts
Views
Activity
Oct ’24
Reply to Can i use c++ in swift app project
Did you enable "C++ and Objective-C Interoperability" in the build settings (under Swift Compiler - Language)? What kind of interface does your library export? If it is C only, you won't need to do this. But if it exports any C++ symbols, or if its exposed headers include any C++ headers or data types, you're going to have to turn that interoperability on.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Accessing Events from Video Device
The Apple driver has the UVC interface open all the time when the device is streaming, but not the device interface. You can send device commands or receive status over pipe 0. You would have to poll to get the button press. What platform is this on - macOS, or iPadOS? On macOS, if your button exposes a HID interface, you can use HID manager routines to get notifications of reports on the interrupt pipe. The system will attach its own driver to a keyboard or mouse, but it will leave a vendor-specific HID device alone, so your code can talk to it.
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to iPadOS, IOKit and Sandbox/MACF
nine months too late, but here we are. For dext loading, the OS uses the IOKitPersonalities dictionary, which is in your driver's plist. The entitlement is separate. For development, Xcode will make a special entitlement with idVendor="*", so you can play around with any device you like. I don't think I've ever managed to use "sign to run locally" for a dext. Instead, I use development signing with our team ID.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Errors with XCode C++ Standard Libraries
the first error suggests that your code does not #include the second error indicates that your code is using memchr on a wchar_t, and it should be using wmemchar. If you included the code that doesn't compile, rather than just the very last error message, someone might be able to help you further.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Undefined symbols for architecture x86_64:
if you look up CVPixelBufferGetBaseAddress in Xcode's developer documentation, you'll see it is in the Core Video framework. Similarly, CMVideoFormatDescriptionGetDimensions is in the Core Media framework. So I think you need to add CoreMedia and CoreVideo to your framework includes.
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Xcode Arguments Passed On Launch won't load
I see what you're seeing, but I don't agree with your expectation. BUILT_PRODUCTS_DIR and EXECUTABLE_NAME are not environment variables, they are Xcode build settings. The environment Xcode launches your tool into is empty, aside from the variables you set in the Environment Variables section of the Scheme settings. In my Terminal, I can echo $HOMEBREW_PREFIX and the result is /opt/homebrew. However, the result of getenv("HOMEBREW_PREFIX") in my program is null, if I run it from Xcode, but it is /opt/homebrew if I run it from an interactive shell, because that shell runs its programs in a non-empty environment. If you just want to debug your application, using the environment it would have if run at the command line in a shell on your machine, you can go the Scheme's Info tab, and select "wait for the executable to be launched". Then launch it from a Terminal window - it will get whatever environment your shell gives it.
Replies
Boosts
Views
Activity
Oct ’24
Reply to "How to" for dext distribution
I can tell you my experience with a Camera extension, and with a USBDriverKit extension. I believe the requirement that the kext's bundle ID begin with the bundleID of the hosting app is for iOS/iPadOS only. There isn't such a restriction for the dexts that I know about (but networking or security extensions might have different rules). That said, I see that I actually obey that rule with my projects, and it doesn't do any harm. Your dext has a managed entitlement for PCI. Your Account Owner has to make a profile for that on the developer portal - an Admin can't (but won't see a helpful error message, last time I tried as an Admin). You can leave all the Xcode settings that are working for development as they are. Try not to fiddle with Info.plist files or Build Settings directly if there is a way to set the same settings using the Info tab for your target, or the General tab, or the Signing and Capabilities tab, because those feed into the Build Settings. in my main app and dext targets, the Provisioning Profile is "Xcode managed profile" and the Signing Certificate is a Development one. That's fine, it is all going to re-signed for distribution. When you want to build for distribution from Xcode, archive your build. choose Distribute choose the Custom distribution method select Direct Distribution select the Export destination use the Manually Manage Signing option at this point, you'll be able to choose a Developer ID Application certificate, and the appropriate profiles for you app and its extension. If you're doing all this from a script, you have to figure out what the right commands are which correspond to the steps in the dialogs. Good Luck! I can't take you any further with this, because I gladly ceded signing and notarizing tasks to our DevOps team, so I don't have the signing certificates with the private keys on my Mac. AFAIR, I selected "None" for my app's Profile, it doesn't need anything special, while the driver has managed entitlements and I do need to set its profile explicitly. After a successful signing step here, you can use notarytool to notarize the app, and attach a ticket to it. There's a post from Kevin Elliot here about this https://forums.developer.apple.com/forums/thread/751490?answerId=787624022.
Replies
Boosts
Views
Activity
Oct ’24
Reply to The Digital Services Act (DSA) requires Apple to verify and display trader contact information for all traders who may distribute content in the EU.
if you scroll down to the bottom of this page, you'll see lot of links. Under the Support section there is a Contact Us section, use that to submit a support request to developer services. This forum is primarily for developers to help other developers with programming questions. It isn't an official Apple support channel, and it is public.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Error I can't seem to fix
You haven't posted enough context. If you click on the Report navigator icon (the rightmost icon at the top of the left column in Xcode, which looks like a hierarchical list), you can see the full build log, which should help you to fix errors like these. With what you've posted, we can't see the name of the first missing file. The second missing file may be missing because the first is missing, and that in turn may be due to something reported only as a warning in the detailed build log.
Replies
Boosts
Views
Activity
Oct ’24
Reply to I can’t understand this SwiftUI compile error.
another approach is to paste the offending code into some well-known llm, and ask it "what is wrong with this SwiftUI code". A predictive text model is quite good at spotting this kind of error, and suggesting a correction.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Organization Already Registered
in order to post here, you're a registered developer. If you click on the Account tab at the top of this page, then on the Membership Details icon, you'll see the name of the Account Owner and you can send them an email. Of course, that won't work if you're logged in as an individual rather than a member of the organization's team. If your company has lost those details, you can try the Contact Us link at the bottom of this page and explain your situation.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Xcode basics
You could post the build log here, that would tell us some more. But there's (almost) nothing wrong with your code itself. I copied, pasted it, compiled and ran it. You probably configured your project wrongly (don't worry, there are LOT of options!) In Xcode, choose New Project. Choose the macOS Command-line Tool template. Give the project a name, choose C as the language. Once you save it, you'll get an Xcode project containing a command-line tool target which will print "hello, world" to stdout when run. You can select all the code you posted here, paste it in to main.c (replacing everything in the template code). Xcode will flag some errors due to formatting which are easy to correct - for example each #include line needs to be on a separate line. You'll end up with one warning about int main() being deprecated. You can fix that by changing int main () { to int main (void) { or int main(int argc, char ** argv) { after that, your program should build and run. If it doesn't, read the detailed build log, and if you don't understand it, post it here.
Replies
Boosts
Views
Activity
Nov ’24
Reply to macOS how to download previous versions
softwareupdate --list-full-installers softwareupdate --help You can't install software older than the machine you're installing on. I keep full installers for the latest major revisions on an external disk. Hope this helps.
Replies
Boosts
Views
Activity
Nov ’24