Skip to content

fix: restore trustFall and platform API consistency - #365

Open
OskarEichler wants to merge 1 commit into
GantMan:masterfrom
OskarEichler:codex/platform-api-consistency
Open

fix: restore trustFall and platform API consistency#365
OskarEichler wants to merge 1 commit into
GantMan:masterfrom
OskarEichler:codex/platform-api-consistency

Conversation

@OskarEichler

Copy link
Copy Markdown

Fixes

  • Derive trustFall from isJailBroken OR canMockLocation when a legacy/native module does not supply it. The fallback previously returned false even when either underlying check was positive. Explicit native implementations/values remain preferred.
  • Implement the iOS selectors required by the TurboModule spec: trustFall, hookDetected, isOnExternalStorage, AdbEnabled, and isDevelopmentSettingsMode. The Android-only methods return the documented false / resolved false on iOS.
  • Return the documented empty jailbreak message on Android instead of the literal string "null".

Observable behavior corrections

No signatures or detection lists change. Consumers that relied on a false trustFall despite a positive root/mock check will now receive true. iOS calls to previously missing selectors return their documented values instead of failing. Android jailBrokenMessage changes from "null" to "".

Verification

  • Six previously failing fallback combinations corrected; all 16 boolean/function cases across legacy and TurboModule resolution pass. Explicit native overrides and the missing-link error remain intact.
  • Native Objective-C harness compiles the actual changed method bodies with controlled root/mock inputs: missing selectors go from five to zero; all four trustFall combinations and all Android-only defaults pass. This harness is not a real jailbreak test.
  • Type declaration check and git diff --check pass. RN 0.87.1 consumer verification of the combined API/Android fixes: both Android Debug flavors, both iOS simulator Debug schemes, and four release-mode Metro bundles pass. The changed Objective-C++ file is compiled in the app build. Existing dependency warnings remain; Xcode recovered from a cached bridging-header diagnostic and exited successfully.
  • No new or modified test files; the repository's npm test is a placeholder, not a passing test suite. No physical rooted/jailbroken device certification or old-architecture compatibility claim. Existing nested-root-result/old-architecture issues are tracked separately by fix: rootedDetectionMethods crashes on new arch due to nested HashMap cast #360, not duplicated here.

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.

1 participant