Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS and tvOS 15 support #180

Closed
12 tasks done
defagos opened this issue Jun 15, 2021 · 7 comments
Closed
12 tasks done

iOS and tvOS 15 support #180

defagos opened this issue Jun 15, 2021 · 7 comments
Labels
improvement Feature or update (issue and PR) - release notes section

Comments

@defagos
Copy link
Member

defagos commented Jun 15, 2021

Here is the list of the issues found with the current betas:

  • Accessibility via VoiceOver does not work at all on tvOS for SwiftUI views. (ℹ️: We reported this issue to Apple. Not fixed in the RC 😭)

  • On tvOS the tab bar custom font is initially incorrect (fixed after focusing a tab). This was working fine on tvOS 14. (✅: Works fine when compiled with the tvOS 15 SDK and run on tvOS 15).

  • Compilation of Letterbox does not work, see iOS / tvOS 15 compatibility srgletterbox-apple#249 (✅: Works with Xcode 13b5).

  • SwiftMessages does not compile (Xcode 13 issue - Enum cases with associated values cannot be marked potentially unavailable with '@available'  SwiftKickMobile/SwiftMessages#471) (✅: Use 9.0.4 pre-release branch).

  • For binaries compiled with the tvOS 14 SDK (thus with the old tvOS player experience), opening and closing the info panel, then exiting the player, keeps the player playing sound in the background for ~30 s. This is not related to an SRG Media Player or Letterbox timer, but probably to an AVKit internal timer. The issue namely does not occur when running on a tvOS 14 device, and if we compile the same app with the tvOS 15 SDK to run it on a tvOS 15 device. But we should at least check that this stays the same with the tvOS 15 RC.

  • The navigation bar is broken on iOS (radio tab, song panel) (✅: Fixed with modern navigation bar API, see Move to iOS 13 navigation bar appearance API? #151)

  • The legacy Show A-Z view crashes (✅: This view has been replaced).

  • The tab bar blur sometimes breaks (e.g. when pushing the TV guide view). iOS 15 hides the blur when there is no content behind (can be tested with a few favorites, not filling the screen; when at rest there is no blur, but if we move a few cells in the vicinity of the tab bar the blur appears; can also be tested with the App Store app). We need to update our code to take into account this new behavior. (✅: Fixed with proper use of the appearance API, as this is an expected change; the new iOS 15 look & feel at scroll edge has not been adopted for the time being, though).

  • When returning back after tapping on a focused item, the item stays focused. Our companion text animates, which now produces a weird result (ℹ️: We cannot do much, focus state is communicated in the same way by the system as before, its is only images in buttons that behave differently)

  • Assertion failure on the program guide when attempting to scroll to a location outside the visible range, e.g. 5 PM. As a result the table jumps, something not visible with a nightly built with iOS 14 and run on 15. Probably related to the new cell prefetch mechanism. The relevant error is:

    *** Assertion failure in -[UICollectionView _validateScrollingTargetIndexPath:], UICollectionView.m:6485
    2021-08-20 17:32:02.174290+0200 Play RTS[1093:151623] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempted to scroll the collection view to an out-of-bounds item (25) when there are only 0 items in section 0. Collection view: <UICollectionView: 0x1072d0000; frame = (10 0; 355 423); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x283f6ce40>; layer = <CALayer: 0x283461f60>; contentOffset: {0, 0}; contentSize: {355, 3}; adjustedContentInset: {0, 0, 55, 0}; layout: <UICollectionViewCompositionalLayout: 0x104eccd80>; dataSource: <_TtGC5UIKit34UICollectionViewDiffableDataSourceOC7PlaySRG26ProgramGuideDailyViewModel7SectionCSo10SRGProgram_: 0x2831663d0>>.'
    

Also see SRGSSR/srgmediaplayer-apple#104 and SRGSSR/srgletterbox-apple#249 (✅: Fixed)

We should also use new APIs available since iOS and tvOS 15:

  • Blurred views which should eliminate header background animation glitches (✅: Implemented)
  • Livestream metadata in tvOS 15 control center (ℹ️: Does not seem to work in the RC; we will keep our live label for the time being)
@defagos defagos added the improvement Feature or update (issue and PR) - release notes section label Jul 15, 2021
@defagos
Copy link
Member Author

defagos commented Jul 30, 2021

We should also check whether cell prefetching does not collide with our (small) usage of visible cells.

@defagos
Copy link
Member Author

defagos commented Aug 3, 2021

Compilation issues with SPM are a documented change and we probably have to do something, as said in the Xcode 13 beta release notes:

Linking Swift packages from application extension targets or watchOS applications no longer emits unresolvable warnings about linking to libraries not safe for use in application extensions. This means that code referencing APIs annotated as unavailable for use in app extensions must now themselves be annotated as unavailable for use in application extensions, in order to allow that code to be used in both apps and app extensions. (66928265)

Airship delivered version 14.6.0 to fix this issue.

@defagos defagos changed the title iOS and tvOS 15 issues iOS and tvOS 15 support Aug 16, 2021
@defagos
Copy link
Member Author

defagos commented Aug 19, 2021

Work started on feature/ios15-tvos15-xcode13. The project now compiles with beta 5. 🎉

@defagos defagos added this to the iOS/3.3.1 - tvOS/1.3.3 milestone Aug 20, 2021
@defagos
Copy link
Member Author

defagos commented Aug 20, 2021

The navigation bar issue is likely due to the use of tricks. I remember Marco Arment talking about such issues with Overcast on iOS 15. Fortunately migration to the iOS 13 API fixes the issue, and we already did it on a feature branch (#151). I'll cherry-pick this implementation on the branch associated with the present issue.

@defagos
Copy link
Member Author

defagos commented Oct 1, 2021

We did everything we could, reported remaining issues to Apple, and identified other behaviors as part of OS changes which we must accept.

@defagos defagos closed this as completed Oct 1, 2021
@hansemannn
Copy link

Hi @defagos, sorry to slide into this issue! But may you still know how you fixed the "Attempted to scroll the collection view to an out-of-bounds item" error? It seems to happen randomly in one of my test projects and the cell structure looks fine. Thanks in advance!

@defagos
Copy link
Member Author

defagos commented Jan 4, 2022

Hi @hansemannn. Sure, I do remember. We use a small Objective-C method wrapper to trap the exception that may be thrown by the scrolling method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Feature or update (issue and PR) - release notes section
Projects
None yet
Development

No branches or pull requests

2 participants