Repository navigation
v1.1.0
1.1.0
Changes since 1.0.2.
Breaking changes
VerticalFeedViewControlleris nowBytesFeedViewController. The SDK never let apps create this controller, so this only affects code that names the type. In Swift the old name still compiles as a deprecated alias; Objective-C code has to use the new name. The runtime class name changes too, so tools that record screens by class name (for example automatic screen tracking) report the new name.
Analytics
- An embedded feed reports each visible period as its own session:
clkandfeedExpandedwhen it shows,clsandfeedCollapsedwhen it leaves the screen or is paused (withvlon a video card). Leaving on an ad card also sends the ad'sasoandadCompleted(adSkippedif the user skipped it in that session). A session that ends before its firstclkwent out sends noclseither. Its own covers (the editorial page, an ad clickthrough) don't end the session. The full-screen feed keeps one session for its whole life, as before. clkcarries the position of the video the session starts on, counting videos like every other beacon'spos: 1 when a feed opens, the video the user comes back to when an embedded feed shows again (on an ad card, the video before it). Coming back to an ad card starts the ad'sasiandadStartedagain.sproggoes up with every session; an inactivity refresh starts a new view, which counts from there.- On an embedded feed, the close button only calls
onClose; the close is reported when the feed actually leaves the screen.
Feed
- Embed the feed in your own screens.
Bytes.makeFeedViewController(_:)returns aBytesFeedViewControllerto push, add as a child or present yourself.BytesFeedConfiguration.onCloseis what the close button (and Go Back on the failure screen) runs; without it there's no close button. The feed connects the first time it appears and waits forinitializeif needed.pause()andresume()cover sheets and other covers UIKit doesn't report. - Tabs, and feeds that come and go. An embedded feed that leaves the screen (another tab, a pushed screen, popped, removed) or is paused suspends: it lets go of its players and the playing slot, keeps its videos and place, and picks up at the same card when it's shown again. If it was away longer than the inactivity refresh interval, or the videos were replaced meanwhile, it loads fresh ones from the start. Pages added by another feed meanwhile are kept, and so is loop mode.
paddingandchromeInsets.BytesFeedConfiguration.padding(andpaddingon the controller) puts a margin around the feed; the feed's view is clear, so what's behind it shows in the margin.chromeInsetskeeps the controls and card ads clear of UI that floats over the feed (a custom tab bar, say) while the video stays edge to edge; it adds to the safe area and, once set, owns the feed'sadditionalSafeAreaInsets. Both can change at any time. Ad cards and the video title now also keep clear of the side safe area.BytesFeedView, fromBytes.makeFeedView(_:): the feed as a plain view for view-based screens. Add it to a view controller's view hierarchy and size it like any view; it makes the feed a child of the nearest view controller on its own, so the feed suspends when the view (or an ancestor) leaves the screen and picks up at the same card when it's back. Moving it within one screen keeps it playing. It forwardspadding,chromeInsets,onClose,pause()andresume().BytesFeed, the feed as a SwiftUI view:BytesFeed(padding:chromeInsets:isPaused:ignoresSafeArea:onClose:). It hosts the feed's view controller, so tabs and navigation suspend and resume it like in UIKit;isPausedcovers sheets, full-screen covers, pagers and overlays SwiftUI doesn't report. It ignores the safe area by default. Its hosting controller decides the orientation and the status bar (the docs show how to keep a feed screen portrait and dark). The SDK now links SwiftUI.- One feed plays at a time. A feed that appears while another is playing waits for it to leave the screen.
Bytes.presentFeedworks while embedded feeds are off screen or paused. - The feed is portrait only. A
UITabBarControllerweighs its tabs' orientations, so a feed tab can keep the other tabs from rotating; the docs show how to forward the decision to the selected tab. A feed that ends up in a landscape window anyway logs a warning, once per feed. - A feed shown before
initializereports.invalidConfiguration(.notInitialized)once onBytes.errors(). An embedded feed reports.feedPresentedEmptyonly when waiting for videos didn't work and it starts reloading, not while the app is still starting up. - An embedded feed playing muted (unless the server config says unmuted) mixes with other audio, so a screen with the feed doesn't stop the user's music. With sound on, or full screen, the feed takes the audio over as before. The app's audio category, mode and options come back when an embedded feed leaves the screen, and when any feed ends.
- The feed no longer asks for the status bar to be hidden, and asks for a light status bar only over the video. A container that holds the feed decides, unless it forwards
childForStatusBarStyleto it. This has no effect on the full-screen feed, whose presenter controls the status bar. Bytes.shutdown()now ends a full-screen feed that's playing, and shows a message with Go Back. Before, the feed kept playing with nothing behind it. An embedded feed that's playing suspends instead, and connects again after the nextinitialize.- A failure screen without a close action offers Retry, and an inactivity refresh that brings videos replaces a failure screen left from an earlier load.
- A feed opened before the server config arrived takes the config's audio state, HLS buffering and in-memory prefetch setting the first time it gets videos, instead of keeping the defaults. If the user already toggled mute, their choice wins. Feeds opened with the config are unchanged, and a later inactivity refresh doesn't change these settings mid-session.
- Videos that arrive while the feed is covered (for example by the editorial Safari page) or on its way out no longer start card 0 behind the cover. Card 0 starts, and its
vsiis sent, when the feed is visible again. Bytes.presentFeedcalled from a view controller that isn't part of an on-screen view controller hierarchy (for example one that was removed from it) is now ignored with a warning. Before, UIKit dropped the presentation and every laterpresentFeedcall was ignored. Presenting from a controller in a hidden tab still works.- A card that starts while the feed is offline keeps like, mute and branding hidden under the offline overlay. Before, they came back and stayed tappable, mostly on an embedded feed, whose first card starts after the overlay is up.
Media.net ad source
BytesAdSourceMediaNetnow links the Media.net Ad SDK 1.1.0 and the Media.net renderer 1.1.0 (both were 1.0.x). SPM resolves them on its own.- CocoaPods: the Media.net pods (
MediaNetAdSDK,MNPrebidMobile,MediaNetRendererAdSDK,MediaNetRendererCore) are now installed from the podspecs on their release tags, not from the CocoaPods trunk. Add the fourpodlines from the README's Podfile next to the two Bytes pods.OMSDK_Medianetand Google Mobile Ads still come from trunk.