How do you archive a dylib in Xcode?

Is there a correct way to archive a dynamic library in Xcode? When I try it, Xcode produces a "Generic Xcode Archive", and there is no option to notarize. The article TN3110: Resolving generic Xcode archive issue seems to be all about archiving an app.

Answered by DTS Engineer in 773581022

You archive a dynamic library using the standard process, so Product > Archive, but you’re correct that you can’t distribute a dynamic library from Xcode. Most of the time that doesn’t matter because you don’t need to sign and notarise a dynamic library. Rather, someone who uses your dynamic library in their product is expected to sign and notarise it as part of their distribution processing.

In some cases it is necessary to do this, for example, when you’re creating a plug-in for some other app. In such situations you must manually sign, package, and notarise your product. For advice on how to do that, see:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

You archive a dynamic library using the standard process, so Product > Archive, but you’re correct that you can’t distribute a dynamic library from Xcode. Most of the time that doesn’t matter because you don’t need to sign and notarise a dynamic library. Rather, someone who uses your dynamic library in their product is expected to sign and notarise it as part of their distribution processing.

In some cases it is necessary to do this, for example, when you’re creating a plug-in for some other app. In such situations you must manually sign, package, and notarise your product. For advice on how to do that, see:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How do you archive a dylib in Xcode?
 
 
Q