Skip to content

Flutter app references private classes on iOS #124008

@aj-dt

Description

@aj-dt

Flutter apps reference private classes __UIVisualEffectBackdropView and __UIVisualEffectSubview on iOS.

Although this has so far not resulted in app rejections, it is a risk factor for anyone relying on the Flutter platform given Apple's notoriously opaque app submission process.

Steps to Reproduce

This is visible directly in the code, e.g. FlutterPlatformViews_Internal.mm:

UIView* view = visualEffectView.subviews[i];
if ([view isKindOfClass:NSClassFromString(@"_UIVisualEffectBackdropView")]) {
  ...
}

Or, if one unpacks a flutter-built ipa:

flutter create private_repro1
cd private_repro1
flutter build ipa --release
cd build/ios/ipa
unzip private_repro1.ipa
cd private_repro1
strings Frameworks/Flutter.framework/Flutter| grep UIVisualEffect

Expected results:

There would be no reference to private iOS classes

Actual results:

As of flutter 3.7.8 there are references to two private classes:

strings Frameworks/Flutter.framework/Flutter| grep UIVisualEffect
_UIVisualEffectBackdropView
_UIVisualEffectSubview
Code sample
Logs

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listengineflutter/engine related. See also e: labels.found in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions