Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
* @warning This class is a work-in-progress and may change.
* @see https://github.com/flutter/flutter/issues/72009
*/
FLUTTER_EXPORT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we add __attribute__((visibility("default"))) to classes in our public headers? I wouldn't have thought that would be necessary but I don't know the history of this, is FLUTTER_EXPORT defined to something else in some cases?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, that's what it's defined as. When we compile the library we have the default visibility set to private, it's a linker flag. The reason for it is mostly around c++ code. By being more restrictive on what symbols are public different optimizations can happen in the loader, on top of having a little bit more control over how people use your API.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have the default visibility set to private

Ah, gotcha.

@interface FlutterEngineGroup : NSObject
- (instancetype)init NS_UNAVAILABLE;

Expand Down