Swiftpack.co - Package - SRGSSR/srgdataprovider-apple

404: Not Found

Github

link
Stars: 0

Used By

Total: 0

Releases

Xcode 12 compilation fix -

This release updates Mantle to version 2.1.2 to fix a build issue with Xcode 12.

About Xcode 12 support

A proper iOS / tvOS 14 release will be made later. Until then, we recommend you ship your application with Xcode 11.7 if you can. The library can be compiled with Xcode 12 but has not been fully tested yet.

If you still intend to use Xcode 12, note there is an issue with Carthage with a workaround available. The next official release we will deliver will support Xcode 12 and replace Carthage with SPM.

Swift Package Manager, Catalyst and Combine support -

Library structure

SRG Data Provider is now made of several smaller libraries, most notably:

  • SRGDataProvider: The main data provider object.
  • SRGDataProviderModel: All model classes exposed.
  • SRGDataProviderNetwork: Requests made with our SRG Network library. Requests have been split over several headers per business domain.
  • SRGDataProviderCombine: Requests made with Combine (see below).

Combine support (experimental)

This release adds Combine support. Business logic is shared with usual SRG Network based requests but unit test coverage is not on par at the moment. The feature should be therefore considered experimental at the moment, though it should already work pretty well (and the API should be stable). If you are targeting iOS or tvOS 13+ we recommend you adopt this new API.

Be sure to open an issue should you discover something that does not work as expected.

New requests

  • The request -latestMediasForShowsWithURNs:filter:maximumPublicationDay:completionBlock: has been added, with which a list of latest medias can be requested for several shows at the same time (10 shows max.).

Breaking changes

  • The total parameter in requests returning a total number of items is now nullable, as it should always have been.
  • -increaseSocialCountForType:subdivision:withCompletionBlock: has been replaced with -increaseSocialCountForType:URN:event:withCompletionBlock:. Just extract the URN and event data from a subdivision before providing them to this method.
  • The companion -increaseSocialCountForType:mediaComposition:withCompletionBlock: method has been removed as well. Just extract the URN and event data from a media composition before providing them to this method.
  • The method -radioEpisodesForVendor:day:channelUid:withCompletionBlock: has been renamed as -radioEpisodesForVendor:channelUid:day:withCompletionBlock: for consistency.

Additional DVR metadata -

Additional DVR metadata

Additional metadata is now returned for objects linked to a livestream. Clients can use this additional information to implement better livestream playback experiences:

  • (Breaking change) TV and radio program requests -[SRGDataProvider tvLatestProgramsForVendor:channelUid:livestreamUid:fromDate:toDate:withCompletionBlock:] and -[SRGDataProvider radioLatestProgramsForVendor:channelUid:livestreamUid:fromDate:toDate:withCompletionBlock:] now expect (optional) date range parameters, as well as an optional livestream identifier.
  • Add resourceReferenceDate property to SRGChapter, providing optional date information with which segment markIn and markOut can be converted to dates.
  • Add markInDate and markOutDate to SRGSegment for convenience.
  • Add mediaURN property to SRGProgram, which can be used to retrieve associated media and media compositions (in this case providing metadata and playback context for a program played as part of a livestream).
  • Add streamOffset property to SRGResource, which describes the difference between a resource intrinsic clock and the wall-clock.
  • Add duration to SRGSong.
  • Add vendor for Swiss Satellite Radios.

Fixes

  • Fix framework tvOS / watchOS archiving issue with Xcode 11.4.

Aspect ratio support -

  • Aspect ratio information is now returned in chapters when available.

Maintenance release -

tvOS and watchOS compatibility -

  • The library is compatible with tvOS and watchOS.
  • Audio and subtitle variant information is provided for medias and resources.
  • The program lists for TV and radio channels can be retrieved with the new -tvLatestProgramsForVendor:channelUid:completionBlock: and -radioLatestProgramsForVendor:channelUid:completionBlock: requests.
  • Semantic versioning has been adopted.
  • The project has been renamed as srgdataprovider-apple.

iOS 13 support -

  • The project has been updated to support iOS 13 and Xcode 11.
  • Rename afterDay and beforeDay properties of SRGMediaSearchSettings as fromDayand toDay for clarity.
  • Add +[SRGDay startDayForUnit:containingDay:] for determining the start day for a given unit. Also add -[SRGDay compare:] for day comparisons.
  • Add the -[SRGDataProvider increaseSearchResultsViewCountForShow:withCompletionBlock:] request to notify the service about shows viewed from search results.

