In order to understand the error, you have to understand what the command is attempting to do.
In this case it's using Libtool
, which is a slightly altered version of libtool
. There are some options that are specified in the command line, but what we're looking for is the destination file, and this is passed in as the -o
option, who's argument is /Users/jr/ios/app/iCozi/build/DevOnly-iphonesimulator/libCozi Common Code.a
, and the type of library we're generating, and in this case it's -static
. Both options together explicitly state that you're making a static library archive.
Because you're making a static library archive, the only thing you're actually doing is taking .o
files and possibly .a
files and turning them into another .a
file. This can be roughly equated to the creating of a .zip
file from a set of files (.o
), and the contents of other .zip
files (.a
). There are very few things you can do while making this archive, for example you can't specify libraries that need to be implicitly linked while building a static archive, you can't specify that you're going to require entitlements.
libtool is complaining because it doesn't understand the options that are being used for a static library that are being passed in. In this case the options are:
-Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jr/ios/app/iCozi/build/iCozi.build/DevOnly-iphonesimulator/Cozi Common Code.build/Cozi Common Code.xcent
These are options that are present when you're trying to link in an entitlements file, which means that some options is specifying the use of an entitlements file. In this case, you found the correct solution yourself, which was to remove the entitlements file specified in the project settings
-> Code Signing
-> Code Signing Entitlements
-> DevOnly
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…