Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to check "Copy items if needed" for embedded binaries?

Tags:

xcode

ios

enter image description hereWhen I tried to put a third-party framework(installed by carthage) in the embedded binaries, I got such an option. I got confused, since "Embedded binaries are binary files that are copied to your application bundle when you build the project", It is already a copy instead of a link, why do I want a copy of a copy?

like image 641
den330 Avatar asked Jul 17 '16 19:07

den330


2 Answers

"Copy items if needed" has nothing to do with the building of your app. It means copied into the project folder, right now (if it isn't in the project folder already). I suggest you always say yes, because otherwise your project might end up depending upon stuff that isn't in the project folder, and which you might therefore throw away or rename by accident, thus causing your project to break.

like image 110
matt Avatar answered Sep 20 '22 08:09

matt


Like matt has said, I recommend you always leave it selected as well. I have had troubles uploading the app, even though I know I have not moved or renamed the file. Also an extra benefit of leaving it enabled is that it makes it easier to share the project with others without having to track down the files not in the project folder.

I can see two cases why leaving it off might be convenient:

  1. You have multiple projects which share the same file and want to reduce space,
  2. You desperately need to save the space on your computer, in which case I would buy extra storage for your computer.

Edit: Even though you copied the file in, XCode treats it as a link to the file, this is why you are seeing this message.

like image 31
JordanWx Avatar answered Sep 19 '22 08:09

JordanWx