Post

Replies

Boosts

Views

Activity

Reply to What does deprecating kernel extension really mean?
"deprecated" means you are advised not to use them for new development. It is also a warning that they may become entirely unsupported in future. Session 702 of WWDC 2019 said that Apple think system and driver extensions are so good that they encourage their immediate adoption. How long a technology is deprecated but nevertheless supported varies - I've seen APIs deprecated since 10.6 which didn't disappear until 10.15.The same session said that creating a proxy object in user space also creates the real object in the kernel, and that dexts and kexts thus compete. They didn't say what the priority rules are - I expect that given the same match scores, a dext will win because it is presumed newer/better/more secure.You may want to consider providing an uninstaller for your legacy kext.
Apr ’20
Reply to IOKit user-space framework migration to DriverKit (in Catalina and above)
Apple have given no indication that the IOKit framework for user access to USB devices (IOKit/usb/IOUSBLib.h) is going away. ''The IOKit and DriverKit frameworks serve different purposes.If you have a USB device which performs a function for your own application, you can use user-space USB to access it. If you want third party applications to be able to use your device, you have toa. provide your code in source form to third parties orb. provide a library, orc. document the USB commands and responses and hope that those third parties come to grips with your device.However, if your device provides a common function, such as networking, serial ports, video input or audio I/O, there are standard interfaces for these. Ideally, your USB device would perform its standard functions in a fully standard manner, and could be driven by built-in class drivers.However, somef real-world devices have idiosyncrasies or enhancements at the bus level which preclude the use of standard class drivers. On 10.14 and earlier, a kext can be used to convert a non-standard bus interface into a standard system interface. On 10.15 and later, a dext can (theoretically) perform the same function. Currently documentation and example code is sorely lacking (although some DriverKit documentation has appeared fairly recently).
Apr ’20
Reply to The best way to learn macOS application development
Xcode is a development system. C and C++ are programming languages.Most Mac programming tutorial material is for Objective-C or Swift, which are both programming languages.SwiftUI is still very new, I would advise you to stay away from it for now.Search the Internet for "macOS programming tutorial" and pick something where you like the style and the examples aren't too old. If possible, run exactly the same version of Xcode and everything else (OS, SDK, Swift) that the tutorial uses.Read up about how best to ask questions on the Internet, and then ask away if you still need to.Different people learn best in different ways. Also, you begin as a beginner, and become more and more experienced. The best resources for you will vary depending on the level of your expertise. I find that particularly in the beginning, it is very useful to have a more knowledgeable friend who can point out a misplaced semicolon or bracket.Unfortunately, these forums don't have a great deal of traffic - some questions go unanswered for months, there are more lively online forums than these.Good luck!
Apr ’20
Reply to program with terminal
what you want to do is write a program which sets a default, for a user who is not comfortable with the command line.You could make an objective C app which does thisNSUserDefaults * defaults = [[NSUserDefaults alloc] initWithSuiteName:@"com.apple.mail"];if (defaults) { [defaults setObject:@YES forKey:@DisableInlineAttachmentViewiing]; }the above is entirely untested, by the way.if won't open Terminal, but it could display a window saying "Mail will no longer show attachments inline" instead. For extra points you could give it a UI and enable your user to turn the preference on or off with a button in a window.Note that stomping on the preferences of other applications is not a great way to interact with those applications.
Apr ’20
Reply to Signing/Notarization for non-paying devs
As long as you sign your app, you and others can run it.However, if it is not notarized, on recent OSs, users will see nasty warnings when they download it or attempt to open. On Catalina, they'll not usually be given the opportunity to even open the app.Notarization is an extra step which ensures the end user that your developer ID has not been compromised. Users can right-click (or control-click, or tap-with-two-fingers) your application and choose Open from the contextual menu. They'll see a similar dire warning about Apple being unable to check if the app is dangerous, but they can click Open in that dialog.In short, Gatekeeper will let it through, but only with explicit user consent (and most users won't know to right-click and choose Open).
Apr ’20
Reply to RAM for Xcode or which macbook pro to choose?
I usually use a 2017 15" MBP with 16GB RAM, but I've recently been using a 2018 MacBook Air with 8GB RAM. The MacBook Air is slower, but it isn't terrible - the main thing I miss is the screen real estate. Unless you're compiling huge programs or ones that stress the CPU continually, the bursty nature of compilation CPU loads will work in your favor - you can use a thin and light laptop. You'll definitely want more memory if you run multiple VMs, or if you run the iOS simulator.If someone stole all my stuff and I had to start again with $1100, I'd buy the used MBP, a used 24" monitor and external keyboard and a trackpad. But I don't code on the go, I'm usually sat at a desk.Generally, buy the machine YOU need now, not the one you think someone else will want in a few years time.
Apr ’20
Reply to how does macOS populate /dev/ for connected devices
I can't answer your question directly (I don't know how/when the system populates /dev when a USB to serial device appears), but it looks like you're using an ancient Keyspan adapter. I've had good experiences with SiLabs CP210x series converters (including endless amounts of hotplugging), so maybe you should give one of those a try. Look for CP2104-MINIEK at silabs.com.You may find that the behavior around hot-plugging is different with a different device, with a different device driver.
Apr ’20
Reply to How do I set DriverKit entitlements during development?
Well said. I submitted a DTS question about this and DTS told me that the documentation wasn't wrong (I, like you, think it is), and that I need to wait for the entitlements. A few days later this was posted to the forum, which may help you (I haven't tried it yet)https://forums.developer.apple.com/thread/131240if it works for you, please check the "this helped me" box. Also, please file a bug report against the DriverKit documentation.
Apr ’20
Reply to USB attach detach events
Hi ShanonJ,as you may have noticed, there is precious little activity on these forums, there are other places on the Internet which are more active. The forums are full of posts without answers.That being said, you want to look at https://developer.apple.com/library/archive/samplecode/USBPrivateDataSample/Introduction/Intro.html#//apple_ref/doc/uid/DTS10000456 to begin with. It is ancient but still relevant.Unfortunately, this is how Apple's documentation works - the shiny new is presented and the old is shoved into an "no longer updated" box, even when it is still perfectly usable, without any indication of where the new documentation is to be found (often there is no newer documentation!)DriverKit provides a way to write what used to be an in-kernel driver outside the kernel. But many USB devices can be supported with user-level code; most USB devices that require kernel drivers use standard class interfaces and can be supported by Apple's system drivers. DriverKit (or kernel extensions) are for those cases where the device is not supported by standard class drivers but most nevertheless be made available to the whole OS, not just a single app.hope this helps, Stuart
Jun ’20
Reply to Can't load my driverkit driver
"Extension not found in App bundle" - have you verified that your driver extension is located in the right place in the app bundle (in ***.app/Contents/Library/SystemExtensions/)? And if it is there, have you verified that it has the right name and bundle ID?I've often spent quite a while tracking down bugs because I misspelled a bundle ID somewhere...hth, Stuart
Jun ’20
Reply to Is it possible to develop USB drivers for third-party camera devices ?
Hi. You asked There is some third-party software that seems to work with the specific Z6 camera - how is it they are able to access the video stream from the camera via USB without using a vendor specific driver ? Is there some other way to access the device directly from within an application ?   You can use the user-space USB APIs to access any USB device (see IOKit/usb/IOUSBLib.h). Even class-compliant devices can be accessed if you write a codeless kext which outmatches the system's driver. Apparently code-less dexts are also possible, but I don't know if they will be matched at boot time, so you might have a hard time if you want to directly access a keyboard or a mouse. The only downside to this approach is that the data from the camera would only be visible to your process, it isn't generally available to the system. To partially solve this, you can build a CoreMedia IO plugin, which is loaded into other processes. Your plugin knows how to communicate with your app, and uses some form of inter-process communication to get the frames from your camera-controlling app. CoreMedia IO plug-ins don't work in apps like Photo Booth which do not allow loading of third-party plug-ins. Another way to make a vendor-specific camera widely available would be to write a kernel extension which changes the way it responds to Get Descriptor calls and they way it vends data, so that it appears to the system like a UVC device. It may be possible to do this with a dext.
Jun ’20
Reply to driverkit installation app fails with code signature error
HI Quinn thank you for your reply. Indeed there are some differences. The entitlements file has the following entries which are not in the profile com.apple.security.app-sandbox (true) com.apple.security.files.user-selected.read-only (true) com.apple.security.get-task-allow (true) the app-sandbox and files entries aren't explicitly set by me, the project template put them there. the get-task-allow is from Xcode because this is a debug build (and I would like to be able to build it). This would be automatically removed if I were to notarize the app, but I'm not doing that because I have SIP turned off. I think the problem is that my profile contains this: <key>com.apple.developer.driverkit.transport.usb</key> <array> <dict> <key>idVendor</key> <integer>our-vendor-id</integer> </dict> </array> while my entitlements file contains: <key>com.apple.developer.driverkit.transport.usb</key> <array> <dict> <key>idProduct</key> <integer>someone-elses-product-id</integer> <key>idVendor</key> <integer>someone-else-vendor-id</integer> </dict> </array> because I wanted to try something out on another vendor's hardware before committing resources to our own development. Is this the problem? I can only mess with our own products? How can I do this kind of experimentation, or is it verboten? What if I don't have a profile with a driver kit entitlement at all, I just want to try things out on my own Mac? thanks for you help! Stuart
Aug ’20