Date parameter improvements -

  • Dates have been replaced with days, which are instances of SRGDay. This class provides more intuitive date construction and operations (e.g. date calculations). Requests previously expecting a date or month parameter have been renamed accordingly so that they now expect a day parameter instead.
  • Show and topic URN lists specified in media search settings are now sets instead of arrays.

New search services -

  • New search services have been added. These provide better results with aggregation bucket by characteristic, or provide suggestions if a search criterium has no perfect match.
  • Old search services do not return partial media or show objects anymore. Instead, they now return a SRGSearchResult, which merely contain the URN of a result object. To request proper complete media or show objects, use the dedicated -mediasWithURNs:completionBlock: or -showsWithURNs:completionBlock: services respectively.
  • A request to retrieve the list of most searched shows has been added.

Maintenance release -

This version updates the library dependencies.

Maintenance release -

This version updates the library dependencies.

Content protection information -

  • Add tokenType to SRGResource, providing information about which kind of content protection should be applied when playing a resource.
  • Add globalParameters to SRGDataProvider, which can be used to set parameters on all requests. This setting must be used with caution, though (we recommend using it only for development purposes), as it might interfere with regular request parameters.
  • SRGRequest and SRGRequestQueue have been moved to SRG Network. By using SRG Network to implement your own requests, you can now combine SRG Data Provider with your own data retrieval logic, using a single consistent formalism.

Service status information -

  • A new request -[SRGDataProvider serviceMessageForVendor:withCompletionBlock:] provides a way to retrieve service status information for a given business unit. Status information can be displayed to users to inform them about service disruptions, for example.

Pagination for requests by URNs -

  • Requests with a URNs list as parameter now support pagination, with a default page size of 10. If you previously were using this request, either implement pagination properly, or set the page size to the number of input URNs if you want to receive all results at once.
  • Broadcast information (e.g. when a show will become available) is available for shows and show results.
  • Page sizes are now unsigned integers instead of signed integers.

Youth protection information -

  • A new youthProtectionColor property provides recommendation information for parents.
  • The contract for the endpoint locations at which data provider services can be retrieved has been updated. This is merely an internal implementation detail, but if you previously stored (and restored) the data provider service URL at your application level for some reason, the service URL needs to be discarded or updated first.

iOS 12 / Xcode 10 compatibility -

  • The project can now be built with Xcode 10 and the iOS 12 SDK.
  • The -setCurrentDataProvider: and -currentDataProperty method pair has been consolidated into a class property. The -setCurrentDataProvider: implicit setter does not return any previous value anymore.
  • A new certificateURL property has been added to SRGDRM.

Fix iTunes Connect binary submission -

This release fixes a binary submission issue for applications delivered with bitcode.

Digital rights management support and Akamai token removal -

  • Digital rights management (DRM) metadata is now delivered as part of an SRGResource. A new SRGDRM class has been correspondingly introduced.
  • Akamai token retrieval has been removed. If you need to retrieve Akamai tokens, use the new SRG Content Protection framework.
  • SRG Data Provider now has an explicit dependency on the new SRG Network framework. Existing projects must add this new dependency to their targets after update with Carthage.
  • The SRGDataProviderErrorHTTP and SRGDataProviderHTTPStatusCodeKey constants have been replaced by the equivalent SRGNetworkErrorHTTP and SRGNetworkHTTPStatusCodeKey constants from SRGNetwork.framework, emitted in the SRGNetworkErrorDomain domain.
  • All requests now return HTTP response information in their completion block.
  • A new SRGStreamingMethodDASH streaming method is available for DASH streams.
  • An SRGRequest can now be restarted.
  • Perceived performance has been vastly improved by moving data parsing entirely on background threads.
  • To mitigate slow application startups usually associated with a large number of dynamic frameworks being used, static framework integration with Carthage 0.30 and above is now supported.
  • A Makefile has been added to conveniently build and package the project.

Compatibility with application extensions -

  • The framework can now be linked against application extensions without linker warnings.
  • By default, the network activity indicator (displayed in the status bar) is not managed anymore by SRGRequest. This feature is now an opt-in, which you can enable by calling +[SRGRequest enableNetworkActivityIndicatorManagement] early in your application lifecycle.
  • The recommended video request has been replaced with a new recommended media by URN request.

