Add SwiftLint to YetiActionExtension

This commit is contained in:
2025-01-30 22:49:17 -05:00
parent 5a13fb4f64
commit 90cefbfb3b
2 changed files with 18 additions and 5 deletions

View File

@@ -274,6 +274,7 @@
buildRules = (
);
dependencies = (
3A6382BC2D4C7F3300B09B07 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
3AC2CDAB2D4683AD00A6DEDB /* YetiActionExtension */,
@@ -401,6 +402,10 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
3A6382BC2D4C7F3300B09B07 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = 3A6382BB2D4C7F3300B09B07 /* SwiftLintBuildToolPlugin */;
};
3AA480CC2D3DECF20052A05C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 3AA480B72D3DECF10052A05C /* Yeti */;
@@ -808,6 +813,11 @@
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
3A6382BB2D4C7F3300B09B07 /* SwiftLintBuildToolPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 3AA480F82D3DF0820052A05C /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;
productName = "plugin:SwiftLintBuildToolPlugin";
};
3AA480F92D3DF10E0052A05C /* SwiftLintBuildToolPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 3AA480F82D3DF0820052A05C /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;

View File

@@ -22,7 +22,6 @@ class YetiActionExtensionViewController: UIViewController {
return
}
let textDataType = UTType.plainText.identifier
guard itemProvider.hasItemConformingToTypeIdentifier(textDataType) else {
done()
@@ -54,7 +53,11 @@ class YetiActionExtensionViewController: UIViewController {
}
}
NotificationCenter.default.addObserver(forName: NSNotification.Name("done"), object: nil, queue: nil) { notification in
NotificationCenter.default.addObserver(
forName: NSNotification.Name("done"),
object: nil,
queue: nil
) { notification in
DispatchQueue.main.async {
self.done(signedEvent: notification.object as? String)
}