With Swift, the programming language is no longer a difficult part of iOS programming. That difficulty now shifts to the iOS frameworks. Although very powerful, these frameworks take time to learn.
So why not allow iOS developers to easily and automatically share small code fragments with each other and have the compiler automatically use them to provide warnings as to how to code various tasks better?
Recommended rewrites by the compiler would only involve small code fragments seen from multiple independent sources and so are unlikely to contain any sensitive code.