Post

Replies

Boosts

Views

Activity

Reply to USB HID Specifics for Mac OS?
how exactly do you determine that the joystick "does not work" on macOS? Joysticks are not directly supported by the OS, you need to have code that specifically looks for input from HID joysticks. Do you have such code? There's an old project on GitHub https://github.com/arsdraconis/HID-Explorer which needs a few changes to compile on modern macOS, but you may be able to use this to get more insights into how your device is treated by the OS. Also, see this post on Stack Overflow: https://stackoverflow.com/questions/41715074/simple-hid-osx-application, which refers to the open source parts of IOHIDFamily.
Topic: Graphics & Games SubTopic: GameKit Tags:
Mar ’24
Reply to MetalC++ is confusing
If you insist, Qt is a cross-platform C++ framework for app development which can target macOS. However, I think you're rowing against the tide here. Current documentation and online articles about macOS development lean towards Swift (ten years old) and SwiftUI (five years old), and Objective C. You can use C++ with ObjC code, just change the file extension from .m to .mm. I don't think it is possible to write any meaningful app without using a library of some sort. What exactly are you trying to avoid?
Topic: Graphics & Games SubTopic: General Tags:
Mar ’24
Reply to Problem with my files disappear in xcode
are you sure you have a ContentView.swift file on disk? You say "all my files were gone" but I only see one that Xcode can't find. Where does Xcode think it is? Click on the file ContentView in the file navigator on the left, open the inspectors panel on the right, select the File inspector (the first one). You'll see the Full Path - does it lead where you expect? If the file is present on disk, you can update the path by clicking the little rightward-pointing arrow in a circle next to the path and selecting the file in its actual location.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’24
Reply to Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier
this looks a little odd to me: "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018MyApp.productbuild.pkg\U2019."; because it is presenting the name of the package inside quoted Unicode LEFT SINGLE QUOTATION MARK and RIGHT SINGLE QUOTATION MARK. I'd expect plain quotation marks. Take a careful look at the contents of your scripts and make sure you're not copying a command line from a text editor (such as Word) that likes to convert written ' and " to curly quotes.
Mar ’24
Reply to How to achieve this gradient and the translucent text in SwiftUI?
something like this should get you started. You'd probably want to put any custom colors into an Asset, not hard-code them like this. All the colors I made here are transparent, so my white background shows through. I found many relevant samples quite quickly by searching the Internet for "SwiftUI gradient" and "SwiftUI custom color" and "SwiftUI filled rectangle". Did you do the same? If you didn't, you really should have... extension Color { static let pink = Color(red: 0.8, green: 0.0, blue: 0.0, opacity: 0.3) static let reddish = Color(red: 1.0, green: 0.0, blue: 0.0, opacity: 0.5) static let darkishRed = Color(red: 1.0, green: 0.0, blue: 0.0, opacity: 0.3) } let gradient = LinearGradient(gradient: Gradient(colors: [.pink, .reddish]), startPoint: .top, endPoint: .bottom) struct ContentView: View { var body: some View { ZStack { RoundedRectangle(cornerRadius: 10) .fill(gradient) .frame(width: 200, height: 200) Text("hello world") .font(.largeTitle) .foregroundStyle(Color.darkishRed ) } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’24
Reply to Developer Program Documentation Access & Xcode
all the documentation for development of applications for iOS, watchOS, iPadOS, macOS, visionOS is available without a paid developer account. To develop accessories under the MFi program, you need an MFi program membership. https://mfi.apple.com Is there anything specific you cannot find?
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’24
Reply to Xcode debugging through USB
Presumably you are developing an app that runs on something other than a Mac? Connect the destination phone or iPad to the development Mac with a USB cable. The iPad/iPhone will ask if you want to trust the computer. Xcode will take a little while to make the iPad/iPhone ready for debugging. You can monitor its progress using Xcode's Window/Devices and Simulators menu. I don't think there's any control over how Xcode begins debugging - it uses USB if there's a connection, WiFi otherwise. If I break the USB connection mid-session, Xcode does not fail over to WiFi automatically.
Feb ’24
Reply to Using an existing driver with a USB serial chip with custom VID/PID
My first question is "why?" If you're only changing the vid/pid to make the product appear different to anyone else's which is based on a CP2102, do you really need to? Can you figure out whether it is yours by probing the serial interface? Could you just change the vendor and product strings, instead of the IDs? How much user confusion is likely to arise if you just stick with Silicon Lab's vid/pid? All of this dext scaffolding is quite painful to get right. The user is burdened with approval of the dext, but if you didn't change the vid/pid of the CP2102, they would not be, because the Apple dext is pre-approved. I don't know if you can use the recommended approach here, of subclassing from a known DriverKit class, but overriding nothing. This is because AppleUSBSLCOM is specific to the Silicon Labs CP2102, its interface isn't in the DriverKit headers. You can't simply inherit from IOUserUSBSerial, because that driver doesn't know about CP2102, and I don't think you can inherit from AppleUSBSLCOM, because you have no header file for it. I'd try two things: go to /System/Library/DriverExtensions/com.apple.DriverKit-AppleUSBSLCOM.dext and copy the DriverKit-AppleUSBSLCOM-CP2102 IOKitPersonality from it, change the idProduct and idVendor and put that modified dictionary into your driver's plist. Your personality is now referring to an executable which isn't present in your bundle, I don't know if that will work. You may need to ensure that your dext contains some executable code, but this personality won't refer to it. Your code should already generate a do-nothing dext. ensure that your app actually tries to activate your extension using what does systemextensionsctl list tell you? I use log collect --last 20 immediately after activation to give me a workable log archive that isn't too huge and isn't constantly changing where I can read messages which my be pertinent to my dext. I don't use systemextensionsctl developer on any more. Its laughingly poorly documented - what is developer mode, for example (FB7656761) ? As for entitlements, your hosting app needs the System Extension entitlement. Your driver needs DriverKit (a boolean YES), DriverKit USB transport (a dictionary containing an array of idVendors, usually just one), and DriverKit serial family
Topic: App & System Services SubTopic: Drivers Tags:
Feb ’24