Facebook SDK links unwanted AdSupport, app rejected

TLDR: Adding the Facebook SDK to a fresh, empty Xcode project yields an executable that links to AdSupport. Q: Can I prevent this?

This happens without importing or using the SDK. The mere presence of the dependency (via SPM) in an otherwise empty app triggers the inclusion of AdSupport.framework in the executable, as confirmed by nm and otool.

The phrase "Facebook SDK does not require AdSupport.framework to be included." appears in lots of searches, but is never accompanied with an explanation of how to exclude the framework.

This is also a question for a Facebook forum, but I am posting it here as a question about build tools: Apart from downloading the SDK source and painstakingly commenting out the transitive closure of all references to AdSupport, ASIdentifierManager, and IDFA, are there any compile/link directives that could stop the inclusion of the forbidden fruit?

Since I posted, some people have experimented with commenting or ifdef-ing out parts of the Facebook SDK. The problem is how far to pursue the transitive closure of your edits.

Here is a link to a minimal set of diffs that worked for me. That is, the executable had no AdSupport or ASIdentifierManager references.

https://github.com/snorrsi/facebook-ios-sdk/commit/9d69d9ab0e510359311085def696c750c345037a

Facebook SDK links unwanted AdSupport, app rejected
 
 
Q