Generated xcarchive has no built dylib

I am in peril. Can anyone save me. I am desperate!

I am using Xcode Version 14.2 (14C18). I created a fresh new library project (plain C/C++) and added the well-known SQLite3.h and SQLite3.c.

When I build debug configuration, Xcode correctly produces dylib. But when I do archive build, the generated xcarchive is almost empty - it does not have expected libsqlite3s.dylib!

I even went back to Xcode 7.2.1 on macOS 10.10. Xcode 7.2.1 can correctly produce archived dylib and I can link the dylib with a test app.

I am extremely frustrated!

I submitted a tick in Apple's feedback center here and got a reply form Apple genius:

Change SKIP_INSTALL to NO. If it’s set to yes, then your library product isn’t copied into its install location, and thus doesn’t appear in the archive. Xcode 7.2.1 is a pretty old compare, it probably had bugs in the opposite direction.

I really don't understand this default setting. I want a dylib when I create a release archive, but with this default setting on, I don't get one. What's the point?

Actually I know the reason behind - Apples is forcing developers to upgrade to latest version. This is just one of many nag bugs deliberately planted into older version of Xcode.

Generated xcarchive has no built dylib
 
 
Q