-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjC code should not use "FLT" prefix #9
Comments
@stuartmorgan alrighty, where can I remove that? |
You'll need to register your own Dart implementation of the platform interface (similar to this one), switch to your own Pigeon definition that doesn't use "FLT" as a prefix, and rename the main ObjC plugin class. |
@stuartmorgan it's holiday in Europe now, so we will be away until mid-august. If you need it changed more urgently because Flutter is finally introducing videos let me know. |
Renames all classes and stand-alone functions to use the `FVP` prefix instead of `FLT`. Because ollyde/flutter_macos_video_player#9 was never fixed, there are projects in the wild using macOS classes with all of the same names as our classes, but with different implementation/behavior. If we add macOS support to the plugin as-is, developers using that package will end up with two copies of classes with the same name, which has undefined behavior at runtime in Obj-C (and in this case would very likely result in exceptions and/or crashes). While a third-party should never have published code using the Flutter team's code prefixes, since we wanted to change prefixes anyway we can do so before adding macOS support and just avoid the issue entirely. Since this involved regenerating Pigeon anyway, this also includes a Pigeon update. Part of flutter/flutter#102601
Renames all classes and stand-alone functions to use the `FVP` prefix instead of `FLT`. Because ollyde/flutter_macos_video_player#9 was never fixed, there are projects in the wild using macOS classes with all of the same names as our classes, but with different implementation/behavior. If we add macOS support to the plugin as-is, developers using that package will end up with two copies of classes with the same name, which has undefined behavior at runtime in Obj-C (and in this case would very likely result in exceptions and/or crashes). While a third-party should never have published code using the Flutter team's code prefixes, since we wanted to change prefixes anyway we can do so before adding macOS support and just avoid the issue entirely. Since this involved regenerating Pigeon anyway, this also includes a Pigeon update. Part of flutter/flutter#102601
Renames all classes and stand-alone functions to use the `FVP` prefix instead of `FLT`. Because ollyde/flutter_macos_video_player#9 was never fixed, there are projects in the wild using macOS classes with all of the same names as our classes, but with different implementation/behavior. If we add macOS support to the plugin as-is, developers using that package will end up with two copies of classes with the same name, which has undefined behavior at runtime in Obj-C (and in this case would very likely result in exceptions and/or crashes). While a third-party should never have published code using the Flutter team's code prefixes, since we wanted to change prefixes anyway we can do so before adding macOS support and just avoid the issue entirely. Since this involved regenerating Pigeon anyway, this also includes a Pigeon update. Part of flutter/flutter#102601
The FLT prefix is the prefix used by code written and published by the Flutter project. Your code should use its own prefix, per Apple's naming conventions, to prevent collisions with Flutter code (which would cause undefined behavior at runtime).
The text was updated successfully, but these errors were encountered: