From a61ffceb377fa487760522ae82677ed5e656c20a Mon Sep 17 00:00:00 2001 From: David Harris Date: Fri, 3 May 2024 15:42:12 -0400 Subject: [PATCH] Update app_with_spm_dependencies fixture to rely on -ObjC flag and document --- fixtures/app_with_spm_dependencies/App/Project.swift | 4 ++-- .../App/Sources/AppKit/AppKit.swift | 2 +- fixtures/app_with_spm_dependencies/README.md | 5 +++++ .../Tuist/ProjectDescriptionHelpers/Settings+Templates.swift | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 fixtures/app_with_spm_dependencies/README.md diff --git a/fixtures/app_with_spm_dependencies/App/Project.swift b/fixtures/app_with_spm_dependencies/App/Project.swift index a8d25a31c60..ec2d7e9bc12 100644 --- a/fixtures/app_with_spm_dependencies/App/Project.swift +++ b/fixtures/app_with_spm_dependencies/App/Project.swift @@ -84,8 +84,8 @@ let project = Project( with: [ "WKCompanionAppBundleIdentifier": "io.tuist.app", ] - ), - sources: ["Sources/Watch/App/**"], + ), π sources: ["Sources/Watch/App/**"], + dependencies: [ .target(name: "WatchExtension"), ] diff --git a/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift b/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift index 650dbdcc2ea..0494c355205 100644 --- a/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift +++ b/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift @@ -32,7 +32,7 @@ public enum AppKit { _ = YAMLEncoder() // Use GoogleSignIn - _ = GIDSignIn.sharedInstance.configuration + _ = GIDSignIn.sharedInstance.hasPreviousSignIn() // Use Sentry SentrySDK.startSession() diff --git a/fixtures/app_with_spm_dependencies/README.md b/fixtures/app_with_spm_dependencies/README.md new file mode 100644 index 00000000000..b98f319091e --- /dev/null +++ b/fixtures/app_with_spm_dependencies/README.md @@ -0,0 +1,5 @@ +# Application with Swift Package Manager Dependencies + +This example contains an example that uses Swift Package Manager dependencies. + +It also contains a static Objective-C dependency that relies on the `-ObjC` linker flag to be added to the consuming application. \ No newline at end of file diff --git a/fixtures/app_with_spm_dependencies/Tuist/ProjectDescriptionHelpers/Settings+Templates.swift b/fixtures/app_with_spm_dependencies/Tuist/ProjectDescriptionHelpers/Settings+Templates.swift index e4fac629fdb..5db66ebcd62 100644 --- a/fixtures/app_with_spm_dependencies/Tuist/ProjectDescriptionHelpers/Settings+Templates.swift +++ b/fixtures/app_with_spm_dependencies/Tuist/ProjectDescriptionHelpers/Settings+Templates.swift @@ -12,6 +12,7 @@ extension ProjectDescription.Settings { .settings( base: [ "SOME_BASE_FLAG": .string("VALUE"), + "OTHER_LDFLAGS": .string("-ObjC"), ].otherSwiftFlags("-enable-actor-data-race-checks"), configurations: BuildEnvironment.allCases.map(\.targetConfiguration) )