Post

Replies

Boosts

Views

Activity

Reply to run command line tool with associated dylib
Thank you, Quinn for your in-depth steps. I tried steps 1 through 6 locally and they worked, so I had another look at the libraries I'd been given. The problem was, they had their quarantine flag set (because they emanated from a .zip file from my vendor). If I use Finder or cp to copy these files, the quarantine flag is preserved, but it seems to be removed if Xcode copies the files in a Copy Bundle Resources phase, which is why the tool linked and ran when it was inside a folder in an app bundle - nothing to do with the app bundle, rather a side effect of using Xcode to copy the files. Does the forum allow one to accept two answers to a problem?
Topic: Code Signing SubTopic: General Tags:
May ’24
Reply to run command line tool with associated dylib
Thank you for pointing out mergeable libraries, I didn't know about those. I already enabled the hardened runtime on the command line tool, and didn't check any of the boxes which relax it. I'm stumbling over the double negative in "make sure not to disable library validation" though. You said "this disables the Gatekeeper check...", but does "this" mean library validation or disabling library validation? I couldn't get the dylib to be used at all at runtime without packaging the tool and its dylib inside an app bundle - that's the part I find most inconvenient. The tool is used as a test harness for the library, which includes code that I would like to be able to debug.
Topic: Code Signing SubTopic: General Tags:
May ’24
Reply to How to disable/disconnect ethernet adapter USB type using Network Framework API for Mac
I don't know what "bounces the interfaces" means. You seem to be saying "my USB to Ethernet adapter does not come up properly after the I use the networksetup or ifconfig commands to bring it down then back up again" have you tested whether similar commands produce the right response from the same hardware on another platform? This might be a problem with the off-brand hardware, rather than the commands provided by macOS.
Topic: App & System Services SubTopic: Core OS Tags:
May ’24
Reply to My SwiftUI code is becoming un-SwiftUI-y. I'm looking to make things right again.
You've got a property of your model which is complex to calculate (availableWords) and depends on two other properties (cardPile and languageChoice). That dependency has nothing to do with UI. You can make a custom setter for cardPile and languageChoice which calls updateAvailableProperties. That satisfies the dependency, independent of UI code. In the UI, bind to languageChoice and cardPile. That makes the intent clear. The connection between those two properties and changes to availableWords is only visible in WordsManager, your UI doesn't need to know about it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to Bad CPU type in executable
did you build on your M3 machine and copy the app manually from it to the Intel machine? You have elected to build both architectures (for development), but if you just hit Build or Debug, you'll get the active architecture only. You need to Archive then select Distribute for Debugging, for example. Or, change the Build Active Architecture Only setting to 'no' and just copy your local build.
Topic: App & System Services SubTopic: Core OS Tags:
May ’24
Reply to How does one create a provisioning profile for embedded DEXT for iPhoneOS that is signed with a distribution cert?
what exactly does your distribution profile look like? And what does your entitlement claim? the message is saying that the contents don't match as expected. Follow the instructions here https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles to extract a readable copy of your profile and its signing certificate. Have you requested the USB DriverKit entitlement for your vendor ID from Apple? Confusingly, the entitlement (granted by Apple to your development team) and the entitlement (claimed by an app) both have the same name but are two different things. You can claim an entitlement in an entitlements plist. In many cases, Xcode will automatically generate a corresponding entitlement in the provisioning profile for your app and everything will Just Work. Managed entitlements, like com.apple.developer.driverkit.transport.usb, are special. For development, you can just claim the entitlement by putting any vendor ID into the plist entry. Xcode will match that to the "*" in the development provisioning profile. Such a profile is not valid for distribution. For distribution, the Team Owner needs to create a profile with the appropriate managed entitlements enabled. Mere Team Admin roles cannot do this, but the portal doesn't tell you that.
May ’24
Reply to How to make the app communicate with the camera extension?
the only documentation is in the header files CoreMediaIO/CMIOHardwareObject.h. You set up a listener proc with an array of property addresses you want to be notified about. You can use a block-based or straightforward function-based callback. In your callback function or block, you'll get a list of property addresses which have notified you, but no further information (such as the property values). All that the callback is telling you is "this property changed", you have to make a call into your extension to get the value of the property of properties you have been notified about.
May ’24
Reply to 5G LTE Modem
bDeviceClass = 0xef, which means "Miscellaneous". This isn't a standard communications device so the in-box drivers on macOS don't know what to do with it. It needs a driver from the vendor, Acer. Acer's web site does not claim macOS compatibility for this device, so I wouldn't hold your breath. Incidentally, this isn't an appropriate question for this forum, which is for questions relating to developing software for Apple platforms. End user support forums are elsewhere.
Topic: App & System Services SubTopic: Hardware Tags:
May ’24
Reply to How many project can we add in Xcode workspace
Even if Xcode can handle 400 projects in one workspace, do you really want to make and manage 400 projects? Even if you automate their creation, once created, each project is separate - if you make a change you would like to have in each project, you have to make that change 400 times. You could edit each project using a script, but that approach is horribly fragile. I would prefer a single project which makes a generic target, with additional Run Script build phases to the target which make the target's output customer-specific, perhaps based on an environment variable. You can set environment variables from the Run Scheme, so you don't have to drop into the command line to build for a new customer from Xcode. This should make adding a new customer reasonably painless, and avoid duplication.
May ’24
Reply to Details panel catching show/hide
attach .onAppear to the contents of your details, kinda like this minimal example struct ContentView: View { var body: some View { NavigationSplitView( sidebar: { Text("Sidebar") }, detail: { Text("detail") .onAppear { print("details appeared") } }) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to run command line tool with associated dylib
Thank you, Quinn for your in-depth steps. I tried steps 1 through 6 locally and they worked, so I had another look at the libraries I'd been given. The problem was, they had their quarantine flag set (because they emanated from a .zip file from my vendor). If I use Finder or cp to copy these files, the quarantine flag is preserved, but it seems to be removed if Xcode copies the files in a Copy Bundle Resources phase, which is why the tool linked and ran when it was inside a folder in an app bundle - nothing to do with the app bundle, rather a side effect of using Xcode to copy the files. Does the forum allow one to accept two answers to a problem?
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to run command line tool with associated dylib
Thank you for pointing out mergeable libraries, I didn't know about those. I already enabled the hardened runtime on the command line tool, and didn't check any of the boxes which relax it. I'm stumbling over the double negative in "make sure not to disable library validation" though. You said "this disables the Gatekeeper check...", but does "this" mean library validation or disabling library validation? I couldn't get the dylib to be used at all at runtime without packaging the tool and its dylib inside an app bundle - that's the part I find most inconvenient. The tool is used as a test harness for the library, which includes code that I would like to be able to debug.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to How to disable/disconnect ethernet adapter USB type using Network Framework API for Mac
I don't know what "bounces the interfaces" means. You seem to be saying "my USB to Ethernet adapter does not come up properly after the I use the networksetup or ifconfig commands to bring it down then back up again" have you tested whether similar commands produce the right response from the same hardware on another platform? This might be a problem with the off-brand hardware, rather than the commands provided by macOS.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to My SwiftUI code is becoming un-SwiftUI-y. I'm looking to make things right again.
You've got a property of your model which is complex to calculate (availableWords) and depends on two other properties (cardPile and languageChoice). That dependency has nothing to do with UI. You can make a custom setter for cardPile and languageChoice which calls updateAvailableProperties. That satisfies the dependency, independent of UI code. In the UI, bind to languageChoice and cardPile. That makes the intent clear. The connection between those two properties and changes to availableWords is only visible in WordsManager, your UI doesn't need to know about it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Bad CPU type in executable
did you build on your M3 machine and copy the app manually from it to the Intel machine? You have elected to build both architectures (for development), but if you just hit Build or Debug, you'll get the active architecture only. You need to Archive then select Distribute for Debugging, for example. Or, change the Build Active Architecture Only setting to 'no' and just copy your local build.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to How does one create a provisioning profile for embedded DEXT for iPhoneOS that is signed with a distribution cert?
what exactly does your distribution profile look like? And what does your entitlement claim? the message is saying that the contents don't match as expected. Follow the instructions here https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles to extract a readable copy of your profile and its signing certificate. Have you requested the USB DriverKit entitlement for your vendor ID from Apple? Confusingly, the entitlement (granted by Apple to your development team) and the entitlement (claimed by an app) both have the same name but are two different things. You can claim an entitlement in an entitlements plist. In many cases, Xcode will automatically generate a corresponding entitlement in the provisioning profile for your app and everything will Just Work. Managed entitlements, like com.apple.developer.driverkit.transport.usb, are special. For development, you can just claim the entitlement by putting any vendor ID into the plist entry. Xcode will match that to the "*" in the development provisioning profile. Such a profile is not valid for distribution. For distribution, the Team Owner needs to create a profile with the appropriate managed entitlements enabled. Mere Team Admin roles cannot do this, but the portal doesn't tell you that.
Replies
Boosts
Views
Activity
May ’24
Reply to How to make the app communicate with the camera extension?
the only documentation is in the header files CoreMediaIO/CMIOHardwareObject.h. You set up a listener proc with an array of property addresses you want to be notified about. You can use a block-based or straightforward function-based callback. In your callback function or block, you'll get a list of property addresses which have notified you, but no further information (such as the property values). All that the callback is telling you is "this property changed", you have to make a call into your extension to get the value of the property of properties you have been notified about.
Replies
Boosts
Views
Activity
May ’24
Reply to 5G LTE Modem
bDeviceClass = 0xef, which means "Miscellaneous". This isn't a standard communications device so the in-box drivers on macOS don't know what to do with it. It needs a driver from the vendor, Acer. Acer's web site does not claim macOS compatibility for this device, so I wouldn't hold your breath. Incidentally, this isn't an appropriate question for this forum, which is for questions relating to developing software for Apple platforms. End user support forums are elsewhere.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to How many project can we add in Xcode workspace
Even if Xcode can handle 400 projects in one workspace, do you really want to make and manage 400 projects? Even if you automate their creation, once created, each project is separate - if you make a change you would like to have in each project, you have to make that change 400 times. You could edit each project using a script, but that approach is horribly fragile. I would prefer a single project which makes a generic target, with additional Run Script build phases to the target which make the target's output customer-specific, perhaps based on an environment variable. You can set environment variables from the Run Scheme, so you don't have to drop into the command line to build for a new customer from Xcode. This should make adding a new customer reasonably painless, and avoid duplication.
Replies
Boosts
Views
Activity
May ’24
Reply to How to make the app communicate with the camera extension?
you can override connectClient and disconnectClient if you want to monitor connected clients. Make the number of connected clients a property of your extension. To communicate this asynchronously to your app, you can call notifyPropertiesChanged in your extension. In the app, install a notification handler using CMIOObjectAddPropertyListener.
Replies
Boosts
Views
Activity
May ’24
Reply to Details panel catching show/hide
attach .onAppear to the contents of your details, kinda like this minimal example struct ContentView: View { var body: some View { NavigationSplitView( sidebar: { Text("Sidebar") }, detail: { Text("detail") .onAppear { print("details appeared") } }) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24