Maintenance release -

  • Resource equality was too strict and required complete identical information for two resources to be considered equal. Now only URLs are compared.
  • The documentation has been updated to reflect new service capabilities.
  • This version modernizes the project with Xcode 9.4.

Maintenance release -

The documentation has been updated to reflect new service capabilities.

List of shows by URNs -

  • A new request to retrieve a list of shows by URNs has been added.

Agnostic and BU-independent data provider -

This release performs a major shift towards URN-based services, making it easy to access any data from any business unit through a single data provider:

  • Prior knowledge of URN format at the client level has been entirely removed. URNs are now treated as opaque strings, and associated SRGMediaURN, SRGShowURN, SRGTopicURN and SRGModuleURN classes have therefore been removed.
  • The data provider historically required a business unit identifier to be provided at initialization time. This made sense since all services were initially related to a specific BU. Over time, though, a few URN-based services appeared, with no direct business unit dependency. The number of URN-based services has grown over time, introducing many duplicate endpoints delivering the same data (e.g. you could access any media based on its URL, but also through its unique identifier by calling the corresponding video, audio or online endpoints). This was leading to unnecessary complexity and redundancy. For this reason, the data provider API has been tightened up and all redundant identifier-based services have been dropped. BU-specific requests now expect a new vendor parameter, specifying the business unit for which a request must be made (e.g. trending medias).

These two changes are breaking and you need to update your code:

  • Remove the business unit identifier provided at data provider initialization.
  • Simply use strings directly were you previously were creating URNs from them.
  • Update data provider calls to match the new request method prototypes:
    • Several uid-based services you could previously use might now only be available in a URN-based form. Use these services instead.
    • Media lists now require the business unit information to be provided. Supply proper vendor information matching the business unit for which you request data.

Moreover, the chaptersOnly parameter has been renamed as standalone, which is easier to understand.

Maintenance release -

This version updates the library dependencies.

Subtopics -

  • Support for subtopics has been added.
  • markIn and markOut are now available as segment properties only. For chapters they have been replaced with fullLengthMarkIn and fullLengthMarkOut, which indicate the location at which the corresponding segments are found within the associated full-length chapter (accessible through fullLengthURN).
  • Podcast URLs have been added for shows.
  • A request to retrieve TV scheduled livestreams has been added.
  • Media statistics can now be recorded for SwissTXT scheduled livestreams as well.
  • The radio livestream by channel request now always requires a channel. To retrieve main livestreams, use the new -radioLivestreamsForContentProviders:withCompletionBlock: request (with SRGContentProvidersDefault as content provider parameter). This methods also provides a way to retrieve livestreams for other content providers (e.g. Swiss Satellite radios).
  • Methods to retrieve recommended subtitles for a given subdivision have been added.
  • Medias for topics and modules can now be retrieved by topic and module URN respectively.
  • The behavior on some public wifis (e.g. SBB) has been improved.

New constant for unspecified stream type -

The SRGStreamTypeNone constant has been added when no stream type information is specified.

Latest videos for a radio channel -

Radio is now usually filmed, that is why radio channels increasingly provide some of their contents in the form of videos as well. Those can now be retrieved using a new dedicated request.

Moreover, in some special cases, URLs and global headers set on a data provider were not properly forwarded to next page requests. This has been fixed.

Online show support -

  • Online shows are now supported through dedicated requests.
  • Whether a media must be playable or not depends on time. For this reason, blocking reasons now have an explicit time dependency. The blocking reason property has therefore been replaced with the -blockingReasonAtDate: method. This method provides information about whether a media should be playable client-side or not. For display purposes, a companion -timeAvailabilityAtDate: method is provided.
  • Episode requests could previously be supplied an oldestMonth parameter. This date parameter was limiting results to episodes published earlier, and was therefore incorrectly named. Episode requests therefore now provide a maximumPublicationMonth parameter instead.
  • Subdivision position should never be used and has therefore been removed. Simply rely on the item order in subdivision and chapter arrays.

Social count requests -

  • Add social count requests.
  • Add availability information for SRGMedia objects.
  • Remove radio SRF image resizing exclusion rules.

Improved media extraction -

  • Improved media extraction from a media composition (information more closely matches the one of the media composition than the one of the subdivision for which the media must be extracted).
  • Fixed a small issue potentially leading to incorrect segment positions (only absolute, not relative).