-
Notifications
You must be signed in to change notification settings - Fork 347
Description
This file is extremely dangerous, as it does does not follow Apple's explicit guidance on prefixing in shared code, in particular the "Always Use a Prefix for Method Names in Categories on Framework Classes" section.
initWithInt: is an extremely generic name, and method names in Obj-C must be unique across the entire compiled application. This means that if any other plugin anywhere in the ecosystem has the same problem, there will be a collision and one of the implementations will be chosen arbitrarily at runtime if an application includes both plugins. If it doesn't do exactly the same thing that this one does, the result will be undefined behavior in whichever is calling the version that does not behave as expected.
This extension needs to follow the standard convention of being someuniqueprefix_initWithInt:. Also, that prefix should really not be flt, nor should the extension name (FLTNSStringExtension) use the FLT prefix, since FLT is used by the Flutter team, and so this name is also subject to collision with code this project does not control. The project should pick its own unique prefix, and use that for both the extension name and the method name.