复制/粘贴在 M1 Macbook Pro 的 XCode 13 模拟器中不起作用
复制/粘贴在带有 M1 Macbook Pro 模拟器的 Xcode 13 上不起作用。它可以在普通的 Mac PC 上运行。
Copy/Paste not working on Xcode 13 with M1 Macbook Pro simulators. It was working on a normal Mac PC.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在等待 Apple 的修复过程中,我设法创建了一个自定义 MacOS 快捷方式来处理模拟器上的复制/粘贴。
以下是使其发挥作用的步骤:
通常它应该可以工作。我同意击键有点慢,但没有找到任何其他方法使其正常工作。
点击 Siri 操作。它可能会失败
以下是启用它的步骤:
Waiting a fix from Apple I managed to create a custom MacOS Shortcut to handle this copy/paste on Simulators.
Here are the steps to make it work:
Normally it should works. The keystroke is a bit slowly I agree but didn't find any other way to make it work properly.
Tap on the siri action. It could fail
Here are steps to enable it:
不幸的是,对于很多使用 Xcode 12、13 的人来说,这是一个反复出现的问题 - 频率较低,但从 Xcode 14 开始似乎仍然存在。
有三种可能的解决方法:
Share
/Simulator
。这将在您选择的模拟器中打开 URL。文件
应用中打开文本文件来复制并粘贴任何数据。This is unfortunately a recurring issue for a lot of people on Xcode 12, 13 - less frequently, but still seems to be around as of Xcode 14.
There are three possible workarounds:
Share
/Simulator
from the context menu. This will open the URL in the Simulator you choose.Files
app.这是 M1 MacBook 的问题,Pasteboard 在最新的芯片和最新的模拟器中也存在这个问题。
截至目前,苹果还没有对此进行任何更新。因此,我们可以尝试其他方法
示例: - 确保在您的包中添加
yourfile.txt
。这里的文本字段数据将来自您的捆绑包文件。如果您不想在捆绑包中添加文件,甚至也可以使用文档目录中的文件。This is the issue with M1 MacBooks, Pasteboard is having this issue in latest chip and latest simulators.
As of now, no updates from apple for this. So we can try alternative something
EXAMPLE: - Make sure to add
yourfile.txt
in your bundle. and here in textfield data will come from the file of your bundle. Even you can use file from document directory as well if you don't want to add file in bundle.如果是链接,您可以直接将其从桌面 Chrome / Safari 地址栏拖到正在运行的模拟器窗口中,它将弹出移动 Safari 并打开该链接。
苹果已经禁用了证书拖放和文本复制粘贴,但我们的开发人员不能因为这种破坏可用性的可怜尝试而推迟! /秒
If it's a link, you can drag it directly from desktop Chrome / Safari address bar into your running Simulator window, it will pop up mobile Safari and open the link.
Apple has disabled certificates drag'n'drop and text copy-paste, but us devs cannot be deferred by such pity attempts to ruin usability! /s