Skip to content

Commit

Permalink
fix: TrendingMovies build on Swift 5.8 & UI glitches (#3253)
Browse files Browse the repository at this point in the history
  • Loading branch information
indragiek authored Aug 25, 2023
1 parent 05afe8b commit 5d6ce0e
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 10 deletions.
1 change: 0 additions & 1 deletion Samples/TrendingMovies/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
github "onevcat/Kingfisher" == 5.9.0
github "BeauNouvelle/FaceAware" ~> 2.1.1
github "indragiek/TUSafariActivity" "master"
1 change: 0 additions & 1 deletion Samples/TrendingMovies/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
github "BeauNouvelle/FaceAware" "2.1.1"
github "indragiek/TUSafariActivity" "74b9c9959129b1297225cd790f9221cbb6fd5695"
github "onevcat/Kingfisher" "5.9.0"
64 changes: 60 additions & 4 deletions Samples/TrendingMovies/TrendingMovies.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
844A3561282B2B9B00C6D1DF /* VideoCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844A352D282B2B9B00C6D1DF /* VideoCollectionViewCell.swift */; };
844A3574282B4B6500C6D1DF /* TUSafariActivity.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844A3570282B4B6500C6D1DF /* TUSafariActivity.xcframework */; };
844A3575282B4B6500C6D1DF /* TUSafariActivity.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 844A3570282B4B6500C6D1DF /* TUSafariActivity.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
844A3576282B4B6500C6D1DF /* FaceAware.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844A3571282B4B6500C6D1DF /* FaceAware.xcframework */; };
844A3577282B4B6500C6D1DF /* FaceAware.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 844A3571282B4B6500C6D1DF /* FaceAware.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
844A3578282B4B6500C6D1DF /* Kingfisher.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844A3572282B4B6500C6D1DF /* Kingfisher.xcframework */; };
844A3579282B4B6500C6D1DF /* Kingfisher.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 844A3572282B4B6500C6D1DF /* Kingfisher.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
844A357A282B4B6500C6D1DF /* KingfisherSwiftUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844A3573282B4B6500C6D1DF /* KingfisherSwiftUI.xcframework */; };
Expand All @@ -70,6 +68,34 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
039F53352A96A5660034F766 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 844A3565282B3E4500C6D1DF /* Sentry.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D81A3488291D0AC0005A27A9;
remoteInfo = SentryPrivate;
};
039F53372A96A5660034F766 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 844A3565282B3E4500C6D1DF /* Sentry.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D8199DAA29376E9B0074249E;
remoteInfo = SentrySwiftUI;
};
039F53392A96A5660034F766 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 844A3565282B3E4500C6D1DF /* Sentry.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8431EFD929B27B1100D8DC56;
remoteInfo = SentryProfilerTests;
};
039F533B2A96A5660034F766 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 844A3565282B3E4500C6D1DF /* Sentry.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8431F00A29B284F200D8DC56;
remoteInfo = SentryTestUtils;
};
844A356A282B3E4500C6D1DF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 844A3565282B3E4500C6D1DF /* Sentry.xcodeproj */;
Expand Down Expand Up @@ -104,7 +130,6 @@
844A357B282B4B6500C6D1DF /* KingfisherSwiftUI.xcframework in Embed Frameworks */,
844A3575282B4B6500C6D1DF /* TUSafariActivity.xcframework in Embed Frameworks */,
844A359D282DAA6100C6D1DF /* Sentry.framework in Embed Frameworks */,
844A3577282B4B6500C6D1DF /* FaceAware.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -183,7 +208,6 @@
844A357A282B4B6500C6D1DF /* KingfisherSwiftUI.xcframework in Frameworks */,
844A3574282B4B6500C6D1DF /* TUSafariActivity.xcframework in Frameworks */,
844A359C282DAA6100C6D1DF /* Sentry.framework in Frameworks */,
844A3576282B4B6500C6D1DF /* FaceAware.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -390,6 +414,10 @@
children = (
844A356B282B3E4500C6D1DF /* Sentry.framework */,
844A356D282B3E4500C6D1DF /* SentryTests.xctest */,
039F53362A96A5660034F766 /* SentryPrivate.framework */,
039F53382A96A5660034F766 /* SentrySwiftUI.framework */,
039F533A2A96A5660034F766 /* SentryProfilerTests.xctest */,
039F533C2A96A5660034F766 /* libSentryTestUtils.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -498,6 +526,34 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
039F53362A96A5660034F766 /* SentryPrivate.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SentryPrivate.framework;
remoteRef = 039F53352A96A5660034F766 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
039F53382A96A5660034F766 /* SentrySwiftUI.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SentrySwiftUI.framework;
remoteRef = 039F53372A96A5660034F766 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
039F533A2A96A5660034F766 /* SentryProfilerTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = SentryProfilerTests.xctest;
remoteRef = 039F53392A96A5660034F766 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
039F533C2A96A5660034F766 /* libSentryTestUtils.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSentryTestUtils.a;
remoteRef = 039F533B2A96A5660034F766 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
844A356B282B3E4500C6D1DF /* Sentry.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import FaceAware
import Kingfisher
import UIKit

Expand All @@ -19,9 +18,9 @@ class CreditCollectionViewCell: UICollectionViewCell {
var profileImage: UIImage? {
didSet {
if let profileImage = profileImage {
profileImageView.set(image: profileImage, focusOnFaces: true)
profileImageView.image = profileImage
} else {
profileImageView.set(image: UIImage(named: CreditCollectionViewCell.placeholderImageName), focusOnFaces: false)
profileImageView.image = UIImage(named: CreditCollectionViewCell.placeholderImageName)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class MovieCollectionViewCell: UICollectionViewCell {
private func blurPosterImage(_ image: UIImage, completion: @escaping (UIImage?) -> Void) {
let efficiently = ProcessInfo.processInfo.arguments.contains("--io.sentry.sample.trending-movies.launch-arg.efficient-implementation")
func performBlur() {
let blurredImage = ImageEffects.createBlurredBackdrop(image: image, downsamplingFactor: 1.0, blurRadius: 20.0, tintColor: nil, saturationDeltaFactor: 2.0)
let blurredImage = ImageEffects.createBlurredBackdrop(image: image, downsamplingFactor: 0.87, blurRadius: 20.0, tintColor: nil, saturationDeltaFactor: 2.0)
if efficiently {
DispatchQueue.main.async {
completion(blurredImage)
Expand Down

0 comments on commit 5d6ce0e

Please sign in to comment.