Fix the macOS support issue, using the folked Introspect for AppKit support

This commit is contained in:
DreamPiggy 2020-01-27 16:54:39 +08:00
parent 1bf9417ab6
commit 65c48938c1
6 changed files with 504 additions and 14 deletions

View File

@ -11,9 +11,23 @@
3211F84923DE984D00FC757F /* SDWebImageSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32C43DCC22FD540D00BE87F5 /* SDWebImageSwiftUI.framework */; };
3211F85023DE98E300FC757F /* WebImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3211F84F23DE98E300FC757F /* WebImageTests.swift */; };
3211F85323DE996700FC757F /* ViewInspector in Frameworks */ = {isa = PBXBuildFile; productRef = 3211F85223DE996700FC757F /* ViewInspector */; };
321C1D3223DE9FD1009CF62A /* Introspect in Frameworks */ = {isa = PBXBuildFile; productRef = 321C1D3123DE9FD1009CF62A /* Introspect */; };
321C1D3323DEA28E009CF62A /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32C43DE922FD577300BE87F5 /* SDWebImage.framework */; };
321C1D3623DEA9E8009CF62A /* Images.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3211F85423DE9D2700FC757F /* Images.bundle */; };
321C1D4023DEC17D009CF62A /* SDWebImageSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32C43DF422FD57FD00BE87F5 /* SDWebImageSwiftUI.framework */; };
321C1D4F23DEC185009CF62A /* SDWebImageSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32C43E0122FD581400BE87F5 /* SDWebImageSwiftUI.framework */; };
321C1D5A23DEC207009CF62A /* ViewInspector in Frameworks */ = {isa = PBXBuildFile; productRef = 321C1D5923DEC207009CF62A /* ViewInspector */; };
321C1D5B23DEC219009CF62A /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32C43E2522FD585300BE87F5 /* SDWebImage.framework */; };
321C1D5C23DEC221009CF62A /* Images.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3211F85423DE9D2700FC757F /* Images.bundle */; };
321C1D5D23DEC222009CF62A /* Images.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3211F85423DE9D2700FC757F /* Images.bundle */; };
321C1D5E23DEC22D009CF62A /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32C43E2922FD586200BE87F5 /* SDWebImage.framework */; };
321C1D6023DEC231009CF62A /* ViewInspector in Frameworks */ = {isa = PBXBuildFile; productRef = 321C1D5F23DEC231009CF62A /* ViewInspector */; };
321C1D6523DEDB23009CF62A /* Introspect in Frameworks */ = {isa = PBXBuildFile; productRef = 321C1D6423DEDB23009CF62A /* Introspect */; };
321C1D6723DEDB8E009CF62A /* Introspect in Frameworks */ = {isa = PBXBuildFile; productRef = 321C1D6623DEDB8E009CF62A /* Introspect */; };
321C1D6923DEDB91009CF62A /* Introspect in Frameworks */ = {isa = PBXBuildFile; productRef = 321C1D6823DEDB91009CF62A /* Introspect */; };
321C1D6A23DEDB98009CF62A /* AnimatedImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3211F84623DE984D00FC757F /* AnimatedImageTests.swift */; };
321C1D6B23DEDB98009CF62A /* WebImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3211F84F23DE98E300FC757F /* WebImageTests.swift */; };
321C1D6C23DEDB98009CF62A /* AnimatedImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3211F84623DE984D00FC757F /* AnimatedImageTests.swift */; };
321C1D6D23DEDB98009CF62A /* WebImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3211F84F23DE98E300FC757F /* WebImageTests.swift */; };
326B84822363350C0011BDFB /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 326B84812363350C0011BDFB /* Indicator.swift */; };
326B84832363350C0011BDFB /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 326B84812363350C0011BDFB /* Indicator.swift */; };
326B84842363350C0011BDFB /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 326B84812363350C0011BDFB /* Indicator.swift */; };
@ -72,6 +86,20 @@
remoteGlobalIDString = 32C43DCB22FD540D00BE87F5;
remoteInfo = SDWebImageSwiftUI;
};
321C1D4123DEC17D009CF62A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 32C43DC322FD540D00BE87F5 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 32C43DF322FD57FD00BE87F5;
remoteInfo = "SDWebImageSwiftUI macOS";
};
321C1D5023DEC185009CF62A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 32C43DC322FD540D00BE87F5 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 32C43E0022FD581400BE87F5;
remoteInfo = "SDWebImageSwiftUI tvOS";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@ -127,6 +155,8 @@
3211F84823DE984D00FC757F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3211F84F23DE98E300FC757F /* WebImageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebImageTests.swift; sourceTree = "<group>"; };
3211F85423DE9D2700FC757F /* Images.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Images.bundle; sourceTree = "<group>"; };
321C1D3B23DEC17D009CF62A /* SDWebImageSwiftUITests macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SDWebImageSwiftUITests macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
321C1D4A23DEC185009CF62A /* SDWebImageSwiftUITests tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SDWebImageSwiftUITests tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
326B84812363350C0011BDFB /* Indicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Indicator.swift; sourceTree = "<group>"; };
326B8486236335110011BDFB /* ActivityIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityIndicator.swift; sourceTree = "<group>"; };
326B848B236335400011BDFB /* ProgressIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProgressIndicator.swift; sourceTree = "<group>"; };
@ -154,12 +184,34 @@
buildActionMask = 2147483647;
files = (
321C1D3323DEA28E009CF62A /* SDWebImage.framework in Frameworks */,
321C1D6523DEDB23009CF62A /* Introspect in Frameworks */,
3211F84923DE984D00FC757F /* SDWebImageSwiftUI.framework in Frameworks */,
321C1D3223DE9FD1009CF62A /* Introspect in Frameworks */,
3211F85323DE996700FC757F /* ViewInspector in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
321C1D3823DEC17D009CF62A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
321C1D5B23DEC219009CF62A /* SDWebImage.framework in Frameworks */,
321C1D6723DEDB8E009CF62A /* Introspect in Frameworks */,
321C1D4023DEC17D009CF62A /* SDWebImageSwiftUI.framework in Frameworks */,
321C1D5A23DEC207009CF62A /* ViewInspector in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
321C1D4723DEC185009CF62A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
321C1D5E23DEC22D009CF62A /* SDWebImage.framework in Frameworks */,
321C1D6923DEDB91009CF62A /* Introspect in Frameworks */,
321C1D4F23DEC185009CF62A /* SDWebImageSwiftUI.framework in Frameworks */,
321C1D6023DEC231009CF62A /* ViewInspector in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
32C43DC922FD540D00BE87F5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -244,6 +296,8 @@
32C43E0122FD581400BE87F5 /* SDWebImageSwiftUI.framework */,
32C43E0E22FD581C00BE87F5 /* SDWebImageSwiftUI.framework */,
3211F84423DE984D00FC757F /* SDWebImageSwiftUITests.xctest */,
321C1D3B23DEC17D009CF62A /* SDWebImageSwiftUITests macOS.xctest */,
321C1D4A23DEC185009CF62A /* SDWebImageSwiftUITests tvOS.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -336,12 +390,58 @@
name = SDWebImageSwiftUITests;
packageProductDependencies = (
3211F85223DE996700FC757F /* ViewInspector */,
321C1D3123DE9FD1009CF62A /* Introspect */,
321C1D6423DEDB23009CF62A /* Introspect */,
);
productName = SDWebImageSwiftUITests;
productReference = 3211F84423DE984D00FC757F /* SDWebImageSwiftUITests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
321C1D3A23DEC17D009CF62A /* SDWebImageSwiftUITests macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 321C1D4323DEC17D009CF62A /* Build configuration list for PBXNativeTarget "SDWebImageSwiftUITests macOS" */;
buildPhases = (
321C1D3723DEC17D009CF62A /* Sources */,
321C1D3823DEC17D009CF62A /* Frameworks */,
321C1D3923DEC17D009CF62A /* Resources */,
321C1D5523DEC1A9009CF62A /* ShellScript */,
);
buildRules = (
);
dependencies = (
321C1D4223DEC17D009CF62A /* PBXTargetDependency */,
);
name = "SDWebImageSwiftUITests macOS";
packageProductDependencies = (
321C1D5923DEC207009CF62A /* ViewInspector */,
321C1D6623DEDB8E009CF62A /* Introspect */,
);
productName = "SDWebImageSwiftUITests macOS";
productReference = 321C1D3B23DEC17D009CF62A /* SDWebImageSwiftUITests macOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
321C1D4923DEC185009CF62A /* SDWebImageSwiftUITests tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 321C1D5223DEC185009CF62A /* Build configuration list for PBXNativeTarget "SDWebImageSwiftUITests tvOS" */;
buildPhases = (
321C1D4623DEC185009CF62A /* Sources */,
321C1D4723DEC185009CF62A /* Frameworks */,
321C1D4823DEC185009CF62A /* Resources */,
321C1D5623DEC1C7009CF62A /* ShellScript */,
);
buildRules = (
);
dependencies = (
321C1D5123DEC185009CF62A /* PBXTargetDependency */,
);
name = "SDWebImageSwiftUITests tvOS";
packageProductDependencies = (
321C1D5F23DEC231009CF62A /* ViewInspector */,
321C1D6823DEDB91009CF62A /* Introspect */,
);
productName = "SDWebImageSwiftUITests tvOS";
productReference = 321C1D4A23DEC185009CF62A /* SDWebImageSwiftUITests tvOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
32C43DCB22FD540D00BE87F5 /* SDWebImageSwiftUI */ = {
isa = PBXNativeTarget;
buildConfigurationList = 32C43DD422FD540D00BE87F5 /* Build configuration list for PBXNativeTarget "SDWebImageSwiftUI" */;
@ -431,6 +531,12 @@
3211F84323DE984D00FC757F = {
CreatedOnToolsVersion = 11.3.1;
};
321C1D3A23DEC17D009CF62A = {
CreatedOnToolsVersion = 11.3.1;
};
321C1D4923DEC185009CF62A = {
CreatedOnToolsVersion = 11.3.1;
};
32C43DCB22FD540D00BE87F5 = {
CreatedOnToolsVersion = 11.0;
LastSwiftMigration = 1100;
@ -460,7 +566,7 @@
mainGroup = 32C43DC222FD540D00BE87F5;
packageReferences = (
3211F85123DE996700FC757F /* XCRemoteSwiftPackageReference "ViewInspector" */,
321C1D3023DE9FD1009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */,
321C1D6323DEDB23009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */,
);
productRefGroup = 32C43DCD22FD540D00BE87F5 /* Products */;
projectDirPath = "";
@ -471,6 +577,8 @@
32C43E0022FD581400BE87F5 /* SDWebImageSwiftUI tvOS */,
32C43E0D22FD581C00BE87F5 /* SDWebImageSwiftUI watchOS */,
3211F84323DE984D00FC757F /* SDWebImageSwiftUITests */,
321C1D3A23DEC17D009CF62A /* SDWebImageSwiftUITests macOS */,
321C1D4923DEC185009CF62A /* SDWebImageSwiftUITests tvOS */,
);
};
/* End PBXProject section */
@ -484,6 +592,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
321C1D3923DEC17D009CF62A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
321C1D5C23DEC221009CF62A /* Images.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
321C1D4823DEC185009CF62A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
321C1D5D23DEC222009CF62A /* Images.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
32C43DCA22FD540D00BE87F5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -534,6 +658,44 @@
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
};
321C1D5523DEC1A9009CF62A /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/Mac/SDWebImage.framework",
);
outputFileListPaths = (
);
outputPaths = (
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SDWebImage.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
};
321C1D5623DEC1C7009CF62A /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/tvOS/SDWebImage.framework",
);
outputFileListPaths = (
);
outputPaths = (
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SDWebImage.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -546,6 +708,24 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
321C1D3723DEC17D009CF62A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
321C1D6B23DEDB98009CF62A /* WebImageTests.swift in Sources */,
321C1D6A23DEDB98009CF62A /* AnimatedImageTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
321C1D4623DEC185009CF62A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
321C1D6D23DEDB98009CF62A /* WebImageTests.swift in Sources */,
321C1D6C23DEDB98009CF62A /* AnimatedImageTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
32C43DC822FD540D00BE87F5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -618,6 +798,16 @@
target = 32C43DCB22FD540D00BE87F5 /* SDWebImageSwiftUI */;
targetProxy = 3211F84A23DE984D00FC757F /* PBXContainerItemProxy */;
};
321C1D4223DEC17D009CF62A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 32C43DF322FD57FD00BE87F5 /* SDWebImageSwiftUI macOS */;
targetProxy = 321C1D4123DEC17D009CF62A /* PBXContainerItemProxy */;
};
321C1D5123DEC185009CF62A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 32C43E0022FD581400BE87F5 /* SDWebImageSwiftUI tvOS */;
targetProxy = 321C1D5023DEC185009CF62A /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@ -630,7 +820,6 @@
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -652,7 +841,6 @@
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -665,6 +853,94 @@
};
name = Release;
};
321C1D4423DEC17D009CF62A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.dreampiggy.SDWebImageSwiftUITests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
321C1D4523DEC17D009CF62A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.dreampiggy.SDWebImageSwiftUITests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
321C1D5323DEC185009CF62A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.dreampiggy.SDWebImageSwiftUITests-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
};
name = Debug;
};
321C1D5423DEC185009CF62A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.dreampiggy.SDWebImageSwiftUITests-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
};
name = Release;
};
32C43DD222FD540D00BE87F5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -1057,6 +1333,24 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
321C1D4323DEC17D009CF62A /* Build configuration list for PBXNativeTarget "SDWebImageSwiftUITests macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
321C1D4423DEC17D009CF62A /* Debug */,
321C1D4523DEC17D009CF62A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
321C1D5223DEC185009CF62A /* Build configuration list for PBXNativeTarget "SDWebImageSwiftUITests tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
321C1D5323DEC185009CF62A /* Debug */,
321C1D5423DEC185009CF62A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
32C43DC622FD540D00BE87F5 /* Build configuration list for PBXProject "SDWebImageSwiftUI" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@ -1113,9 +1407,9 @@
minimumVersion = 0.0.0;
};
};
321C1D3023DE9FD1009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {
321C1D6323DEDB23009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/siteline/SwiftUI-Introspect.git";
repositoryURL = "https://github.com/dreampiggy/SwiftUI-Introspect.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.0.0;
@ -1129,9 +1423,29 @@
package = 3211F85123DE996700FC757F /* XCRemoteSwiftPackageReference "ViewInspector" */;
productName = ViewInspector;
};
321C1D3123DE9FD1009CF62A /* Introspect */ = {
321C1D5923DEC207009CF62A /* ViewInspector */ = {
isa = XCSwiftPackageProductDependency;
package = 321C1D3023DE9FD1009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */;
package = 3211F85123DE996700FC757F /* XCRemoteSwiftPackageReference "ViewInspector" */;
productName = ViewInspector;
};
321C1D5F23DEC231009CF62A /* ViewInspector */ = {
isa = XCSwiftPackageProductDependency;
package = 3211F85123DE996700FC757F /* XCRemoteSwiftPackageReference "ViewInspector" */;
productName = ViewInspector;
};
321C1D6423DEDB23009CF62A /* Introspect */ = {
isa = XCSwiftPackageProductDependency;
package = 321C1D6323DEDB23009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */;
productName = Introspect;
};
321C1D6623DEDB8E009CF62A /* Introspect */ = {
isa = XCSwiftPackageProductDependency;
package = 321C1D6323DEDB23009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */;
productName = Introspect;
};
321C1D6823DEDB91009CF62A /* Introspect */ = {
isa = XCSwiftPackageProductDependency;
package = 321C1D6323DEDB23009CF62A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */;
productName = Introspect;
};
/* End XCSwiftPackageProductDependency section */

View File

@ -3,11 +3,11 @@
"pins": [
{
"package": "Introspect",
"repositoryURL": "https://github.com/siteline/SwiftUI-Introspect.git",
"repositoryURL": "https://github.com/dreampiggy/SwiftUI-Introspect.git",
"state": {
"branch": null,
"revision": "732316ac5957675eac2ed8ef9c0a5b95a353f9ff",
"version": "0.0.6"
"revision": "53a3b54dcc6ecb2a37edb5ea13ffab76abffee1f",
"version": "0.1.0"
}
},
{

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "321C1D3A23DEC17D009CF62A"
BuildableName = "SDWebImageSwiftUITests macOS.xctest"
BlueprintName = "SDWebImageSwiftUITests macOS"
ReferencedContainer = "container:SDWebImageSwiftUI.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "321C1D3A23DEC17D009CF62A"
BuildableName = "SDWebImageSwiftUITests macOS.xctest"
BlueprintName = "SDWebImageSwiftUITests macOS"
ReferencedContainer = "container:SDWebImageSwiftUI.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "321C1D3A23DEC17D009CF62A"
BuildableName = "SDWebImageSwiftUITests macOS.xctest"
BlueprintName = "SDWebImageSwiftUITests macOS"
ReferencedContainer = "container:SDWebImageSwiftUI.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "321C1D4923DEC185009CF62A"
BuildableName = "SDWebImageSwiftUITests tvOS.xctest"
BlueprintName = "SDWebImageSwiftUITests tvOS"
ReferencedContainer = "container:SDWebImageSwiftUI.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "321C1D4923DEC185009CF62A"
BuildableName = "SDWebImageSwiftUITests tvOS.xctest"
BlueprintName = "SDWebImageSwiftUITests tvOS"
ReferencedContainer = "container:SDWebImageSwiftUI.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "321C1D4923DEC185009CF62A"
BuildableName = "SDWebImageSwiftUITests tvOS.xctest"
BlueprintName = "SDWebImageSwiftUITests tvOS"
ReferencedContainer = "container:SDWebImageSwiftUI.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -98,13 +98,25 @@ class AnimatedImageTests: XCTestCase {
} else {
XCTFail("SDAnimatedImageView.image invalid")
}
#if os(iOS) || os(tvOS)
XCTAssertTrue(animatedImageView.isAnimating)
#else
XCTAssertTrue(animatedImageView.animates)
#endif
binding.wrappedValue = false
XCTAssertFalse(binding.wrappedValue)
XCTAssertFalse(imageView.isAnimating)
// TODO: current the Binding value can not been mocked, hardcode here to call `SDAnimatedImageView.stopAnimating`
#if os(iOS) || os(tvOS)
animatedImageView.stopAnimating()
#else
animatedImageView.animates = false
#endif
#if os(iOS) || os(tvOS)
XCTAssertFalse(animatedImageView.isAnimating)
#else
XCTAssertFalse(animatedImageView.animates)
#endif
expectation.fulfill()
}
_ = try introspectView.inspect(AnimatedImage.self)
@ -118,7 +130,7 @@ class AnimatedImageTests: XCTestCase {
}
func testImageBundle() -> Bundle {
let imagePath = (testBundle().bundlePath as NSString).appendingPathComponent("Images.bundle")
let imagePath = (testBundle().resourcePath! as NSString).appendingPathComponent("Images.bundle")
return Bundle(path: imagePath)!
}

View File

@ -22,7 +22,11 @@ class WebImageTests: XCTestCase {
let imageUrl = URL(string: "https://nr-platform.s3.amazonaws.com/uploads/platform/published_extension/branding_icon/275/AmazonS3.png")
let imageView = WebImage(url: imageUrl)
let introspectView = imageView.onSuccess { image, cacheType in
#if os(iOS) || os(tvOS)
let displayImage = try? imageView.inspect().group().image(0).uiImage()
#else
let displayImage = try? imageView.inspect().group().image(0).nsImage()
#endif
XCTAssertNotNil(displayImage)
expectation.fulfill()
}.onFailure { error in
@ -42,7 +46,11 @@ class WebImageTests: XCTestCase {
if let animatedImage = image as? SDAnimatedImage {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
XCTAssertTrue(imageView.isAnimating)
#if os(iOS) || os(tvOS)
let displayImage = try? imageView.inspect().group().image(0).uiImage()
#else
let displayImage = try? imageView.inspect().group().image(0).nsImage()
#endif
XCTAssertNotNil(displayImage)
// Check display image should match the animated poster frame
let posterImage = animatedImage.animatedImageFrame(at: 0)