Hi,
I would like to be able to replace at compile time a API call (4ex: downloadTask(with: URL) -> URLSessionDownloadTask from URLSession) with one of my own with the same signature.
Basically some sort of instrumentation.
I've considered AST parsing but I find this solution a bit unreliable.
My other two possibilities would be Swift SIL and LLVM IR. However I lack the high level overview to decide what would be the best approach in this case, and google doesn't help also.
So given the available tooling and the need to be able to integrate the solution in a normal Xcode workflow, what would be the best approach?