【发布时间】:2023-03-28 18:26:01
【问题描述】:
我是 macOS 应用程序开发的新手,我正在尝试将图像按钮添加到我的视图中,并且我想在文本之后看到图像,所以我将图像按钮拖放到视图控制器并编写标题,然后,在图像部分,我选择我的图像。
但我的问题是,如果我将选择系统图像,我的项目可以完美运行,但如果我将通过单击项目名称 > 将文件添加到.. 并将 png、jpg、jpeg 文件导入我的项目并选择此图像来导入文件Xcode 给了我这个错误;
CodeSign build/Debug/test.app
cd /Users/feora/Documents/apps/test
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --entitlements /Users/feora/Documents/apps/test/build/test.build/Debug/test.build/test.app.xcent --timestamp=none /Users/feora/Documents/apps/test/build/Debug/test.app
/Users/feora/Documents/apps/test/build/Debug/test.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1
this page 有问题,但我找不到哪个
【问题讨论】:
-
请具体说明您要做什么。你到底在哪里卡住了。
-
您好 Janu,非常感谢您的回答 :) 我只想添加图像框并在构建项目时能够看到此图像。我可以使用系统图片构建项目而不会出现任何错误。但是,当我通过单击“项目名称> 将文件添加到..”在桌面中添加外部图像时,我收到此错误。我不知道如何才能更具体。
标签: swift xcode macos imagebutton code-signing-certificate