Skip to content

Fix/pencil interaction attachment#3

Open
AlexanderThiele wants to merge 2 commits into
Code-Growers:mainfrom
AlexanderThiele:fix/pencil-interaction-attachment
Open

Fix/pencil interaction attachment#3
AlexanderThiele wants to merge 2 commits into
Code-Growers:mainfrom
AlexanderThiele:fix/pencil-interaction-attachment

Conversation

@AlexanderThiele
Copy link
Copy Markdown
Contributor

Hey,

The current implementation doesnt work with latest iOS and flutter 3.41.4:

The error is:

Root view controller is nil.

fixed it with this PR.

alexanderthiele and others added 2 commits June 7, 2026 12:56
Adopts the current Flutter iOS template (implicit engine + scene lifecycle in AppDelegate) and regenerates the associated tooling files (Podfile, lockfiles, scheme, plists).
The UIPencilInteraction was added during plugin registration, before any window was key, so findRootViewController() returned nil and no tap/squeeze events were ever delivered. Attach it event-driven via UIWindow.didBecomeKeyNotification instead, guarded by a static flag so it attaches exactly once. Applied to both the CocoaPods and Swift Package Manager sources.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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