Skip to content

Commit

Permalink
Upgrade library version to 0.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
linjie-firework committed Dec 21, 2024
1 parent 4b9b2c1 commit 1378f9b
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 15 deletions.
4 changes: 2 additions & 2 deletions FireworkVideoUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FireworkVideoUI'
s.version = '0.2.6'
s.version = '0.2.7'
s.summary = 'An extension library meant to provide easier interfaces for the FireworkVideoSDK.'
s.homepage = 'https://github.com/loopsocial/firework_ios_sdk_ui_extensions'
s.license = 'Apache License, Version 2.0'
Expand All @@ -12,5 +12,5 @@ Pod::Spec.new do |s|
s.swift_version = '5.3'
s.source_files = 'Sources/**/*.{swift}'

s.dependency 'FireworkVideo'
s.dependency 'FireworkVideo', '~> 1.27.1'
end
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
targets: ["FireworkVideoUI"])
],
dependencies: [
.package(url: "https://github.com/loopsocial/firework_ios_sdk.git", .upToNextMajor(from: Version(1, 24, 0)))
.package(url: "https://github.com/loopsocial/firework_ios_sdk.git", .upToNextMajor(from: Version(1, 27, 1)))
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/loopsocial/firework_ios_sdk.git",
"state": {
"branch": null,
"revision": "261beff6af55d30c0c51c0fdf4a48de2093cf854",
"version": "1.27.0"
"revision": "4421202725e388d2506a89af44e4f2233ac873b5",
"version": "1.27.1"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ extension StoryBlockViewCollectionViewCell2: StoryBlockViewControllerDelegate {
func storyBlockDidLoadFeed(
_ viewController: StoryBlockViewController
) {

debugPrint("Story block loaded successfully.")
}

func storyBlock(
_ viewController: StoryBlockViewController,
didFailToLoadFeed error: StoryBlockError
) {

debugPrint("Story block did fail loading with error: \(error.localizedDescription)")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ extension VideoFeedCollectionViewCell2: VideoFeedViewControllerDelegate {
func videoFeedDidLoadFeed(
_ viewController: VideoFeedViewController
) {

debugPrint("Video feed loaded successfully.")
}

func videoFeed(
_ viewController: VideoFeedViewController,
didFailToLoadFeed error: VideoFeedError
) {

debugPrint("Video feed did fail loading with error: \(error.localizedDescription)")
}
}
4 changes: 2 additions & 2 deletions Sample/SampleApp/SwiftUIExample/SwiftUIViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
import FireworkVideo
import FireworkVideoUI

struct SwiftUIListView: View {
struct SwiftUIListView: View {
var body: some View {
List {
Spacer()
Expand All @@ -22,7 +22,7 @@ struct SwiftUIListView: View {
debugPrint("Video feed loaded successfully.")
},
onVideoFeedFailedToLoad: { error in
debugPrint("Video feed did fail loading")
debugPrint("Video feed did fail loading with error: \(error.localizedDescription)")
}
).frame(height: 240)
Spacer()
Expand Down
7 changes: 5 additions & 2 deletions Sources/FireworkVideoUI/Cache/StoryBlockViewCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ public class StoryBlockViewCache {

public func getOrCreateVideoFeedView(
source: StoryBlockContentSource,
indexPath: IndexPath,
indexPath: IndexPath? = nil,
adConfiguration: AdConfiguration = AdConfiguration()
) -> StoryBlockView {
let cacheKey = "\(source.cacheKey)_\(indexPath.cacheKey)"
var cacheKey = "\(source.cacheKey)"
if let indexPath = indexPath {
cacheKey += "_\(indexPath.cacheKey)"
}
if let storyBlockView = lruCache.get(cacheKey) {
return storyBlockView
}
Expand Down
7 changes: 5 additions & 2 deletions Sources/FireworkVideoUI/Cache/VideoFeedViewCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ public class VideoFeedViewCache {

public func getOrCreateVideoFeedView(
source: VideoFeedContentSource,
indexPath: IndexPath,
indexPath: IndexPath? = nil,
layout: VideoFeedLayout = VideoFeedHorizontalLayout(),
adConfiguration: AdConfiguration = AdConfiguration()
) -> VideoFeedView {
let cacheKey = "\(source.cacheKey)_\(indexPath.cacheKey)"
var cacheKey = "\(source.cacheKey)"
if let indexPath = indexPath {
cacheKey += "_\(indexPath.cacheKey)"
}
if let videoFeedView = lruCache.get(cacheKey) {
return videoFeedView
}
Expand Down
4 changes: 4 additions & 0 deletions Sources/FireworkVideoUI/View/StoryBlockView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public class StoryBlockView: UIView {
set { storyBlockViewController.pictureInPictureDelegate = newValue }
}

// public var loadResult: StoryBlockLoadResult? {
// storyBlockViewController.loadResult
// }

private let storyBlockViewController: StoryBlockViewController

/// Initializes StoryBlockView.
Expand Down
4 changes: 4 additions & 0 deletions Sources/FireworkVideoUI/View/VideoFeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public class VideoFeedView: UIView {
set { feedViewController.pictureInPictureDelegate = newValue }
}

// public var loadResult: VideoFeedLoadResult? {
// feedViewController.loadResult
// }

private let feedViewController: VideoFeedViewController

/// Initializes VideoFeedView.
Expand Down

0 comments on commit 1378f9b

Please sign in to comment.