从本地网络上通过快速操作在本地网络上访问MacOSSequoIA

问题描述 投票:0回答:0
i我检查程序是否通过从终端应用程序运行或运行自动仪中的工作流程来按预期工作。没有问题。它仅在快速动作上下文中发生。 为了避免库的潜在问题,我修改了程序以打开与数据库的套接字连接。问题是相同的,只有在快速行动中: “没有通往主机的路线192.168.xxx.yyy:3306”

I使用Apple Dev证书签署了该应用程序(我在XCode上使用的Swift应用程序相同),并添加了以下权利(也许太允许):

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.network.server</key> <true/> <key>com.apple.security.network.host</key> <string>192.168.XXX.YYY</string> <key>com.apple.security.automation.apple-events</key> <true/> <key>com.apple.security.cs.allow-jit</key> <true/> <key>com.apple.security.cs.allow-unsigned-executable-memory</key> <true/> <key>com.apple.security.cs.disable-library-validation</key> <true/> <key>com.apple.security.get-task-allow</key> <true/> </dict> </plist>

但仍然行不通。

编码测试连接:

try { var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); socket.Connect("192.168.XXX.YYY", 3306); // Log success } catch (Exception ex) { // Log Error }

.NET版本:8.0
MacOS版本:15.2(24C101)

任何建议?

ok,我不得不履行签名该应用程序。 info.plist未正确添加到包装中。
一旦包裹的格式化并签名,我的应用程序就可以连接到远程网络。当然,我必须允许通过对话框进行本地网络访问,该对话框在快速动作的第一次运行中弹出
    

c# automator macos-sequoia
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.