Post

Replies

Boosts

Views

Activity

Reply to Send mails in background via SMTP (macOS)
Hedwig is no solution for me. It is outdated and works not with Swift 5. Swift SMTP package is also useless for me because it does implement a special handling on macOS which does prevent the usage of self signed snakeoil certificates. I don't want to get an official certificate for my in-house server because the cert is just used for TLS-encryption, which works well on Linux or via postfix on macOS. So I have currently no solution for this problem.
Oct ’21
Reply to Xcode error on M1 Mac: Could not find module … for target 'x86_64-apple-macos'
I could solve this issue. As stated at https://forums.swift.org/t/xcode-12-2-spm-swift-nio-fails-to-build-for-apple-silicon-arm64/42197/22 I had the same issue & realized I was building for "My Mac", and not "Any Mac".. that fixed it & built the packages for both. (Top left of the center portion of the Xcode main screen.. where you pick your scheme) So building for "Any Mac (Apple Silicon, Intel)" works.
Dec ’21
Reply to lauchdaemon does not (always) work automatically?
StartCalendarInterval like this (for the other days the same): <key>StartCalendarInterval</key> <array> <dict> <key>Weekday</key> <integer>0</integer> <key>Hour</key> <integer>5</integer> <key>Minute</key> <integer>0</integer> </dict> Edit: The job is started properly but the log shows the errors above. I assume there is a networking issue in case no user is logged in (GUI or via ssh in Terminal).
Feb ’22
Reply to lauchdaemon does not (always) work automatically?
The networking stack on the Mac should work independently of whether a user is logged in. I think so, too but I have no clue why it works always when called manually vs. automatically. It looks like you’re using SwiftNIO for your networking. Are you use Network framework under the covers? That is, are you using NIO Transport Services? Yes. I use SwiftNIO 2.35.0 for my Mailer class which is based on SwiftSMTP. But even when there is a SwiftNIO issue the shell call using sshfs to mount a remote volume should work still work… I wonder if there is a security issue. The deamon process is called as admin user <key>UserName</key> <string>admin</string> <key>GroupName</key> <string>admin</string> and this works as expected. I checked this via ProcessInfo().userName debug output. Edit: AFAIK I don't use NIOTransportServices although the package is included in projects package list. A source search for NIOTransportServices gave no hit.
Feb ’22
Reply to lauchdaemon does not (always) work automatically?
Now I got it working. I use a check at start of my application with following code: if !NetworkCheck().waitForNetwork() {     print("Error: No network available!")     exit(exitCodes.NoNetwork.rawValue) } and this is my NetworkCheck class: import Foundation import Network class NetworkCheck {    private let networkMonitor : NWPathMonitor    init() {       self.networkMonitor = NWPathMonitor(requiredInterfaceType: .wiredEthernet)       self.networkMonitor.start(queue: .global())    }    func waitForNetwork(networkTimeout : Double = 30.0) -> Bool {        let networkLookupStart = Date.now        var isConected         = false        while abs(networkLookupStart.timeIntervalSinceNow) <= networkTimeout {            networkMonitor.pathUpdateHandler = { path in                if path.status == .satisfied {                    isConected = true                }            }            if isConected {                break            }            sleep(1)        }        return isConected    }    deinit {        networkMonitor.cancel()    } }
Feb ’22
Reply to How to use Process() with an argument containing a semicolon?
Thanks for your explanation. My assumption was obviously wrong. In fact the command mount_smbfs -onodev,nosuid "//DOMAIN;USER:PASS@SERVER_ADDRESS/REMOTEPATH" /SOMEPATH works well in shell. Note: The password needs a HTML like % encoding for funny chars, e.g. "my%23pass" for "my#pass". I use a similar call already with sshfs on a Linux server. Now I will perform some more debugging to get a clue what's wrong. I will post a reply with my discoveries.
Mar ’22
Reply to Can't run Swift App on Mojave
It is a Xib based project and so it should run on Mojave. Now I tried to set the target OS to macOS 10.13. It does still now work. The error message is now You can’t use this version of the application “APPNAME” with this version of macOS. You have macOS 10.14.6. The application requires macOS 10.13 or later.
Apr ’22
Reply to Can't run Swift App on Mojave
Now I made another test: New Xib-based Swift project (macOS, App). Set the build target to macOS 10.14. Build without any changes. Copy to a Mac running Mojave. Result: the same error message. It seems so that the support of older macOS versions is broken in current Xcode.
Apr ’22