Post

Replies

Boosts

Views

Activity

Reply to "App not responding" in the dock menu
Thanks for the response. On a different note, I have an application that is meant to be run as a daemon. What is it that the apple recommends on how to create the daemon application(in terms of creating the event loop)? From apple documentations, I understand that we should be using only daemon safe frameworks for creating a daemon application. According to it, we are not allowed to use Appkit( hence we cannot use the delegate implicit event loop). What is the alternative to it, how to create the event loop now?
Jul ’24
Reply to "App not responding" in the dock menu
It is a non-interactive bundled application but it can be run in both gui and non-gui context. In non-gui context(like ssh terminal), this is launched using daemons or using the unix executable in the bundle like .. cd MyApp.app/Content/MacOS ./MyApp In the gui context, the program can be launched by double clicking the bundled app or using 'open' command. If something is running in a non-GUI context then it’s not an app. For the above statement, If my application is capable of running in non-gui context, then what is it that the apple recommends doing. Should I be not creating a bundled application?
Jul ’24
Reply to Can we add an action to the 'Shortcuts' app in macOS using 'Intents extension'?
This is solved. I am now able to handle the intent in the shortcuts app using the 'Intents extension'. However, I have a observed something which is not in alignment with the apple documentation. This property which is specified in the .plist file for the intents extension is not available for macOS according to their documentation. However, it is observed that I m not able to handle the intents without using this property and it should be specified for macOS. Is this something being missed in the documentation?
May ’24
Reply to How to use mach Exception handling
To what end? My primary goal to performing exception handling is that when an exception occurs, I want to be able to perform proper finalization(like closing open file handles and ports etc.) for my application before the exception causes my application to terminate. Additionally, I want to show an alert box to the user informing him about the steps to take in case the exception can be recovered like providing a restart button If that could help. I want to be able to provide a better user experience.
Apr ’24
Reply to Type mismatch in SessionGetInfo() swift
I have tried this in an independent project and it works. However, I have figured out the reason why I m getting this error and wanted your help on how to resolve this. My project is using the new interop mechanism using the modulemap file. For this, I m setting the interoperability to c++ in the build setting. After changing the interoperability to C++, I m getting this error for the SessionGetinfo Api. Can you please check this? public static func GetSessionInfo () -> Void { var sessionID = SecuritySessionId() var sessionAttrs = SessionAttributeBits() let status = SessionGetInfo(callerSecuritySession, &sessionID, &sessionAttrs) //error:Cannot convert value of type 'UnsafeMutablePointer<SessionAttributeBits>' to expected argument type 'UnsafeMutablePointer<UInt32>' if status != errSessionSuccess { print("Could not get session info. Error \(status)") } } You can try this in your project.
Feb ’24
Reply to Cpp Compiler flags not accessible in the swift for Cpp-Swift Interop
I have reproduced this problem without cmake. Can you help now? I have an Xcode project containing a cpp target and a swift target. I am making direct swift to cpp call by exposing cpp to swift using the modulemap file. For the cpp target, I have defined some macros which I m using in the cpp header contained in the modulemap file. I m able to successfully build the cpp target. However, when I build the swift target I get an error message stating that the macros are not declared. When swift tries to import the cpp header via the clang module, it is not able to identify the cpp macros. I m setting the macros in the Compiler flags for the cpp file. You can see this in the image below. One of the macro(WINDOW_KERNEL) is defined with some value. error:Use of undeclared identifier 'WIN32' error:Use of undeclared identifier 'WINDOW_KERNEL'
Jan ’24
Reply to how to convert swift::string to char * in cpp
I have tried the below solution, but it seems to be unsafe as it is giving warning: // swift method that return UnsafeMutablePointer which gets casted to char * in cpp let x = mySwiftString.cString(using: .utf8) return UnsafeMutablePointer<CChar>(mutating: x) // warning at return : Initialization of 'UnsafeMutablePointer<CChar>' (aka 'UnsafeMutablePointer<Int8>') results in a dangling pointer
Oct ’23