Post

Replies

Boosts

Views

Activity

Reply to Handling data from bluetooth device
Is this a Bluetooth, or a Bluetooth Low Energy device? Is it yours (do you own the firmware, and know what it does)? Or is it a device from a third party that you would like to use? The easiest type of device to support is BLE. Have you looked here: https://developer.apple.com/bluetooth/ ? If you've never done this before, start with the Heart Rate Monitor app and use an off-the-shelf heart rate monitor. The Heart Rate Monitor profile is a published standard profile. If you're comfortable with it, you can also use a low-cost BLE development kit to make your own BLE device, with any profile you like, using chips from TI, Maxim IC, Silicon Labs, Nordic, Dialog etc
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’24
Reply to Xcode 15.2.0 has a compilation bug leading to incorrect code generation without warnings
you can enable the undefined behavior sanitizer in the Scheme settings under Diagnostics. This produces this warning for me, even for debug builds: runtime error: shift exponent 64 is too large for 32-bit type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior There's another, separate build setting, CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER, which did not help here. This forum isn't a place to report bugs - use Feedback Assistant for that. Undefined behavior really is undefined, you just got away with it before.
Jan ’24
Reply to unsatisfied entitlements macOS app
Further progress here. Following the instructions in TN3125, I find that the certificate inside the .mobileprovision file is expired after all! The steps were: remove the cms (Cryptographic Message Syntax wrapper) security cms -D -i <path-to-app>/embedded.provisionprofile -o badapp-payload.plist eyeball the badapp-payload.plist file, verifying that it includes a DeveloperCertificates section extract the first certificate plutil -extract DeveloperCertificates.0 raw -o - badapp-payload.plist | base64 -D > cert0.cer inspect the certificate certtool d cert0.cer which says Not After : 21:10:25 Sep 21, 2023 so, big oops on our part. Hopefully someone aside from myself can learn something from this, I'll post if the problems are all fixed by using a valid certificate.
Topic: Code Signing SubTopic: Entitlements Tags:
Jan ’24
Reply to unsatisfied entitlements macOS app
@eskimo thanks for the reply codesign --display --entitlements does show a com.apple.application-identifier is present, it is the same for both apps - the bundleID prefixed by our teamID. security cms -D on the embedded.provisionprofile shows the same result for both apps, including the same com.apple.application-identifier value in the Entitlements section. The working and non-working app both refer to the same certificate, with the same serial number, hash and expiration date. The profile for both the working and non-working app expires Sep 23, 2040 at 9:36:53 AM PDT The The plists differ a little, because the two apps were built on different Macs with different toolchains. BuildMachineOSBuild good 22A400, bad 22G90 DTPlatformBuild, good 14A309, bad <empty string> DTPlatformVersion, good 12.3, bad 13.3 DTSDKBuild good 21E226, bad 22E245 DTSDKName good macosx12.3, bad macosx13.3 DTXcode good 1400 bad 1430 DTXcodeBuild good 14A309, bad 14E222b I ran spctl --assess -vvv on the bad app, which said accepted I edited this post, previously I said spctl claimed the bundle format was unrecognized. That was my error - I passed it a path to the app which has spaces in its name with un-escaped spaces. Instead of it telling you that the path doesn't exist, spctl says it is broken. I don't know whether to believe that, because the system log tells me something else. Also, the bundles are almost identical. The "good" app has an additional profile, "embedded.mobileprovision". Which one does the OS use, and why is there an embedded.mobileprovision file in a macOS app? I'll have another look at those links you cited, thanks
Topic: Code Signing SubTopic: Entitlements Tags:
Jan ’24
Reply to Error OSSystemExtensionErrorDomain Code=4 "(null)"
I think this error is OSSystemExtensionErrorExtensionNotFound, from <SystemExtensions/SystemExtensions.h>. I see this error also when I try to deactivate my camera extension (after approving its removal with the OS' dialog), but I'm running on a laptop with a built-in, non-removable camera. Maybe the error doesn't happen if there are no cameras in the system, so my extension can be unloaded. I don't know and don't particularly care, because in our shipping apps we never make a deactivationRequest. It isn't clear to me what that API is for - as far as the user is concerned, the driver is installed because they installed its host app and approved it.
Topic: App & System Services SubTopic: Drivers Tags:
Jan ’24
Reply to CameraExtension and Uninstaller
I see. I didn't know that you installed other items. In this case, yes you would use an uninstaller. But the uninstaller doesn't need to deactivate the camera extension, all it needs to do is delete the hosting app. The camera extension will be deactivated and eventually deleted from the system. If the extension is still in use, it won't be unloaded until the hardware is unplugged or the system restarts. On macOS, the bundle ID of the extension and the hosting app don't have to be related. The Xcode template project sets up related bundle IDs, there's no good reason to stray from the practice. On iOS/iPad OS, the extension's ID must begin with hosting app's ID. Usually, the team ID of the extension and the host ID have to match, unless you have the com.apple.developer.system-extension.redistributable entitlement (macOS only) I don't know whether another app can deactivate your driver. Maybe it only works if the uninstaller also contains the driver extension (even if it would never activate it?). But it shouldn't be necessary anyway - just delete the camera extension's hosting app, and your audio plug-in.
Topic: App & System Services SubTopic: General Tags:
Jan ’24
Reply to iPadOS, IOKit and Sandbox/MACF
@W1EBR I know exactly what you mean (I'm trying to do something similar currently myself). Fortunately, my project is for our own hardware; we are entitled to our own USB vendor ID so we can make an iPadOS driver for our hardware. If your SDR is your own, or that of a business partner, you/they can request the entitlement com.apple.developer.driverkit.transport.usb entitlement. If it were third-party hardware, but the software is open source, you can let users download and compile it to run locally. No entitlements are needed, but obviously the barriers to entry for most users is way too high. If the SDR is a commercial product, it is up to the vendor of the product to provide a driver. There doesn't seem to be a way (yet? who knows?) to talk to arbitrary USB hardware on iPadOS. Apple would encourage you to file a feature request using Feedback Assistant if that's what you would like to able to do.
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’24
Reply to Handling data from bluetooth device
Is this a Bluetooth, or a Bluetooth Low Energy device? Is it yours (do you own the firmware, and know what it does)? Or is it a device from a third party that you would like to use? The easiest type of device to support is BLE. Have you looked here: https://developer.apple.com/bluetooth/ ? If you've never done this before, start with the Heart Rate Monitor app and use an off-the-shelf heart rate monitor. The Heart Rate Monitor profile is a published standard profile. If you're comfortable with it, you can also use a low-cost BLE development kit to make your own BLE device, with any profile you like, using chips from TI, Maxim IC, Silicon Labs, Nordic, Dialog etc
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Xcode 15.2.0 has a compilation bug leading to incorrect code generation without warnings
you can enable the undefined behavior sanitizer in the Scheme settings under Diagnostics. This produces this warning for me, even for debug builds: runtime error: shift exponent 64 is too large for 32-bit type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior There's another, separate build setting, CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER, which did not help here. This forum isn't a place to report bugs - use Feedback Assistant for that. Undefined behavior really is undefined, you just got away with it before.
Replies
Boosts
Views
Activity
Jan ’24
Reply to About Macos detecting USB camera problem
please provide more detail about the camera that doesn't work. Is it yours (do you own the firmware?) Is it supported on the Mac by the vendor? Have you inspected its USB descriptors?
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to How can I make an executable file from my assembly source code file?
maybe this is helpful? https://llvm.org/docs/CommandGuide/llvm-as.html
Replies
Boosts
Views
Activity
Jan ’24
Reply to After a Sonoma 14.3C update my MacBook Air M2 doesn't restart
use a second Mac with Apple System Configurator 2 to restore or recover the OS. https://support.apple.com/guide/apple-configurator-mac/intro-to-apple-configurator-cadf1802aed/2.17/mac/14.0
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to unsatisfied entitlements macOS app
Further progress here. Following the instructions in TN3125, I find that the certificate inside the .mobileprovision file is expired after all! The steps were: remove the cms (Cryptographic Message Syntax wrapper) security cms -D -i <path-to-app>/embedded.provisionprofile -o badapp-payload.plist eyeball the badapp-payload.plist file, verifying that it includes a DeveloperCertificates section extract the first certificate plutil -extract DeveloperCertificates.0 raw -o - badapp-payload.plist | base64 -D > cert0.cer inspect the certificate certtool d cert0.cer which says Not After : 21:10:25 Sep 21, 2023 so, big oops on our part. Hopefully someone aside from myself can learn something from this, I'll post if the problems are all fixed by using a valid certificate.
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to unsatisfied entitlements macOS app
I tried the new tool, syspolicy_check. It said (rightly) that we'd forgotten to staple the notarization. My Mac has Internet access to that won't make any difference, but I stapled it anyway. The results didn't change - the app won't launch.
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to unsatisfied entitlements macOS app
@eskimo thanks for the reply codesign --display --entitlements does show a com.apple.application-identifier is present, it is the same for both apps - the bundleID prefixed by our teamID. security cms -D on the embedded.provisionprofile shows the same result for both apps, including the same com.apple.application-identifier value in the Entitlements section. The working and non-working app both refer to the same certificate, with the same serial number, hash and expiration date. The profile for both the working and non-working app expires Sep 23, 2040 at 9:36:53 AM PDT The The plists differ a little, because the two apps were built on different Macs with different toolchains. BuildMachineOSBuild good 22A400, bad 22G90 DTPlatformBuild, good 14A309, bad <empty string> DTPlatformVersion, good 12.3, bad 13.3 DTSDKBuild good 21E226, bad 22E245 DTSDKName good macosx12.3, bad macosx13.3 DTXcode good 1400 bad 1430 DTXcodeBuild good 14A309, bad 14E222b I ran spctl --assess -vvv on the bad app, which said accepted I edited this post, previously I said spctl claimed the bundle format was unrecognized. That was my error - I passed it a path to the app which has spaces in its name with un-escaped spaces. Instead of it telling you that the path doesn't exist, spctl says it is broken. I don't know whether to believe that, because the system log tells me something else. Also, the bundles are almost identical. The "good" app has an additional profile, "embedded.mobileprovision". Which one does the OS use, and why is there an embedded.mobileprovision file in a macOS app? I'll have another look at those links you cited, thanks
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Error OSSystemExtensionErrorDomain Code=4 "(null)"
I think this error is OSSystemExtensionErrorExtensionNotFound, from <SystemExtensions/SystemExtensions.h>. I see this error also when I try to deactivate my camera extension (after approving its removal with the OS' dialog), but I'm running on a laptop with a built-in, non-removable camera. Maybe the error doesn't happen if there are no cameras in the system, so my extension can be unloaded. I don't know and don't particularly care, because in our shipping apps we never make a deactivationRequest. It isn't clear to me what that API is for - as far as the user is concerned, the driver is installed because they installed its host app and approved it.
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to USB DriverKit returning large asynchronous data
I have reposted this question with better tags, here: https://developer.apple.com/forums/thread/744312 Sorry for the noise, but I didn't notice within the editing timeout period.
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Is there any payment from Apple for my old developer account?
I don't think you're liable to get an answer here (this is a forum about technical issues with creating software for Apple platforms, not an official support channel). Try starting here instead: https://developer.apple.com/contact/#!/topic/select
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to "IOSurface creation failed" drawing to CGContext
are these jpgs all the same size (width/height)?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to CGMouseMove doesn't trigger menu bar
Well, I'm out of ideas. If it were me, I'd file a DTS incident
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to CameraExtension and Uninstaller
I see. I didn't know that you installed other items. In this case, yes you would use an uninstaller. But the uninstaller doesn't need to deactivate the camera extension, all it needs to do is delete the hosting app. The camera extension will be deactivated and eventually deleted from the system. If the extension is still in use, it won't be unloaded until the hardware is unplugged or the system restarts. On macOS, the bundle ID of the extension and the hosting app don't have to be related. The Xcode template project sets up related bundle IDs, there's no good reason to stray from the practice. On iOS/iPad OS, the extension's ID must begin with hosting app's ID. Usually, the team ID of the extension and the host ID have to match, unless you have the com.apple.developer.system-extension.redistributable entitlement (macOS only) I don't know whether another app can deactivate your driver. Maybe it only works if the uninstaller also contains the driver extension (even if it would never activate it?). But it shouldn't be necessary anyway - just delete the camera extension's hosting app, and your audio plug-in.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to iPadOS, IOKit and Sandbox/MACF
@W1EBR I know exactly what you mean (I'm trying to do something similar currently myself). Fortunately, my project is for our own hardware; we are entitled to our own USB vendor ID so we can make an iPadOS driver for our hardware. If your SDR is your own, or that of a business partner, you/they can request the entitlement com.apple.developer.driverkit.transport.usb entitlement. If it were third-party hardware, but the software is open source, you can let users download and compile it to run locally. No entitlements are needed, but obviously the barriers to entry for most users is way too high. If the SDR is a commercial product, it is up to the vendor of the product to provide a driver. There doesn't seem to be a way (yet? who knows?) to talk to arbitrary USB hardware on iPadOS. Apple would encourage you to file a feature request using Feedback Assistant if that's what you would like to able to do.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’24