I looked at Swift a few times ... I think not liking XCode is not helping ๐
Cool thing about Lazarus: cross platform development works great (most of the time).
OK, coming back to the real (other) issue;
So I grabbed you Swift code and that worked on both Intel and Arm - as expected.
Now comes the kicker, which makes me feel a little stupid, ... I ran my own code again and guess what ... it works without modification (did a full shutdown last night).
I don't know what to tell you ... I either goofed up (not impossible), or the reboot helped ...
Either way; I guess that solves that ... thanks Quinn!
Very much appreciate you chiming in ๐๐ป
Just for other non-Swift developers, add these imports to the beginning of Quinn's code.
Took me a second to realize this - thanks again Quinn! ๐
import Foundation
import NetFS
Post
Replies
Boosts
Views
Activity
Haha, that's funny - now you made me look for that T-Shirt ๐
Just kidding though. I do not dislike C ... I just liking Pascal better ๐
Thank you for replying!
To answer your questions:
Yes, this is an GUI app, started from Finder with double click (not a command line application).
Scheme used for testing: smb
Some additional testing on my end:
I took the effort this morning to write a tiny dedicated test application to test the NetFSMountURLSync parameter variations.
And all these variations work on the Intel Mac (macOS 12.6):
URL: smb://username:password@serverip/sharename
username null, password null, mount path null, kNAUIOptionNoUI enabled, kNetFSMountAtMountDirKey enabled
URL: smb://serverip/sharename
username set, password set, mount path null, kNAUIOptionNoUI enabled, kNetFSMountAtMountDirKey enabled
URL: smb://serverip/sharename
username set, password set, mount path /Users/username/mountpoint, kNAUIOptionNoUI enabled, kNetFSMountAtMountDirKey enabled
URL: smb://username:password@serverip/sharename
username null, password null, mount path /Users/username/mountpoint, kNAUIOptionNoUI enabled, kNetFSMountAtMountDirKey enabled
I tried all of these additionally with kNetFSMountAtMountDirKey disabled (mount options null), with open_options null, with kNAUIOptionForceUI instead kNAUIOptionNoUI and the possible combinations with these as well. All of these work on both my Intel Mac's (running 12.6, 2016 MBP and 2013 MacPro).
Testing this on the 16" MBP M1 Max (also running 12.6):
ALL tests fail and make the application freeze, both Intel binary and ARM64 (AARCH64) binary fail all tests.
Initially the GUI freezes, then promptly the beach ball appears (not entirely unexpected when using Sync instead of ASync), then the beachball even freezes frequently and the application is just "on hold" and any sign of live from the application stops (in Console) ...
For each test I get an error like the ones below (the number behind gNetAuthAuthAgentPort changes with each new test).
default 13:10:02.167473+0200 project1 GetNetAuthAuthAgentPort: Calling bootstrap_look_up3() for com.apple.netauth.user.auth; uid = 501, euid = 501
default 13:10:02.167576+0200 project1 GetNetAuthAuthAgentPort: gNetAuthAuthAgentPort = 51459