Skip to content

tvOS: stop calling application:handleOpenURL: (unavailable) - #8648

Merged
danoli3 merged 1 commit into
openframeworks:masterfrom
danoli3:tvos-handleopenurl-unavailable
Nov 5, 2026
Merged

danoli3 merged 1 commit into
openframeworks:masterfrom
danoli3:tvos-handleopenurl-unavailable

Conversation

@danoli3

@danoli3 danoli3 commented Nov 5, 2026

Copy link
Copy Markdown
Member

Fixes the tvOS CI failure on master that shows up on PRs such as #8646:

https://github.com/openframeworks/openFrameworks/actions/runs/41813746398/job/126999288647

ofAppiOSWindow.mm:93:17: error: 'application:handleOpenURL:' is unavailable: not available on tvOS
        [appDelegate application:[UIApplication sharedApplication] handleOpenURL:context.URL];

Cause

#8643 added ofxiOSSceneDelegate so iOS / tvOS 27 apps adopt the UIScene lifecycle. It forwards scene:openURLContexts: to the app delegate.

UIApplicationDelegate's application:handleOpenURL: is API_UNAVAILABLE(tvos). iOS still has it (deprecated); tvOS 27 treats a call as an error.

The first commit of #8643 already wrapped that fallback in #if !TARGET_OS_TV. The squash also included a later commit that dropped the guard.

Fix

  • Restore #if !TARGET_OS_TV around the handleOpenURL: fallback in ofAppiOSWindow.mm.
  • Implement application:openURL:options: on ofxtvOSAppDelegate (available on tvOS) so opened URLs still reach ofxiOSAlerts.launchedWithURL.

iOS is unchanged: it still uses openURL:options: when present, otherwise handleOpenURL:.

openframeworks#8643's ofxiOSSceneDelegate forwards opened URLs to the app delegate.
application:handleOpenURL: is API_UNAVAILABLE(tvos), so tvOS+OFLib
fails on Xcode 27:

  ofAppiOSWindow.mm:93: error: 'application:handleOpenURL:' is unavailable

The first commit of openframeworks#8643 already skipped that selector with
#if !TARGET_OS_TV; a later commit in the squash dropped the guard.

Restore the guard and implement application:openURL:options: on
ofxtvOSAppDelegate so the scene path still delivers URLs on tvOS.
@danoli3

danoli3 commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Stacked follow-up: #8649 (scene:openURLContexts: on iOS / tvOS). Merge this PR first.

@danoli3
danoli3 merged commit f95a92a into openframeworks:master Nov 5, 2026
58 checks passed
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