Skip to content

fix: keep unsupported platform validation extensible - #248

Merged
tompsota merged 1 commit into
talsec:masterfrom
ClosedHarmony:fix/platform-validation
Nov 25, 2026
Merged

tompsota merged 1 commit into
talsec:masterfrom
ClosedHarmony:fix/platform-validation

Conversation

@HsukqiLee

Copy link
Copy Markdown
Contributor

An application can import freeRASP while disabling its native integration on unsupported platforms. However, _checkConfig currently exhaustively switches over Flutter's stock TargetPlatform enum, so compiling that application with OpenHarmony Flutter fails because the enum also contains TargetPlatform.ohos.

Validate the two supported configurations directly and reject every other platform with the existing UnsupportedPlatformException. This preserves Android/iOS validation and avoids referencing fork-specific enum values.

Validation: all 21 tests in test/src/talsec_test.dart pass, and dart analyze lib/src/talsec.dart reports no issues.

@tompsota

Copy link
Copy Markdown
Member

Thanks!

@tompsota
tompsota merged commit 49f23d0 into talsec:master Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants