Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 无法将图像添加到Xcode中的图像按钮_Swift_Xcode_Macos_Imagebutton_Code Signing Certificate - Fatal编程技术网

Swift 无法将图像添加到Xcode中的图像按钮

Swift 无法将图像添加到Xcode中的图像按钮,swift,xcode,macos,imagebutton,code-signing-certificate,Swift,Xcode,Macos,Imagebutton,Code Signing Certificate,我是macOS应用程序开发的新手,我正在尝试将图像按钮添加到我的视图中,我想在文本后看到图像,所以我将图像按钮拖放到视图控制器并写入标题,然后在图像部分选择我的图像 但我的问题是,我是否会选择我的项目完美运行的系统映像,但我是否会通过单击“项目名称”>“将文件添加到”导入文件。。将png、jpg、jpeg文件导入到我的项目中并选择此图像Xcode会导致此错误 CodeSign build/Debug/test.app cd /Users/feora/Documents/apps/test

我是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

有点问题,但我找不到哪一个,这是因为在添加图像文件时,也添加了一些与该图像相关的查找器元数据。如果您搜索了至少得到一点的错误,您会找到类似的答案。

请具体说明您正在尝试执行的操作。你们到底在哪里被卡住了。嗨,Janu,非常感谢你们的回答:)我只想添加一个图像框,在我创建项目时能够看到这个图像。我可以建立项目没有任何错误的系统图片。但是,当我通过单击“项目名称>将文件添加到…”在桌面中添加外部图像时,我收到此错误。我不知道怎样才能更具体些。谢谢你,丹!:)我花了几个小时试图解决这个问题,但我以前找不到答案。我已经通过open terminal>go to app folder>paste这个代码“find.-type f-name'*.png'-exec xattr-c{}\;”解决了这个问题,谢谢你:)