Post

Replies

Boosts

Views

Activity

Reply to NoSleep for Mac
You haven't said why you want to do this, but here are some suggestions System Preferences/Battery, set the machine to not sleep and not send the display to sleep 'man pmset' favorite search engine - "Caffeine macOS"
Topic: Safari & Web SubTopic: General Tags:
Oct ’22
Reply to macOS Shortcut stuck halfway
answering my own post here. It was something extremely simple - I hadn't actually implemented - (nullable id)application:(NSApplication *)application handlerForIntent:(INIntent *)intent in the app delegate. I had implemented something like it but spelled it wrong. I still don't know how an "App Intent" differs from an intent in a .intentdefinition file.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’22
Reply to Need Help
In Xcode, choose File/New... Project. From the template chooser, select macOS, Application, Command Line Tool. Click Next give it a name (maybe "hello") choose C++ from the language popup click Next choose where to save your project Xcode will open the project and it will have a starter main() routine. Xcode help is here https://developer.apple.com/documentation/xcode This will get you started. After that, this forum, and the Internet in general, is your friend. Most of the differences between Mac and Windows are in the application and system frameworks and APIs. But you'll face an uphill struggle with programming on the Mac if you insist on using C++, because most of the APIs are Objective C or Swift, and some of the new frameworks are Swift-only.
Oct ’22
Reply to Special camera application issue
well, that looks like a fun application! Aren't you just seeing normal lens vignetting here? The image plane of the original film camera was evenly illuminated by the original lens (film cameras can't compensate for lens vignetting). The adapter interposes elements between that image plane and the iPhone's lens, such that light falling on the periphery of the plane follows a much different path than light falling on the center of the plane. You can and should compensate for the difference in image brightness in software.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’22
Reply to DriverKit code signing/driver loading issues.
I also spent weeks battling signing issues. If you're using Xcode 14, you can simply select "Automatic" in the Signing and Capabilities tab. As it says in that tab, "Xcode will create and update profiles, app IDs and certificates". Choose "Development" for the signing certificate. Delete any app IDs or profiles you may have made manually on the developer portal for your app or its extension, and let Xcode do all the work for you. If you don't, Xcode will try to use the manually generated profiles and you'll get a message like "Xcode 14 and later requires a DriverKit development profile enabled for IOS and macOS. Visit the developer website to create or download a DriverKit profile". Automatic signing will let you develop and test on your own machine, or any other test machine entered on the portal under Devices. You asked "Does the Code Signing Identity/Profile in the Apple Developer section need to match exactly, or can that have more than what is requested? " If you look at the embedded profile that Xcode puts in your app, you'll see what it creates (for development). It looks at the entitlements you request, and puts those same entitlements in the profile. In my case I have a com.apple.developer.driverkit.transport.usb entitlement which specifies my company's USB vendor ID. The development embedded profile specifies "*" as the vendor ID, the distribution profile specifies my company's VID. When you come to distribute your app, Xcode can't create everything for you. The Account Owner has to go into the portal and create profiles for any extensions which require managed capabilities (entitlements which are only provided in response to a specific request to Apple). An Admin can create other types of profiles. If you are not the Account Owner the Generate button will fail to generate a profile, but it won't tell you why. In the distribution workflow, you choose the manually-generated profiles when you come to upload your product for notarization (not at build time). So you can keep the "Signing and Capabilities" setting in Xcode at Automatic.
Topic: App & System Services SubTopic: Drivers Tags:
Oct ’22
Reply to How To Shutdown M1 Mac From Keyboard
this isn't really a developer question, you would have more luck asking this on the support forums. You could get an external keyboard with a media eject key, then you can use the shortcuts listed here https://support.apple.com/en-us/HT201236. Or, hold down the Touch ID/power button until the machine shuts down. Or, just close the lid and let the Mac sleep. Unlike Intel Macs, M1 Macs keep their charge for quite a while in sleep.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’22
Reply to Where is my kext log(kernel log)
first question I have is "do you really need a driver"? If your device provides a service which is only useful to one application, a driver may be inappropriate or unnecessary, particularly if the interface is USB. In addition, kexts are being replaced by dexts, so even if you need a driver, that driver may not need to be in the kernel (or at least, not the parts that you write). I would advise you to use os_log(OS_LOG_DEFAULT, ) to begin with. To view the logs, use the Console app and filter on some unique string in your message (I like to use "XXXX"). This is primitive but there are less things to go wrong. You can also filter on "com.apple.driver.IOKitTest" to find all strings logged from your driver or about your driver. You can also use the command-line interface to the ASL (Apple System Log), log. It has a very long man page which refers to an even longer piece of documentation about how to build the predicates used for --predicate. It is so complicated I rarely use it. See https://developer.apple.com/documentation/os/logging/viewing_log_messages?language=objc
Topic: App & System Services SubTopic: Drivers Tags:
Oct ’22
Reply to DriverKit code signing/driver loading issues.
In Xcode, select the dext target, then under Signing, you should see a section labelled "DriverKit", with a Provisioning Profile: which you cannot modify, called "Xcode Managed Profile". If you click on the (i) here, does everything seem as you expect? You should see some capabilities, and some entitlements. Do they all have tick marks? Find your app in the Derived Data folder, and drill down to the dext, and look at its .embeddedprofile (QuickLook should open it for you, just use the space bar). Does it look correct? Follow the advice from Quinn here https://developer.apple.com/forums/thread/656490
Topic: App & System Services SubTopic: Drivers Tags:
Oct ’22
Reply to error build: Command Ld failed with a nonzero exit code
in Xcode, go to View/Navigators/Reports. (the navigator is the panel on the left, which can be closed. The Report navigator can also be chosen by the rightmost button at the top of this panel). Click the build log. On the right, the log will open. You'll see a Link stage near the end of the log. Select that stage, and a little icon will appear at the end of the line you have just highlighted. You can click that to expose the detailed link log.
Oct ’22
Reply to Tab View not working.
the code you have posted does not compile - ContentView5 and Tutorial are missing. The PreviewProvider is missing - usually this builds your ContentView, but for some reason you have a ContentView100. It would be easier to read your code if you posted inside a code block (see the little icons at the bottom of the Your Reply pane). Try again and maybe someone can help you out!
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’22
Reply to c++ formatting library fmt not working in Xcode 14.1
at the top of your file, change #include "fmt/core.h" to `#define FMT_HEADER_ONLY #include "fmt/format.h"` that worked for me. I found the magic ju-ju on Stackoverflow, if you search for "How to use fmt library in the header-only mode?" you should see the answer I found. If this forum allows direct links, it is here: https://stackoverflow.com/questions/66944554/how-to-use-fmt-library-in-the-header-only-mode
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’22