Skip to content

Commit

Permalink
Merge branch 'release/middle-03-2024'
Browse files Browse the repository at this point in the history
  • Loading branch information
rts-devops committed Mar 15, 2024
2 parents 62efb3c + b107aa5 commit 9974180
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.2
15.3
2 changes: 1 addition & 1 deletion Application/Sources/Content/Publishers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension SRGDataProvider {
}
.reduce([]) { $0 + $1 }
.map { medias in
return Array(medias.sorted(by: { $0.date > $1.date }).prefix(Int(pageSize)))
return Array(medias.sorted(by: { $0.publicationDate > $1.publicationDate }).prefix(Int(pageSize)))
}
.eraseToAnyPublisher()
}
Expand Down
4 changes: 4 additions & 0 deletions Application/Sources/Helpers/Extensions/SRGMedia+PlaySRG.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ extension SRGMedia {
private var play_audioVariants: [SRGVariant] {
return audioVariants(for: recommendedAudioVariantSource) ?? []
}

var publicationDate: Date {
return startDate ?? date
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ extension RadioChannelsViewController: PlayApplicationNavigation {
func open(_ applicationSectionInfo: ApplicationSectionInfo) -> Bool {
guard let radioChannel = applicationSectionInfo.radioChannel else { return false }

if let radioChannelViewController = viewControllers.first(where: { ($0 as? PageViewController)?.radioChannel == radioChannel }) as? UIViewController & PlayApplicationNavigation {
let pageIndex = viewControllers.firstIndex(of: radioChannelViewController)!
if let radioChannelViewController = viewControllers.first(where: { ($0 as? PageViewController)?.radioChannel == radioChannel }) as? UIViewController & PlayApplicationNavigation,
let pageIndex = viewControllers.firstIndex(of: radioChannelViewController) {
_ = self.switchToIndex(pageIndex, animated: false)

return radioChannelViewController.open(applicationSectionInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import SRGAppearance

class PageContainerViewController: UIViewController {
let viewControllers: [UIViewController]
let initialPage: Int

private(set) var initialPage: Int

private var pageViewController: UIPageViewController

Expand Down Expand Up @@ -137,7 +138,7 @@ class PageContainerViewController: UIViewController {

coordinator.animate(alongsideTransition: { _ in
// viewWillTransition(to:with:) could be called before controller view is loaded.
if self.tabBar != nil {
if self.isViewLoaded {
// Force a refresh of the tab bar so that the alignment is correct after rotation
self.tabBar.alignment = .leading
self.tabBar.alignment = .center
Expand All @@ -162,28 +163,44 @@ class PageContainerViewController: UIViewController {
}

func switchToIndex(_ index: Int, animated: Bool) -> Bool {
guard displayPage(at: index, animated: animated) else { return false }
guard index < viewControllers.count else { return false }

tabBar.setSelectedItem(tabBar.items[index], animated: animated)
return true
if self.isViewLoaded {
guard displayPage(at: index, animated: animated) else { return false }

tabBar.setSelectedItem(tabBar.items[index], animated: animated)
return true
}
else {
initialPage = index
return true
}
}

func displayPage(at index: Int, animated: Bool) -> Bool {
private func displayPage(at index: Int, animated: Bool) -> Bool {
guard index < viewControllers.count else { return false }

let currentViewController = pageViewController.viewControllers!.first!
let currentIndex = viewControllers.firstIndex(of: currentViewController)!
let direction: UIPageViewController.NavigationDirection = index > currentIndex ? .forward : .reverse

let newViewController = viewControllers[index]
pageViewController.setViewControllers([newViewController], direction: direction, animated: animated)
self.play_setNeedsScrollableViewUpdate()

didDisplayViewController(newViewController, animated: animated)
return true
if self.isViewLoaded {
var direction: UIPageViewController.NavigationDirection = .forward
if let currentViewController = pageViewController.viewControllers?.first {
let currentIndex = viewControllers.firstIndex(of: currentViewController)!
direction = index > currentIndex ? .forward : .reverse
}

let newViewController = viewControllers[index]
pageViewController.setViewControllers([newViewController], direction: direction, animated: animated)
self.play_setNeedsScrollableViewUpdate()

didDisplayViewController(newViewController, animated: animated)
return true
}
else {
initialPage = index
return true
}
}

func updateFonts() {
private func updateFonts() {
let tabBarFont = SRGFont.font(.body) as UIFont
tabBar.unselectedItemTitleFont = tabBarFont
tabBar.selectedItemTitleFont = tabBarFont
Expand Down
4 changes: 3 additions & 1 deletion WhatsNew-iOS-beta.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,7 @@
"3.8.2-443": "- Remove unexpected playback stops (like RSI Telegiornale, RTS 19h30).\n- Add sport livestream events in livestreams page. [RSI]",
"3.8.3-444": "Branch beta\n- Web first UI updated on pages.\n- Updated brand colors.\n- Removed duplicate date and time, like with sport events.",
"3.8.3-445": "- In advance published content UI updated.\n- Brand colors on labels updated.\n- Displayed user consent banner reduced if traveling between Switzerland and rest of the world.\n- Promotion micro page support (from external shared links).",
"3.8.3-446": "- Prepare AppStore release with official SRG library releases.\nSee previous build release notes."
"3.8.3-446": "- Prepare AppStore release with official SRG library releases.\nSee previous build release notes.",
"3.8.4-447": "- Sort latest episodes from my favorites by web publication date to help mixing web first content and regular new content.\n- Update deeplink domain for private builds. ",
"3.8.4-448": "- Fixed a crash when opening radio channel page or audio show page from media player view."
}
4 changes: 3 additions & 1 deletion WhatsNew-tvOS-beta.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,7 @@
"1.8.2-443": "- Remove unexpected playback stops (like RSI Telegiornale, RTS 19h30).\n- Add sport livestream events in livestreams page. [RSI]",
"1.8.3-444": "Branch beta\n- Web first UI updated on pages.\n- Updated brand colors.\n- Removed duplicate date and time, like with sport events.",
"1.8.3-445": "- In advance published content UI updated.\n- Brand colors on labels updated.\n- Displayed user consent banner reduced if traveling between Switzerland and rest of the world.\n- Promotion micro page support (from external shared links).",
"1.8.3-446": "- Prepare AppStore release with official SRG library releases.\nSee previous build release notes."
"1.8.3-446": "- Prepare AppStore release with official SRG library releases.\nSee previous build release notes.",
"1.8.4-447": "- Sort latest episodes from my favorites by web publication date to help mixing web first content and regular new content.",
"1.8.4-448": "- AppStore release."
}
10 changes: 5 additions & 5 deletions Xcode/Shared/BUs/RSI.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ BU__BUNDLE_IDENTIFIER_PREFIX[config=Nightly] = ch.srgssr.
BU__BUNDLE_IDENTIFIER_PREFIX[config=Debug] = ch.srgssr.
BU__CODE_SIGN_ENTITLEMENTS_IOS_APP_FILE_NAME = Application.entitlements
BU__DOMAIN = *.rsi.ch
BU__DOMAIN[config=Beta] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = srgplayer-rsi.stage.srf.ch
BU__DOMAIN[config=Nightly] = play-mmf.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = srgplayer-rsi.test.srf.ch
BU__DOMAIN[config=Debug] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Debug] = play-web-staging.herokuapp.com
BU__IDENTIFIER = rsi
BU__PRODUCT_NAME = Play RSI
BU__TV_TOP_SHELF_CONTENT_REQUEST = popular_shows
Expand Down
10 changes: 5 additions & 5 deletions Xcode/Shared/BUs/RTR.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ BU__BUNDLE_IDENTIFIER_PREFIX[config=Nightly] = ch.srgssr.
BU__BUNDLE_IDENTIFIER_PREFIX[config=Debug] = ch.srgssr.
BU__CODE_SIGN_ENTITLEMENTS_IOS_APP_FILE_NAME = Application.entitlements
BU__DOMAIN = *.rtr.ch
BU__DOMAIN[config=Beta] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = srgplayer-rtr.stage.srf.ch
BU__DOMAIN[config=Nightly] = play-mmf.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = srgplayer-rtr.test.srf.ch
BU__DOMAIN[config=Debug] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Debug] = play-web-staging.herokuapp.com
BU__IDENTIFIER = rtr
BU__PRODUCT_NAME = Play RTR
BU__TV_TOP_SHELF_CONTENT_REQUEST = popular_shows
Expand Down
10 changes: 5 additions & 5 deletions Xcode/Shared/BUs/RTS.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ BU__BUNDLE_IDENTIFIER_PREFIX[config=Nightly] = ch.srgssr.
BU__BUNDLE_IDENTIFIER_PREFIX[config=Debug] = ch.srgssr.
BU__CODE_SIGN_ENTITLEMENTS_IOS_APP_FILE_NAME = Application.entitlements
BU__DOMAIN = *.rts.ch
BU__DOMAIN[config=Beta] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = srgplayer-rts.stage.srf.ch
BU__DOMAIN[config=Nightly] = play-mmf.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = srgplayer-rts.test.srf.ch
BU__DOMAIN[config=Debug] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Debug] = play-web-staging.herokuapp.com
BU__IDENTIFIER = rts
BU__PRODUCT_NAME = Play RTS
BU__TV_TOP_SHELF_CONTENT_REQUEST = popular_shows
Expand Down
10 changes: 5 additions & 5 deletions Xcode/Shared/BUs/SRF.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ BU__BUNDLE_IDENTIFIER_PREFIX[config=Nightly] = ch.srgssr.
BU__BUNDLE_IDENTIFIER_PREFIX[config=Debug] = ch.srgssr.
BU__CODE_SIGN_ENTITLEMENTS_IOS_APP_FILE_NAME = Application.entitlements
BU__DOMAIN = *.srf.ch
BU__DOMAIN[config=Beta] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = srgplayer-srf.stage.srf.ch
BU__DOMAIN[config=Nightly] = play-mmf.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = srgplayer-srf.test.srf.ch
BU__DOMAIN[config=Debug] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Debug] = play-web-staging.herokuapp.com
BU__IDENTIFIER = srf
BU__PRODUCT_NAME = Play SRF
BU__TV_TOP_SHELF_CONTENT_REQUEST = popular_shows
Expand Down
10 changes: 5 additions & 5 deletions Xcode/Shared/BUs/SWI.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ BU__BUNDLE_IDENTIFIER_PREFIX[config=Nightly] = ch.srgssr.
BU__BUNDLE_IDENTIFIER_PREFIX[config=Debug] = ch.srgssr.
BU__CODE_SIGN_ENTITLEMENTS_IOS_APP_FILE_NAME = Application-without-CarPlay.entitlements
BU__DOMAIN = *.swissinfo.ch
BU__DOMAIN[config=Beta] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = srgplayer-swi.stage.srf.ch
BU__DOMAIN[config=Nightly] = play-mmf.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = srgplayer-swi.test.srf.ch
BU__DOMAIN[config=Debug] = play-mmf.herokuapp.com
BU__DOMAIN[config=Beta] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Beta_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Nightly_AppCenter] = play-web-staging.herokuapp.com
BU__DOMAIN[config=Debug] = play-web-staging.herokuapp.com
BU__IDENTIFIER = swi
BU__PRODUCT_NAME = Play SWI
BU__TV_TOP_SHELF_CONTENT_REQUEST = all_shows
Expand Down
2 changes: 1 addition & 1 deletion Xcode/Shared/Common.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PRODUCT_BUNDLE_IDENTIFIER = $(BU__BUNDLE_IDENTIFIER_PREFIX)$(BU__BUNDLE_IDENTIFI
PRODUCT_NAME = $(BU__PRODUCT_NAME)$(TARGET__PRODUCT_NAME_SUFFIX)

// Version information
CURRENT_PROJECT_VERSION = 446
CURRENT_PROJECT_VERSION = 448

GCC_PREPROCESSOR_DEFINITIONS[config=Beta] = BETA=1
GCC_PREPROCESSOR_DEFINITIONS[config=Beta_AppCenter] = BETA=1 APPCENTER=1
Expand Down
2 changes: 1 addition & 1 deletion Xcode/Shared/Targets/iOS/Common.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "Xcode/Shared/Common.xcconfig"

// Version information
MARKETING_VERSION = 3.8.3
MARKETING_VERSION = 3.8.4

SDKROOT = iphoneos
TARGETED_DEVICE_FAMILY=1,2
2 changes: 1 addition & 1 deletion Xcode/Shared/Targets/tvOS/Common.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "Xcode/Shared/Common.xcconfig"

// Version information
MARKETING_VERSION = 1.8.3
MARKETING_VERSION = 1.8.4

SDKROOT = appletvos
TARGETED_DEVICE_FAMILY=3

0 comments on commit 9974180

Please sign in to comment.