简体   繁体   中英

Unable to add images to image button in Xcode

I'm new for macOS app development I'm trying to add image button to my view and I wanna see image after the text, so I'm dragging & dropping image button to view controller and writing title and after that, in image section I choose my image.

But my issue is if I will choose the system images my project works perfectly but if I will import a file by clicking project name > add files to.. and importing png, jpg,jpeg file to my project and choosing this image Xcode gives me this error;

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

Something is wrong with this page but I can't find which one

That's because when you're add image file you're also adding some Finder metadata related to that image. If you've searched error you're getting at least a little bit, you'd have found answers like this .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM