I'm pretty sure there's no explicit way to block existing inits, in another module's types.
In this specific example (SF Symbols), though, you have other options which might be better anyway: SFSymbolsMacro.
If you need support for Swift prior to 5.9, then… there's at least SFSafeSymbols which doesn't solve your specific problem but saves you having to define enums for the symbols (plus it has all the appropriate @availability annotations so you can be sure you're not using symbols that don't exist on your target OS version(s)).
@young Are you doing it as a one-time job or want it to be permanent? I guess you might patch .swiftinterface files in your copy of SDK, fix all your code, and then restore the SDK (I never tried).
Though it would be a cool feature to force the compiler not to see certain declarations. It's a bit too much challenging for linters, but not so much for the compiler I think .
SFSymbolsMacro is . So it create an Image in validation to validate the string is a valid name. This is what I need. And I can use my init with the @SFSymbol macro on my enum Symbol.
You can use any text editor you like, it's just a regular text file with Swift code. Actual path to the swiftinterface file depends on your target (platform and architecture). For example SwiftUI module for macos arm64e is located in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/SwiftUI.framework/Versions/A/Modules/SwiftUI.swiftmodule/arm64e-apple-macos.swiftinterface.
You can comment out these inits: