diff --git a/ADPhotoKit.podspec b/ADPhotoKit.podspec index 9329337..dd303fa 100644 --- a/ADPhotoKit.podspec +++ b/ADPhotoKit.podspec @@ -73,9 +73,7 @@ Pod::Spec.new do |s| end s.subspec "VideoEdit" do |video| - video.dependency 'ADPhotoKit/Base' - video.dependency 'SnapKit' - video.dependency 'Kingfisher' + video.dependency 'ADPhotoKit/CoreUI' video.source_files = ["ADPhotoKit/Classes/VideoEdit/**/*.swift","ADPhotoKit/Classes/EditCore/**/*.swift"] video.pod_target_xcconfig = { 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'Module_VideoEdit'} video.resource_bundles = { diff --git a/ADPhotoKit/Classes/CoreUI/ADPhotoKitUI.swift b/ADPhotoKit/Classes/CoreUI/ADPhotoKitUI.swift index 6ca89b5..51c02c5 100644 --- a/ADPhotoKit/Classes/CoreUI/ADPhotoKitUI.swift +++ b/ADPhotoKit/Classes/CoreUI/ADPhotoKitUI.swift @@ -72,8 +72,12 @@ public struct ADConstraintParams { extension ADSelectAssetModel { func result(image: UIImage?) -> ADAssetResult? { - #if Module_ImageEdit || Module_VideoEdit + #if Module_ImageEdit && Module_VideoEdit return ADAssetResult(image: image, asset: nil, imageEditInfo: imageEditInfo, videoEditInfo: videoEditInfo) + #elseif Module_ImageEdit + return ADAssetResult(image: image, asset: nil, imageEditInfo: imageEditInfo) + #elseif Module_VideoEdit + return ADAssetResult(image: image, asset: nil, videoEditInfo: videoEditInfo) #else if let img = image { return ADAssetResult(image: img, asset: nil) @@ -84,8 +88,12 @@ extension ADSelectAssetModel { } func result(asset: AVAsset?) -> ADAssetResult? { - #if Module_ImageEdit || Module_VideoEdit + #if Module_ImageEdit && Module_VideoEdit return ADAssetResult(image: nil, asset: asset, imageEditInfo: imageEditInfo, videoEditInfo: videoEditInfo) + #elseif Module_ImageEdit + return ADAssetResult(image: nil, asset: asset, imageEditInfo: imageEditInfo) + #elseif Module_VideoEdit + return ADAssetResult(image: nil, asset: asset, videoEditInfo: videoEditInfo) #else if let asset = asset { return ADAssetResult(image: nil, asset: asset) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 2033d08..2ddd787 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -12,8 +12,7 @@ PODS: - ADPhotoKit/Base - SnapKit - ADPhotoKit/VideoEdit (1.5.0): - - ADPhotoKit/Base - - SnapKit + - ADPhotoKit/CoreUI - Kingfisher (6.3.1) - ProgressHUD (2.70) - SnapKit (5.6.0) @@ -38,7 +37,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - ADPhotoKit: 558f4567b49193f2952620e4c38dc1d1cc59376b + ADPhotoKit: 3f07236302c703e8b0f7161275f51c3e3dc09ead Kingfisher: 016c8b653a35add51dd34a3aba36b580041acc74 ProgressHUD: e603e8b8622c47d8818b9fb38b3cfe9d3e7ca421 SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25