Post

Replies

Boosts

Views

Activity

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 How can I keep Installer from relocating packages?
It is possible to use pkgbuild without --component-plist, it looks like you are doing that. If you want more control, run pkgbuild with the --analyze option, then edit the template plist to your liking (this is where you could make the app bundle non-relocatable), and subsequently use pkgbuild with --component-plist. It has been forever since I did this, so this is as far as I think I could assist. I hope it helps.
Jan ’24
Reply to CGMouseMove doesn't trigger menu bar
So you're saying that when a full screen app is frontmost, if you move the mouse cursor to the top of the screen directly, the menu bar appears, but if you place the cursor programmatically using CGDisplayMoveCursorToPoint the menu bar does not appear? Are you also saying that the commented-out code which inserts a mouse-moved event doesn't work? If it doesn't, in what way does it not work - does it not move the cursor, or it does move the cursor but the menu bar doesn't appear as expected?
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’24
Reply to CameraExtension and Uninstaller
your camera extension will be removed from the system when the user deletes the app from /Applications. They'll see a warning when they do so, it says something like "this app includes an extension which will be deleted if you delete this app, are you sure?". So if your app only contains a camera extension, you don't really need an uninstaller - everything goes away when the user deletes the app. Your installer can't deactivate the extension because the uninstaller's bundle ID is "com.my.app.unisntaller" and the extension you are trying to activate has a bundle ID which is not prefixed by "com.my.app.unisntaller". Two things here: did you intentionally mis-spell "uninstaller" in your bundle ID? If you have an uninstaller, it should just delete the app hosting the extension, and the OS will take care of unloading the extension
Topic: App & System Services SubTopic: General Tags:
Jan ’24
Reply to SwiftUI popover not updating binding
where are you using the TestPicker (aside from in its Preview)? it works for me when used in the ContentView below. I built this for iOS and ran it in a iPhone 15 simulator. To dismiss the picker, swipe down on the horizontal grey bar near the top of the screen. struct ContentView: View { @State private var selection = 1 var body: some View { VStack { TestPicker(selection: $selection) } .padding() } } #Preview { ContentView() } Lots of SwiftUI examples on Paul Hudson't site, for example https://www.hackingwithswift.com/quick-start/swiftui
Topic: UI Frameworks SubTopic: SwiftUI Tags:
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 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
Reply to How can I keep Installer from relocating packages?
It is possible to use pkgbuild without --component-plist, it looks like you are doing that. If you want more control, run pkgbuild with the --analyze option, then edit the template plist to your liking (this is where you could make the app bundle non-relocatable), and subsequently use pkgbuild with --component-plist. It has been forever since I did this, so this is as far as I think I could assist. I hope it helps.
Replies
Boosts
Views
Activity
Jan ’24
Reply to How can I keep Installer from relocating packages?
Does your component.plist contain <key>BundleIsRelocatable</key> <true/> If so, changed it to <false/>. I thought this (BundleIsRelocatable=true) meant that the user can change the destination. In fact, it means that the Installer can relocate the bundle to the location of a previously-installed bundle, rather than put it at RootRelativeBundlePath
Replies
Boosts
Views
Activity
Jan ’24
Reply to CGMouseMove doesn't trigger menu bar
So you're saying that when a full screen app is frontmost, if you move the mouse cursor to the top of the screen directly, the menu bar appears, but if you place the cursor programmatically using CGDisplayMoveCursorToPoint the menu bar does not appear? Are you also saying that the commented-out code which inserts a mouse-moved event doesn't work? If it doesn't, in what way does it not work - does it not move the cursor, or it does move the cursor but the menu bar doesn't appear as expected?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to CameraExtension and Uninstaller
your camera extension will be removed from the system when the user deletes the app from /Applications. They'll see a warning when they do so, it says something like "this app includes an extension which will be deleted if you delete this app, are you sure?". So if your app only contains a camera extension, you don't really need an uninstaller - everything goes away when the user deletes the app. Your installer can't deactivate the extension because the uninstaller's bundle ID is "com.my.app.unisntaller" and the extension you are trying to activate has a bundle ID which is not prefixed by "com.my.app.unisntaller". Two things here: did you intentionally mis-spell "uninstaller" in your bundle ID? If you have an uninstaller, it should just delete the app hosting the extension, and the OS will take care of unloading the extension
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to SwiftUI popover not updating binding
where are you using the TestPicker (aside from in its Preview)? it works for me when used in the ContentView below. I built this for iOS and ran it in a iPhone 15 simulator. To dismiss the picker, swipe down on the horizontal grey bar near the top of the screen. struct ContentView: View { @State private var selection = 1 var body: some View { VStack { TestPicker(selection: $selection) } .padding() } } #Preview { ContentView() } Lots of SwiftUI examples on Paul Hudson't site, for example https://www.hackingwithswift.com/quick-start/swiftui
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’24