Skip to content

[Feature][iOS] Add per-container orientation policy - #124

Open
Huxpro wants to merge 1 commit into
tiktok:huxcx/fix-interactive-pop-restorefrom
Huxpro:agent/ios-container-orientation
Open

[Feature][iOS] Add per-container orientation policy#124
Huxpro wants to merge 1 commit into
tiktok:huxcx/fix-interactive-pop-restorefrom
Huxpro:agent/ios-container-orientation

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an Objective-C-compatible per-container system / portrait / landscape policy to SPKContext
  • preserve the policy through context copy and merge
  • apply explicit policies through public UIKit scene geometry APIs
  • forward the top Sparkling container policy through ordinary UINavigationController hosts
  • add focused policy, copy/merge, scheduling, and navigation forwarding tests

Stack

Test Plan

  • scripts/coverage-ios.sh on iOS 26.5 Simulator: 331 tests in 20 suites passed
  • iOS 26.2 Simulator EABC0BC7-12FE-4940-969C-FF3D6B9135F5: landscape cold launch completed a portrait -> landscapeRight scene transaction; portrait control launch remained portrait with no landscape transition
  • git diff --check

Summary of change:
- Add an Objective-C-compatible system, portrait, and landscape policy to
  SPKContext and preserve it through context copy and merge.
- Report and apply the configured policy with public UIKit scene geometry APIs.
- Forward the top Sparkling container's orientation through its navigation
  controller so ordinary UINavigationController hosts rotate correctly.
- Add focused policy, copy, merge, scheduling, and navigation forwarding tests
  plus a debug-only playground launch hook.

TEST: scripts/coverage-ios.sh on iOS 26.5 Simulator; 331 tests in 20 suites passed
TEST: iOS 26.2 Simulator EABC0BC7-12FE-4940-969C-FF3D6B9135F5; a landscape cold launch completed the portrait-to-landscapeRight scene transaction, and a portrait control launch remained portrait without a landscape transition
TEST: git diff --check

Co-authored-by: TRAE CLI <noreply@bytedance.com>
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