Skip to content

Commit

Permalink
iOS 13 + (#178)
Browse files Browse the repository at this point in the history
* 🌲 Update

* 🌲 Update

* 🌲 Update
  • Loading branch information
muukii authored Aug 28, 2022
1 parent bbb240f commit bd98301
Show file tree
Hide file tree
Showing 16 changed files with 181 additions and 166 deletions.
8 changes: 4 additions & 4 deletions Brightroom.podspec
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Pod::Spec.new do |s|
s.name = "Brightroom"
s.version = "2.7.0"
s.version = "2.8.0"
s.summary = "A component-oriented image editor on top of CoreImage."

s.homepage = "https://github.com/muukii/Brightroom"
s.license = "MIT"
s.author = "muukii"
s.source = { :git => "https://github.com/muukii/Brightroom.git", :tag => s.version }

s.swift_version = "5.3"
s.swift_version = "5.6"
s.module_name = s.name
s.requires_arc = true
s.ios.deployment_target = "12.0"
s.ios.deployment_target = "13.0"
s.ios.frameworks = ["UIKit", "CoreImage"]
s.ios.dependency "Verge/Store", ">= 8.9.1"
s.ios.dependency "Verge/Store", ">= 8.19.0"

s.subspec "Engine" do |ss|
ss.source_files = "Sources/BrightroomEngine/**/*.swift"
Expand Down
40 changes: 8 additions & 32 deletions Brightroom.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
4B58E831260F0027004A834F /* orientation_up.HEIC in Resources */ = {isa = PBXBuildFile; fileRef = 4B254FED260BB32600F77E9A /* orientation_up.HEIC */; };
4B58E889260F0DEA004A834F /* DemoPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B58E888260F0DEA004A834F /* DemoPreviewViewController.swift */; };
4B600B02216B7A94001E1456 /* BrightroomEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B600B00216B7A94001E1456 /* BrightroomEngine.h */; settings = {ATTRIBUTES = (Public, ); }; };
4B600B19216B7BB9001E1456 /* ImageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B600B18216B7BB9001E1456 /* ImageRenderer.swift */; };
4B600B19216B7BB9001E1456 /* BrightRoomImageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B600B18216B7BB9001E1456 /* BrightRoomImageRenderer.swift */; };
4B600B23216B7C9C001E1456 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B600B22216B7C9C001E1456 /* AppDelegate.swift */; };
4B600B2A216B7C9E001E1456 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B600B29216B7C9E001E1456 /* Assets.xcassets */; };
4B600B2D216B7C9E001E1456 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B600B2B216B7C9E001E1456 /* LaunchScreen.storyboard */; };
Expand Down Expand Up @@ -795,7 +795,7 @@
4B600AFD216B7A94001E1456 /* BrightroomEngine.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BrightroomEngine.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4B600B00216B7A94001E1456 /* BrightroomEngine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BrightroomEngine.h; sourceTree = "<group>"; };
4B600B01216B7A94001E1456 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4B600B18216B7BB9001E1456 /* ImageRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageRenderer.swift; sourceTree = "<group>"; };
4B600B18216B7BB9001E1456 /* BrightRoomImageRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrightRoomImageRenderer.swift; sourceTree = "<group>"; };
4B600B20216B7C9C001E1456 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
4B600B22216B7C9C001E1456 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4B600B29216B7C9E001E1456 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1290,8 +1290,6 @@
FC110F162660FE0B00CC45EA /* m1-cb265e4ae8967567fca5b0ecd58b90cb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "m1-cb265e4ae8967567fca5b0ecd58b90cb.png"; sourceTree = "<group>"; };
FC394020266E0FCA00A1698E /* UIImage+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+.swift"; sourceTree = "<group>"; };
FC4B7D81E5A0A734CEBB2036 /* Pods_Demo_Apps_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo_Apps_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FCA2BEA2278E976000050FA4 /* AssetsPicker */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = AssetsPicker; path = ../AssetsPicker; sourceTree = "<group>"; };
FCA2BEA3278E982F00050FA4 /* AssetsPicker */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = AssetsPicker; path = ../AssetsPicker; sourceTree = "<group>"; };
FCC7962523C58209009ACD8A /* LoadingBlurryOverlayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingBlurryOverlayView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -1589,7 +1587,6 @@
4B600AF3216B7A94001E1456 = {
isa = PBXGroup;
children = (
FCA2BEA1278E976000050FA4 /* Packages */,
4BE9B3D1260BA72D000A3D09 /* Bundle */,
4B4C7C8E260A6EF70082240A /* Archives */,
4B6A5F5B2179D43A004D68DC /* Sources */,
Expand Down Expand Up @@ -1756,7 +1753,7 @@
4B9B02EA216BBB6B001593B9 /* Engine */ = {
isa = PBXGroup;
children = (
4B600B18216B7BB9001E1456 /* ImageRenderer.swift */,
4B600B18216B7BB9001E1456 /* BrightRoomImageRenderer.swift */,
4B135F752613767E003B5152 /* CoreGraphics+.swift */,
4B112F14216C9B5400EF8E25 /* ImageTool.swift */,
);
Expand Down Expand Up @@ -2301,15 +2298,6 @@
name = ImageSamples;
sourceTree = "<group>";
};
FCA2BEA1278E976000050FA4 /* Packages */ = {
isa = PBXGroup;
children = (
FCA2BEA2278E976000050FA4 /* AssetsPicker */,
FCA2BEA3278E982F00050FA4 /* AssetsPicker */,
);
name = Packages;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -3214,7 +3202,7 @@
4B135F762613767E003B5152 /* CoreGraphics+.swift in Sources */,
4B66C9702171D6F8008F2A54 /* EditingStack.swift in Sources */,
4B04B3EE2177B0C70032356A /* FilterSaturation.swift in Sources */,
4B600B19216B7BB9001E1456 /* ImageRenderer.swift in Sources */,
4B600B19216B7BB9001E1456 /* BrightRoomImageRenderer.swift in Sources */,
4B9369EE25F94A1300B18571 /* EditingCrop.swift in Sources */,
4B112F15216C9B5400EF8E25 /* ImageTool.swift in Sources */,
4B9B02E7216BBA56001593B9 /* GraphicDrawing.swift in Sources */,
Expand Down Expand Up @@ -3376,7 +3364,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/$(TARGET_NAME)/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3403,7 +3390,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/$(TARGET_NAME)/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -3467,7 +3453,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -3527,7 +3513,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "app.muukii.brightroom.$(TARGET_NAME)";
Expand Down Expand Up @@ -3555,7 +3541,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/$(TARGET_NAME)/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -3584,7 +3569,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/$(TARGET_NAME)/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3608,7 +3592,6 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Demo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3630,7 +3613,6 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Demo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3653,7 +3635,7 @@
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Sources/SwiftUIDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3676,7 +3658,7 @@
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Sources/SwiftUIDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3695,7 +3677,6 @@
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = GKNHX9R5U2;
INFOPLIST_FILE = "Tests/$(TARGET_NAME)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3715,7 +3696,6 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = GKNHX9R5U2;
INFOPLIST_FILE = "Tests/$(TARGET_NAME)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3734,7 +3714,6 @@
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
INFOPLIST_FILE = "$(SRCROOT)/Bundle/LUTs/Import LUT/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3755,7 +3734,6 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
INFOPLIST_FILE = "$(SRCROOT)/Bundle/LUTs/Import LUT/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3776,7 +3754,6 @@
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
INFOPLIST_FILE = Bundle/LUTs/ShareLUT/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -3797,7 +3774,6 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
INFOPLIST_FILE = Bundle/LUTs/ShareLUT/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
78 changes: 38 additions & 40 deletions Brightroom.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
{
"object": {
"pins": [
{
"package": "MosaiqueAssetsPicker",
"repositoryURL": "https://github.com/eure/AssetsPicker.git",
"state": {
"branch": "master",
"revision": "fdc6c4654eaf85649414034aa0907144d0e330bb",
"version": null
}
},
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
"state": {
"branch": null,
"revision": "7e01c05f25c025143073eaa3be3532f9375c614b",
"version": "6.1.0"
}
},
{
"package": "TransitionPatch",
"repositoryURL": "https://github.com/muukii/TransitionPatch.git",
"state": {
"branch": null,
"revision": "1f2e5930a68b11dae764ee7ffda14b2b7ffa8fce",
"version": "1.0.3"
}
},
{
"package": "Verge",
"repositoryURL": "https://github.com/VergeGroup/Verge.git",
"state": {
"branch": null,
"revision": "3f9dca1d48d9381f4d05a923dd4ca59d77d1b4a6",
"version": "8.13.0"
}
"pins" : [
{
"identity" : "assetspicker",
"kind" : "remoteSourceControl",
"location" : "https://github.com/eure/AssetsPicker.git",
"state" : {
"branch" : "master",
"revision" : "fdc6c4654eaf85649414034aa0907144d0e330bb"
}
]
},
"version": 1
},
{
"identity" : "rxswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReactiveX/RxSwift.git",
"state" : {
"revision" : "7e01c05f25c025143073eaa3be3532f9375c614b",
"version" : "6.1.0"
}
},
{
"identity" : "transitionpatch",
"kind" : "remoteSourceControl",
"location" : "https://github.com/muukii/TransitionPatch.git",
"state" : {
"revision" : "1f2e5930a68b11dae764ee7ffda14b2b7ffa8fce",
"version" : "1.0.3"
}
},
{
"identity" : "verge",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VergeGroup/Verge.git",
"state" : {
"revision" : "e066eb7dbaa9b55d2285af27dad2000cd905938d",
"version" : "8.19.0"
}
}
],
"version" : 2
}
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"repositoryURL": "https://github.com/VergeGroup/Verge.git",
"state": {
"branch": null,
"revision": "472a0273f6adf67132bb07f52ca4547ede6c9f6c",
"version": "8.8.0"
"revision": "e066eb7dbaa9b55d2285af27dad2000cd905938d",
"version": "8.19.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import PackageDescription
let package = Package(
name: "Brightroom",
platforms: [
.iOS(.v12)
.iOS(.v13)
],
products: [
.library(name: "BrightroomEngine", targets: ["BrightroomUI"]),
.library(name: "BrightroomUI", targets: ["BrightroomUI"]),
],
dependencies: [
.package(name: "Verge", url: "https://github.com/VergeGroup/Verge.git", from: "8.8.0"),
.package(name: "Verge", url: "https://github.com/VergeGroup/Verge.git", from: "8.19.0"),
.package(url: "https://github.com/muukii/TransitionPatch.git", from: "1.0.3")
],
targets: [
Expand Down
8 changes: 4 additions & 4 deletions Sources/BrightroomEngine/Core/EditingStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ open class EditingStack: Hashable, StoreComponentType {

commit { (modifyingState: inout InoutRef<State>) in

if let loadedState = state._beta_map(\.loadedState) {
if let loadedState = state.mapIfPresent(\.loadedState) {
modifyingState.map(keyPath: \.loadedState!) { (nextState) -> Void in

loadedState.ifChanged(\.thumbnailImage) { image in
Expand Down Expand Up @@ -548,7 +548,7 @@ open class EditingStack: Hashable, StoreComponentType {
}
}

public func makeRenderer() throws -> ImageRenderer {
public func makeRenderer() throws -> BrightRoomImageRenderer {
let stateSnapshot = state

guard let loaded = stateSnapshot.loadedState else {
Expand All @@ -557,7 +557,7 @@ open class EditingStack: Hashable, StoreComponentType {

let imageSource = loaded.imageSource

let renderer = ImageRenderer(source: imageSource, orientation: loaded.metadata.orientation)
let renderer = BrightRoomImageRenderer(source: imageSource, orientation: loaded.metadata.orientation)

// TODO: Clean up ImageRenderer.Edit

Expand Down Expand Up @@ -617,7 +617,7 @@ open class EditingStack: Hashable, StoreComponentType {
orientation: CGImagePropertyOrientation
) throws -> CGImage {

let renderer = ImageRenderer(source: source, orientation: orientation)
let renderer = BrightRoomImageRenderer(source: source, orientation: orientation)
renderer.edit.modifiers = filters

let result = try renderer.render().cgImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ import CoreImage
import SwiftUI
import UIKit

@available(*, deprecated, renamed: "BrightRoomImageRenderer", message: "Renamed in favor of SwiftUI.ImageRenderer")
public typealias ImageRenderer = BrightRoomImageRenderer

/// It renders an image with options
public final class ImageRenderer {
public final class BrightRoomImageRenderer {

public struct Options {

Expand All @@ -42,7 +45,7 @@ public final class ImageRenderer {
/// - workingFormat:
/// - workingColorSpace:
public init(
resolution: ImageRenderer.Resolution = .full,
resolution: BrightRoomImageRenderer.Resolution = .full,
workingFormat: CIFormat = .ARGB8,
workingColorSpace: CGColorSpace? = nil
) {
Expand Down
Loading

0 comments on commit bd98301

Please sign in to comment.