We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4661 - iOS [UIViewController setNeedsUpdateOfHomeIndicatorAutoHidden] needs delay
Summary: iOS [UIViewController setNeedsUpdateOfHomeIndicatorAutoHidden] needs delay
Status: RESOLVED DUPLICATE of bug 4658
Alias: None
Product: SDL
Classification: Unclassified
Component: thread (show other bugs)
Version: HG 2.1
Hardware: iPhone/iPod touch iOS (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-09 12:58 UTC by Dominik Reichardt
Modified: 2019-06-09 13:07 UTC (History)
0 users

See Also:


Attachments
test patch for fireworks demo (706 bytes, patch)
2019-06-09 12:58 UTC, Dominik Reichardt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Reichardt 2019-06-09 12:58:25 UTC
Created attachment 3809 [details]
test patch for fireworks demo

For some iOS apps it seems that a delay is needed for the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to work.
A quick test patch is attached for the Fireworks iOS Demo. It has a delay callback and the hint is set to hide the HomeIndicator until you touch the screen. And that works with the added delay.
Also the hint is added but commented to quickly test and see that it isn't working without the delay.
This is with lock stock iOS 12 SDK.

As for iOS 13 SDK:
We've been doing this [callback delay] in Exult for iOS but when I took the beta SDK of iOS 13 for a quick spin this crashed in [UIViewController setNeedsUpdateOfHomeIndicatorAutoHidden]
That's SDL_uiviewcontroller.m:60
if (@available(iOS 11.0, *)) {
            [viewcontroller setNeedsUpdateOfHomeIndicatorAutoHidden];
            [viewcontroller setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
        }

The debug information informed me that "-[UIViewController setNeedsUpdateOfHomeIndicatorAutoHidden] must be used from main thread only".
So this workaround delay isn't safe to use in the future it seems.

Probably not important enough to be a 2.0.10 blocker. OTOH iOS 13 is likely to drop before SDL 2.0.11
Comment 1 Dominik Reichardt 2019-06-09 12:59:26 UTC
The delay is to wait for root SDL_uikitviewcontroller to be shown
Comment 2 Dominik Reichardt 2019-06-09 13:07:50 UTC
Just now found patch/bug #4658 which makes this bug report unnecessary.

*** This bug has been marked as a duplicate of bug 4658 ***