Post

Replies

Boosts

Views

Activity

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
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 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 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 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 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 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 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 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:
Replies
Boosts
Views
Activity
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.
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Moved to new computer and app has errors
I see from the tooltip in the last screenshot that your documents are in the cloud. You said you "moved to new computer". Did the system have time to sync all your documents? Did you try deleting the derived data folder, then archiving and distributing your app again?
Replies
Boosts
Views
Activity
Feb ’24
Reply to CARP violation when calling AudioUnitSetProperty on Silicon Macbook
I don't know if this is any help to you, but 2003332927 is 'who?', or kCMIOHardwareUnknownPropertyError. In case you don't know, you can paste the number into the calculator app on macOS, use cmd-3 to display the programmers calculator and clock the little ASCII button. Are you using AudioObjectHasProperty before calling AudioUnitSetProperty?
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Feb ’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:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Bluetooth CBAdvDataManufacturerData format documentation
Core Specification Supplement 11 (https://www.bluetooth.com/specifications/css-11/) page 16 (Part A, Section 1.4.1) "The first two data octets shall contain a company identifier from Assigned Numbers. The interpretation of any other octets within the data shall be defined by the manufacturer specified by the company identifier."
Replies
Boosts
Views
Activity
Feb ’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.
Replies
Boosts
Views
Activity
Mar ’24
Reply to Problem iOS camera detect QR code with vCard Containing Space in FullName
if you think you've found a bug, file one using Feedback Assistant. Bugs you report here are not entered in Apple's bug report tracker.
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Mar ’24
Reply to App Sandbox entitlement stripped from dext by Xcode?
I filed a bug with a minimal macOS project with a DriverKit dext which exhibits this same behavior, FB13688443
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Mar ’24
Reply to I searched for MFi's authentication information, but did not specify the need to add an MFI chip to the USB-C interface. Have you resolved the communication issue between the APP and external USBC?
Could you rephrase your question? What communication issue are you referring to? How does MFi play into this (there is a separate section of the forum for MFi-related questions). What exactly do you need help with?
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Mar ’24
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:
Replies
Boosts
Views
Activity
Mar ’24
Reply to Xcode Managed Provisioning Profile
It is a provisioning profile for the app, not for the device the app runs on. The profile ends up embedded in your app (in the bundle, in a .embeddedprovisionprofile file).
Replies
Boosts
Views
Activity
Mar ’24