HI, I have Mac Sequoia Beta3. I installed Content Filer network extension which is same as https://developer.apple.com/documentation/networkextension/filtering_network_traffic in my machine.
When I try to connect a machine through "ssh", NEFilterFlow.description in handleNewFlow(_ flow: NEFilterFlow) is showing "sourceAppIdentifier" (process name) as "Terminal" instead of "ssh". But other Mac OS versions, it is showing as "ssh".
Is there any issue with Sequoia Beta3? or Is this expected?
Thanks
Post
Replies
Boosts
Views
Activity
Hi, I had a Content Filter network extension. It is successfully working until Sonoma. I try to install and activate same network extension on Sequoia beta Intel Mac. But even I haven't got any user consent to activate and allow it. I haven't found any entry in Network settings.
Do we need to make any changes in Sequoia MacOs to make it work?
Thank you.
HI, I have a app with Swift Programming language. It is built successfully on my Monterey Intel by using Xcode 14.
I am trying to built same app on Sonoma Silicon arm64 by using Xcode 15.4. But app is failing to build with below errors. Can anyone suggest reason for this?
Copy /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources/swift-nio__NIOFileSystem.bundle /Users/testuser/git/agent/out/Darwin/Release/swift-nio__NIOFileSystem.bundle (in target 'TESTFileProvider' from project 'TEST')
cd /Users/testuser/git/agent/dgagent/agent/macosx/dgc/TEST
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/testuser/git/agent/out/Darwin/Release/swift-nio__NIOFileSystem.bundle /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources
error: /Users/testuser/git/agent/out/Darwin/Release/swift-nio__NIOFileSystem.bundle: No such file or directory (in target 'TESTFileProvider' from project 'TEST')
Copy /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources/swift-nio_NIOPosix.bundle /Users/testuser/git/agent/out/Darwin/Release/swift-nio_NIOPosix.bundle (in target 'TESTFileProvider' from project 'TEST')
cd /Users/testuser/git/agent/dgagent/agent/macosx/dgc/TEST
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/testuser/git/agent/out/Darwin/Release/swift-nio_NIOPosix.bundle /Users/testuser/git/agent/out/Darwin/Release/TESTFileProvider.appex/Contents/Resources
error: /Users/testuser/git/agent/out/Darwin/Release/swift-nio_NIOPosix.bundle: No such file or directory (in target 'TESTFileProvider' from project 'TEST')
Currently I am using below network rule to read all traffic. But I want to skip to read particular port on localhost. What is NetworkRule to exclude reading from particular port on localhost?
let networkRule = NENetworkRule(remoteNetwork: nil,
remotePrefix: 0,
localNetwork: nil,
localPrefix: 0,
protocol: .any,
direction: .any)
Hi,
I have installed content filter network extension which is almost same as https://developer.apple.com/documentation/networkextension/filtering_network_traffic.
I have another app. As part of this app, I am sending messages from server process to client process by using unix domain sockets which is almost same as https://github.com/devlights/go-unix-domain-socket-example.
If network traffic is little bit more then my client is failing to send messages with write: no buffer space available error. If I stop content filter network extension then there is no issue.
How can I handle this type of error with network extension?
Note: This is happening on both monterey and ventura mac os (both intel and m1).
My customer installed two different apps on his Mac machine. These two apps are using ContentFilter extensions. One of the app is mine and another app is different vendor.
If my customer enabled both ContentFilter extensions then he fails to connect immediately to its required destination to allow it to run. If one of the ContentFilter extension is disabled then there is no issue.
Is it not possible to run two different ContentFilter extensions on same Mac machine? Is there any way to fix these type of issues?
Thank You
Nagendra R
Hi, I am using file provide extension to sync the app with remote storage. createItem() fileprovideer extension is calling when I copy a file and I able to sync properly with normal file and symlink files. itemTemplate.symlinkTargetPath helps me to sync symlink file.
But, I am facing the with alias file to sync. I tried to get original file name of alias file but I haven't found any option. How to get the original file name of alias file at createItem() of fileprovider extension. Is there any way to sync alias file?
My createItem() sample code at extension which sends the call to server through grpc.
public func createItem(
basedOn itemTemplate: NSFileProviderItem,
fields: NSFileProviderItemFields,
contents contentsUrl: URL?,
options: NSFileProviderCreateItemOptions = [],
request: NSFileProviderRequest,
progress: Progress
) async throws -> (NSFileProviderItem, NSFileProviderItemFields) {
var (templateAttributes, _) = self.load(fields: fields, from: itemTemplate)
templateAttributes.ownerAccountID = getuid();
templateAttributes.groupOwnerAccountID = getgid();
let identifier: NSFileProviderItemIdentifier
let attributes: FileProviderItemAttributes
if itemTemplate.contentType?.conforms(to: .directory) == true {
// Handle folder creation
.....
.....
} else if itemTemplate.contentType?.conforms(to: .symbolicLink) == true {
// Handle symlinks
guard let targetPath = itemTemplate.symlinkTargetPath else {
fatalError("couldn't get symlinkTargetPath on \(itemTemplate)")
}
....
....
}
else if itemTemplate.contentType?.conforms(to: .aliasFile) == true {
// TODO I am not yet handled this case. I need to get original path of alias file.
}
else {
// Handle file creation
....
....
}
let item = try FileSystemItem.any(filename: itemTemplate.filename,
identifier: identifier,
parentIdentifier: itemTemplate.parentItemIdentifier,
attributes: attributes)
return (item, [])
}
Hi, I have Content Filter Simple Firewall example from Apple site and modified as per my requirement and I able to compile & run with my developer id account.
As part of NE activation request, throwing the Allow/Don't Allow popup after allowing the NE from security preferences. When I went through the code I got to know that this popup is getting from filterManager.saveToPreferences as part of activation request. Attached the screen shot for reference.
How to suppress this allow/disallow popup? Please help me.
I able to create Universal Swift library with CMake+Xcode. But failed to create universal swift library with CMake+ninja.
Is there any way create universal swift library using CMake which is suitable for any build manager like Xcode and Ninja?
HI, I have a swift project and I want to compile it for both "x86_64" and "arm64" architectures on my Mac for both Xcode & Ninja.
My swift project was successfully compiled for both "x86_64" and "arm64" with Xcode.
But I am facing with multiple values for CMAKE_OSX_ARCHITECTURES not supported with Swift error in CMake while creating the swift project for Ninja.
Pls help to fix this fir Ninja.
HI, I have a swift project and I am calling few objective C APIs as part of my swift project. I am using bridge header for this.
I am creating swift project using CMake files. I able to create the swift project and compiling successfully for Xcode But I unable to compile successfully for Ninja.
I am using XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER to import bridge header file to the swift project in my CMake file like set_target_properties(ADE PROPERTIES FRAMEWORK TRUE XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER ADE-Bridging-Header.h). But I failed to import successfully for Ninja.
Is there any way to import Bridge header file through CMake for both Xcode and Ninja?
HI,
I want to know whether my extension is in active state or not as part of my swift application.
It would get this on terminal usingsystemextensionsctl list | grep FilterExtension | grep activated command. It can be possible with system() on C++ as system("systemextensionsctl list | grep FilterExtension | grep activated")
But how can I achieve this in swift language?
Help me.
Thanks.
HI,
I am using Content Filter simple firewall Network Extension (NE). I have couple of doubts about NE deactivation. Please clarify.
Is it possible to deactivate the NE without user consent?
If not possible without user consent, why we need to authorise even for deactivate? Is it restricted by Apple?
Please clarify.
Hi,
I want to activate/deactivate network extension on Mac without any user consent (I want allow network extension activation/deactivation on Mac by default) and Mac is under un-managed environment (Not managed by MDM tools).
Is there any way to activate/deactivate network extension in unmanaged environment without use. consent.
Thanks.
Hi, I am new to Swift language.
In my C++ application, I able to convert 'void *' to 'int * 'as below. Here, 'request' type is 'void *' type.
int *ret = request;
I am trying to do same thing in Swift also. Here 'request' type is 'UnsafeMutableRawPointer' But I am facing with error
"Cannot convert value of type 'UnsafeMutableRawPointer' to specified type 'UnsafeMutablePointer<Int32>'" let ret: UnsafeMutablePointer<Int32> = request
Any one please help to convert from UnsafeMutableRawPointer type to UnsafeMutablePointer<Int32>.